MapPress Easy Google Maps - Version 2.54

Version Description

  • Changed: Google map type control is hidden in frontend, visible only in editor
  • Changed: scrollwheel zoom and keyboard shortcuts are now enabled by default (to match Google API defaults)
  • Changed: filters 'mappress_tile_providers' and 'mappress_baselayers' replaced by filter 'mappress_options'
  • Changed: map filters taxonomy can only be defined via settings, not in shortcodes
  • Changed: improved handling of user location in directions form
  • Changed: directions form closes when map is dragged or clicked
  • Changed: internal updates to template editor, icon/color pickers, JavaScript loading
Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.54
Comparing to
See all releases

Code changes from version 2.53.9 to 2.54

css/mappress.css CHANGED
@@ -26,7 +26,7 @@
26
  }
27
 
28
  /* 2019 */
29
- .mapp-layout input, .mapp-layout button, .mapp-layout select, .mapp-layout textarea {
30
  font-family: sans-serif;
31
  }
32
 
@@ -309,8 +309,7 @@ only screen and (min-device-pixel-ratio: 2) {
309
  display: block !important;
310
  }
311
 
312
- /* Important is used to override themes */
313
- input.mapp-aa-input, input.mapp-aa-hint {
314
  border: 1px solid #bbb ;
315
  box-shadow: none ;
316
  color: black ;
@@ -551,31 +550,50 @@ input.mapp-aa-input, input.mapp-aa-hint {
551
 
552
  /*
553
  -----------------------------------------------------------------------------------
554
- Mini view - on hold
555
  -----------------------------------------------------------------------------------
556
  */
557
 
558
- /*
559
- .mapp-has-filters .mapp-header, .mapp-has-search .mapp-header, .mapp-view-mini .mapp-header {
560
- display: block;
 
 
 
561
  }
562
 
563
- .mapp-left.mapp-mini .mapp-list {
564
- display: none !important;
 
 
 
565
  }
566
 
567
- .mapp-left [data-mapp-action="view-map"] { display: none; }
568
- .mapp-left.mapp-view-list [data-mapp-action="view-list"] { display: none; }
569
- .mapp-left.mapp-view-list [data-mapp-action="view-map"] { display: block; }
 
570
 
571
- .mapp-left.mapp-view-mini .mapp-list {
572
- display: none;
 
 
 
 
 
 
 
573
  }
574
 
575
- .mapp-left.mapp-view-list .mapp-list {
576
- display: block;
577
- width: 100%;
578
- max-width: none;
 
 
 
 
 
579
  }
580
 
581
 
@@ -592,6 +610,12 @@ input.mapp-aa-input, input.mapp-aa-hint {
592
  position: relative;
593
  }
594
 
 
 
 
 
 
 
595
  .mapp-dir-toolbar {
596
  margin-top: 10px;
597
  }
@@ -619,22 +643,29 @@ input.mapp-aa-input, input.mapp-aa-hint {
619
  margin: 10px 0 0px 0 ;
620
  }
621
 
622
- .mapp-dir-addr {
623
  width: 80% ;
624
  line-height: normal ;
625
  }
626
 
 
 
 
 
627
  .mapp-dir-arrows {
628
  background: transparent url('../images/directions.png') no-repeat center center;
 
629
  cursor: pointer;
630
  display: inline-block;
 
631
  margin: 0;
632
  padding: 0;
 
 
633
  vertical-align: middle;
 
634
  }
635
 
636
- .mapp-dir-arrows { width: 10px; height: 12px; background-position: -10px -489px; position: relative; top: 10px; left: 5px; }
637
-
638
  /*
639
  -----------------------------------------------------------------------------------
640
  Custom controls
@@ -653,6 +684,7 @@ input.mapp-aa-input, input.mapp-aa-hint {
653
  position: absolute;
654
  top: 10px; left: 10px; bottom: 0; right: 0;
655
  width: 32px;
 
656
  }
657
 
658
  .mapp-menu {
26
  }
27
 
28
  /* 2019 */
29
+ .mapp-layout input, .mapp-layout button, .mapp-layout select, .mapp-layout textarea, .mapp-layout p, .mapp-layout a {
30
  font-family: sans-serif;
31
  }
32
 
309
  display: block !important;
310
  }
311
 
312
+ .mapp-places {
 
313
  border: 1px solid #bbb ;
314
  box-shadow: none ;
315
  color: black ;
550
 
551
  /*
552
  -----------------------------------------------------------------------------------
553
+ Mini view
554
  -----------------------------------------------------------------------------------
555
  */
556
 
557
+ .mapp-footer {
558
+ background-color: #f5f5f5;
559
+ border-top: 1px solid lightgray;
560
+ display: none;
561
+ padding: 7px;
562
+ text-align: center;
563
  }
564
 
565
+ .mapp-footer [data-mapp-action="view-map"] { display: none; }
566
+
567
+ /* In mini view place the list under the map */
568
+ .mapp-view-mini .mapp-main {
569
+ flex-direction: column-reverse;
570
  }
571
 
572
+ /* List must be positioned absolute, otherwise it will compress map bounds */
573
+ .mapp-view-mini .mapp-main {
574
+ position: relative;
575
+ }
576
 
577
+ .mapp-view-mini .mapp-list {
578
+ bottom: 0;
579
+ height: 0;;
580
+ max-width: none;
581
+ position: absolute;
582
+ transition-property : all;
583
+ transition-duration: .3s;
584
+ width: 100%;
585
+ z-index: 10000;
586
  }
587
 
588
+ .mapp-view-mini .mapp-footer {
589
+ display: block;
590
+ }
591
+
592
+ .mapp-view-list .mapp-footer [data-mapp-action="view-list"] { display: none; }
593
+ .mapp-view-list .mapp-footer [data-mapp-action="view-map"] { display: block; }
594
+
595
+ .mapp-view-list .mapp-list {
596
+ height: 100%;
597
  }
598
 
599
 
610
  position: relative;
611
  }
612
 
613
+ .mapp-directions input {
614
+ border: 1px solid gray; /* 2020 */
615
+ padding: 3px;
616
+ }
617
+
618
+
619
  .mapp-dir-toolbar {
620
  margin-top: 10px;
621
  }
643
  margin: 10px 0 0px 0 ;
644
  }
645
 
646
+ .mapp-dir-saddr, .mapp-dir-daddr {
647
  width: 80% ;
648
  line-height: normal ;
649
  }
650
 
651
+ .mapp-dir-saddr {
652
+ margin-bottom: 5px;
653
+ }
654
+
655
  .mapp-dir-arrows {
656
  background: transparent url('../images/directions.png') no-repeat center center;
657
+ background-position: -10px -489px;
658
  cursor: pointer;
659
  display: inline-block;
660
+ height: 12px;
661
  margin: 0;
662
  padding: 0;
663
+ position: relative;
664
+ top: 10px; left: 5px;
665
  vertical-align: middle;
666
+ width: 10px;
667
  }
668
 
 
 
669
  /*
670
  -----------------------------------------------------------------------------------
671
  Custom controls
684
  position: absolute;
685
  top: 10px; left: 10px; bottom: 0; right: 0;
686
  width: 32px;
687
+ z-index: 1000;
688
  }
689
 
690
  .mapp-menu {
css/mappress_admin.css CHANGED
@@ -310,7 +310,7 @@ a.mapp-help {
310
  width: 800px;
311
  max-width: 90%;
312
  max-height: 90%;
313
- padding: 5px;
314
  }
315
 
316
  .mapp-tp-detail .mapp-tp-name {
@@ -410,13 +410,11 @@ a.mapp-help {
410
  box-shadow: 5px 5px 10px #888;
411
  box-sizing: content-box;
412
  display: inline-block;
413
- padding: 5px 20px 5px 5px;
414
  z-index: 100005; /* Keep above popup-max */
415
  }
416
 
417
- .mapp-popup-fixed {
418
- background-color: white;
419
- border: 2px solid black;
420
  position: fixed;
421
  left: 50%;
422
  top: 50%;
@@ -425,19 +423,31 @@ a.mapp-help {
425
  }
426
 
427
  .mapp-popup-max {
428
- transform: none;
429
- top: 80px; left: 80px; bottom: 80px; right: 80px;
 
 
 
 
 
 
 
 
 
 
 
 
430
  }
431
 
432
  /* Prevent scrollbars on body when popup is open */
433
- body.mapp-popup-modal {
434
  overflow: hidden;
435
  }
436
 
437
  .mapp-popup-backdrop {
438
  background-color: black;
 
439
  opacity: 0.8;
440
- overflow: hidden;
441
  position: fixed;
442
  top: 0; right: 0; bottom: 0; left : 0;
443
  user-select: none;
@@ -451,6 +461,7 @@ body.mapp-popup-modal {
451
  */
452
 
453
  .mapp-iconpicker {
 
454
  width: 260px;
455
  }
456
 
@@ -490,6 +501,7 @@ img.mapp-iconpicker-toggle {
490
  */
491
 
492
  .mapp-colorpicker {
 
493
  width: 260px;
494
  max-height: 250px;
495
  }
310
  width: 800px;
311
  max-width: 90%;
312
  max-height: 90%;
313
+ padding: 10px;
314
  }
315
 
316
  .mapp-tp-detail .mapp-tp-name {
410
  box-shadow: 5px 5px 10px #888;
411
  box-sizing: content-box;
412
  display: inline-block;
 
413
  z-index: 100005; /* Keep above popup-max */
414
  }
415
 
416
+ /* Center modals */
417
+ .mapp-popup-modal {
 
418
  position: fixed;
419
  left: 50%;
420
  top: 50%;
423
  }
424
 
425
  .mapp-popup-max {
426
+ left: 5%;
427
+ right: 5%;
428
+ top: 5%;
429
+ bottom: 5%;
430
+ transform: none;
431
+ }
432
+
433
+ @media only screen and (max-width: 780px) {
434
+ .mapp-popup-max {
435
+ left: 0;
436
+ right: 0;
437
+ top: 0;
438
+ bottom: 0;
439
+ }
440
  }
441
 
442
  /* Prevent scrollbars on body when popup is open */
443
+ body.mapp-popup-noscroll {
444
  overflow: hidden;
445
  }
446
 
447
  .mapp-popup-backdrop {
448
  background-color: black;
449
+ display: none;
450
  opacity: 0.8;
 
451
  position: fixed;
452
  top: 0; right: 0; bottom: 0; left : 0;
453
  user-select: none;
461
  */
462
 
463
  .mapp-iconpicker {
464
+ padding: 5px;
465
  width: 260px;
466
  }
467
 
501
  */
502
 
503
  .mapp-colorpicker {
504
+ padding: 5px;
505
  width: 260px;
506
  max-height: 250px;
507
  }
forms/editor.php CHANGED
@@ -1,7 +1,10 @@
1
  <div class='mapp-edit'></div>
2
 
3
  <script type='text/template' id='mapp-tmpl-edit-map'>
4
- <?php echo Mappress_Template::get_template('map', array('map' => $map)); ?>
 
 
 
5
  </script>
6
 
7
  <script type='text/template' id='mapp-tmpl-edit-loop'>
1
  <div class='mapp-edit'></div>
2
 
3
  <script type='text/template' id='mapp-tmpl-edit-map'>
4
+ <?php
5
+ $map = new Mappress_Map(array('editable' => true, 'layout' => 'left', 'name' => 'mapp0', 'poiList' => true));
6
+ echo Mappress_Template::get_template('map', array('map' => $map));
7
+ ?>
8
  </script>
9
 
10
  <script type='text/template' id='mapp-tmpl-edit-loop'>
forms/settings.php CHANGED
@@ -1,47 +1,34 @@
1
- <div class='mapp-tp-editor'>
2
- <div class='mapp-tp-master'>
3
- <?php echo Mappress_Controls::select('', $templates, 'map-tmpl-poi', array('class' => 'mapp-tp-select')); ?>
4
- <?php echo Mappress_Controls::button('', __('Edit', 'mappress-google-maps-for-wordpress'), array('class' => 'button button-primary', 'data-mapp-action' => 'edit')); ?>
5
- </div>
6
- <div class='mapp-tp-detail'></div>
7
- </div>
8
-
9
  <script type='text/html' id='mapp-tmpl-tp-master'>
10
- <div class='mapp-tp-master'>
11
- <select class='mapp-tp-select'>
12
- <# _.each(collection, function(template, name) { #>
13
- <option <# print( ( model && model.name == name) ? 'selected' : ''); #> value='{{name}}'>
14
- <# if (template.exists) print ('*'); #> {{template.label}}
15
- </option>
16
- <# }); #>
17
- </select>
18
- <input type='button' class='button button-primary' data-mapp-action='edit' value='<?php _e('Edit', 'mappress-google-maps-for-wordpress');?>'>
19
-
20
  </div>
21
  </script>
22
 
23
  <script type='text/html' id='mapp-tmpl-tp-detail'>
24
- <div class='mapp-tp-name'>{{ model.name }} <# if (!model.exists) { #>(<?php _e('New', 'mappress-google-maps-for-wordpress');?>)<# } else { #>(<?php _e('Custom', 'mappress-google-maps-for-wordpress');?>)<# } #></div>
25
- <div class='mapp-tp-path'>{{ model.path }}</div>
26
- <div class='mapp-tabs'>
27
- <div class='mapp-tab-label mapp-active' class='mapp-active'><?php _e('Editor', 'mappress-google-maps-for-wordpress');?></div>
28
- <div class='mapp-tab-label'><?php _e('Default', 'mappress-google-maps-for-wordpress');?></div>
29
- <div class='mapp-tab mapp-tab-content mapp-active'>
30
- <# _.each(tokens, function (token, i) { #>
31
- <code data-mapp-action='insert' data-mapp-insert='{{{i}}}' title='{{{i}}}'>{{{token}}}</code>
32
- <# }); #>
33
- <hr/>
34
- <textarea class='mapp-tp-content'>{{{ model.content }}}</textarea>
 
 
 
 
 
35
  </div>
36
- <div class='mapp-tab mapp-tab-standard'>
37
- <textarea readonly class='mapp-tp-standard'>{{{ model.standard }}}</textarea>
 
 
 
 
38
  </div>
39
  </div>
40
- <div class='mapp-tp-toolbar'>
41
- <input type='button' class='button button-primary' data-mapp-action='save' value='<?php _e('Save', 'mappress-google-maps-for-wordpress');?>'>
42
- <input type='button' class='button' data-mapp-action='cancel' value='<?php _e('Cancel', 'mappress-google-maps-for-wordpress');?>'>
43
- <# if (model.exists) { #>
44
- <a href='#' data-mapp-action='destroy'><?php _e('Delete', 'mappress-google-maps-for-wordpress');?></a>
45
- <# } #>
46
- </div>
47
  </script>
 
 
 
 
 
 
 
 
1
  <script type='text/html' id='mapp-tmpl-tp-master'>
2
+ <div class='mapp-tp-editor'>
3
+ <?php echo Mappress_Controls::select('', array('map-popup' => __('Map popup', 'mappress-google-maps-for-wordpress'), 'map-item' => __('Map list item', 'mappress-google-maps-for-wordpress'), 'mashup-popup' => __('Mashup popup', 'mappress-google-maps-for-wordpress'), 'mashup-item' => __('Mashup list item', 'mappress-google-maps-for-wordpress')), 'map-tmpl-poi', array('class' => 'mapp-tp-select')); ?>
4
+ <?php echo Mappress_Controls::button('', __('Edit', 'mappress-google-maps-for-wordpress'), array('class' => 'button button-primary', 'data-mapp-action' => 'edit')); ?>
 
 
 
 
 
 
 
5
  </div>
6
  </script>
7
 
8
  <script type='text/html' id='mapp-tmpl-tp-detail'>
9
+ <div class='mapp-tp-detail'>
10
+ <div class='mapp-tp-name'>{{ model.name }} <# if (!model.exists) { #>(<?php _e('New', 'mappress-google-maps-for-wordpress');?>)<# } else { #>(<?php _e('Custom', 'mappress-google-maps-for-wordpress');?>)<# } #></div>
11
+ <div class='mapp-tp-path'>{{ model.path }}</div>
12
+ <div class='mapp-tabs'>
13
+ <div class='mapp-tab-label mapp-active' class='mapp-active'><?php _e('Editor', 'mappress-google-maps-for-wordpress');?></div>
14
+ <div class='mapp-tab-label'><?php _e('Default', 'mappress-google-maps-for-wordpress');?></div>
15
+ <div class='mapp-tab mapp-tab-content mapp-active'>
16
+ <# _.each(tokens, function (token, i) { #>
17
+ <code data-mapp-action='insert' data-mapp-insert='{{{i}}}' title='{{{i}}}'>{{{token}}}</code>
18
+ <# }); #>
19
+ <hr/>
20
+ <textarea class='mapp-tp-content'>{{{ model.content }}}</textarea>
21
+ </div>
22
+ <div class='mapp-tab mapp-tab-standard'>
23
+ <textarea readonly class='mapp-tp-standard'>{{{ model.standard }}}</textarea>
24
+ </div>
25
  </div>
26
+ <div class='mapp-tp-toolbar'>
27
+ <input type='button' class='button button-primary' data-mapp-action='save' value='<?php _e('Save', 'mappress-google-maps-for-wordpress');?>'>
28
+ <input type='button' class='button' data-mapp-action='cancel' value='<?php _e('Cancel', 'mappress-google-maps-for-wordpress');?>'>
29
+ <# if (model.exists) { #>
30
+ <a href='#' data-mapp-action='destroy'><?php _e('Delete', 'mappress-google-maps-for-wordpress');?></a>
31
+ <# } #>
32
  </div>
33
  </div>
 
 
 
 
 
 
 
34
  </script>
js/algolia/placesAutocompleteDataset.min.js CHANGED
@@ -1,3 +1,2 @@
1
  /*! 1.16.1 | ? Algolia | https://www.jsdelivr.com/package/npm/places.js?path=dist%2Fcdn */
2
  !function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.placesAutocompleteDataset=t():n.placesAutocompleteDataset=t()}(window,function(){return function(e){var o={};function a(n){if(o[n])return o[n].exports;var t=o[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=e,a.c=o,a.d=function(n,t,e){a.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:e})},a.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},a.t=function(t,n){if(1&n&&(t=a(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(a.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)a.d(e,o,function(n){return t[n]}.bind(null,o));return e},a.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return a.d(t,"a",t),t},a.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},a.p="",a(a.s=78)}({1:function(n,t,e){"use strict";function z(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.forEach(function(n){a(t,n,e[n])})}return t}function a(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var P={},L={};t.a=function(n){var t,e,o,a,r,i,c,s,u,l,p,d,h,g,v,f,m,w,y,b,x;return t=z({},P,n),e=t.hitsPerPage,o=t.aroundLatLng,a=t.aroundRadius,r=t.aroundLatLngViaIP,i=t.insideBoundingBox,c=t.insidePolygon,s=t.getRankingInfo,u=t.countries,l=t.language,p=t.type,d={countries:u,hitsPerPage:e||5,language:l||navigator.language.split("-")[0],type:p},Array.isArray(u)&&(d.countries=d.countries.map(function(n){return n.toLowerCase()})),"string"==typeof d.language&&(d.language=d.language.toLowerCase()),o?d.aroundLatLng=o:void 0!==r&&(d.aroundLatLngViaIP=r),P=z({},d,{aroundRadius:a,insideBoundingBox:i,insidePolygon:c,getRankingInfo:s}),h=z({},L,n),g=h.useDeviceLocation,v=void 0!==g&&g,f=h.computeQueryParams,m=void 0===f?function(n){return n}:f,w=h.formatInputValue,y=h.onHits,b=void 0===y?function(){}:y,x=h.onError,L={useDeviceLocation:v,computeQueryParams:m,formatInputValue:w,onHits:b,onError:void 0===x?function(n){throw n}:x,onRateLimitReached:h.onRateLimitReached},{params:P,controls:L}}},15:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 18 19"><path d="M12 9V3L9 0 6 3v2H0v14h18V9h-6zm-8 8H2v-2h2v2zm0-4H2v-2h2v2zm0-4H2V7h2v2zm6 8H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V7h2v2zm0-4H8V3h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"/></svg>\n'},16:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zM9 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L7 13v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H6V8h2c.55 0 1-.45 1-1V5h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>\n</svg>\n'},17:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 54.9 50.5"><path d="M9.6 12.7H8.5c-2.3 0-4.1 1.9-4.1 4.1v1.1c0 2.2 1.8 4 4 4.1v21.7h-.7c-1.3 0-2.3 1-2.3 2.3h7.1c0-1.3-1-2.3-2.3-2.3h-.5V22.1c2.2-.1 4-1.9 4-4.1v-1.1c0-2.3-1.8-4.2-4.1-4.2zM46 7.6h-7.5c0-1.8-1.5-3.3-3.3-3.3h-3.6c-1.8 0-3.3 1.5-3.3 3.3H21c-2.5 0-4.6 2-4.6 4.6v26.3c0 1.7 1.3 3.1 3 3.1h.8v1.6c0 1.7 1.4 3.1 3.1 3.1 1.7 0 3-1.4 3-3.1v-1.6h14.3v1.6c0 1.7 1.4 3.1 3.1 3.1 1.7 0 3.1-1.4 3.1-3.1v-1.6h.8c1.7 0 3.1-1.4 3.1-3.1V12.2c-.2-2.5-2.2-4.6-4.7-4.6zm-27.4 4.6c0-1.3 1.1-2.4 2.4-2.4h25c1.3 0 2.4 1.1 2.4 2.4v.3c0 1.3-1.1 2.4-2.4 2.4H21c-1.3 0-2.4-1.1-2.4-2.4v-.3zM21 38c-1.5 0-2.7-1.2-2.7-2.7 0-1.5 1.2-2.7 2.7-2.7 1.5 0 2.7 1.2 2.7 2.7 0 1.5-1.2 2.7-2.7 2.7zm0-10.1c-1.3 0-2.4-1.1-2.4-2.4v-6.6c0-1.3 1.1-2.4 2.4-2.4h25c1.3 0 2.4 1.1 2.4 2.4v6.6c0 1.3-1.1 2.4-2.4 2.4H21zm24.8 10c-1.5 0-2.7-1.2-2.7-2.7 0-1.5 1.2-2.7 2.7-2.7 1.5 0 2.7 1.2 2.7 2.7 0 1.5-1.2 2.7-2.7 2.7z"/></svg>\n'},18:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 20">\n <path d="M13.105 20l-2.366-3.354H4.26L1.907 20H0l3.297-4.787c-1.1-.177-2.196-1.287-2.194-2.642V2.68C1.1 1.28 2.317-.002 3.973 0h7.065c1.647-.002 2.863 1.28 2.86 2.676v9.895c.003 1.36-1.094 2.47-2.194 2.647L15 20h-1.895zM6.11 2h2.78c.264 0 .472-.123.472-.27v-.46c0-.147-.22-.268-.472-.27H6.11c-.252.002-.47.123-.47.27v.46c0 .146.206.27.47.27zm6.26 3.952V4.175c-.004-.74-.5-1.387-1.436-1.388H4.066c-.936 0-1.43.648-1.436 1.388v1.777c-.002.86.644 1.384 1.436 1.388h6.868c.793-.004 1.44-.528 1.436-1.388zm-8.465 5.386c-.69-.003-1.254.54-1.252 1.21-.002.673.56 1.217 1.252 1.222.697-.006 1.26-.55 1.262-1.22-.002-.672-.565-1.215-1.262-1.212zm8.42 1.21c-.005-.67-.567-1.213-1.265-1.21-.69-.003-1.253.54-1.25 1.21-.003.673.56 1.217 1.25 1.222.698-.006 1.26-.55 1.264-1.22z"/>\n</svg>\n'},19:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M12 .6L2.5 6.9h18.9L12 .6zM3.8 8.2c-.7 0-1.3.6-1.3 1.3v8.8L.3 22.1c-.2.3-.3.5-.3.6 0 .6.8.6 1.3.6h21.5c.4 0 1.3 0 1.3-.6 0-.2-.1-.3-.3-.6l-2.2-3.8V9.5c0-.7-.6-1.3-1.3-1.3H3.8zm2.5 2.5c.7 0 1.1.6 1.3 1.3v7.6H5.1V12c0-.7.5-1.3 1.2-1.3zm5.7 0c.7 0 1.3.6 1.3 1.3v7.6h-2.5V12c-.1-.7.5-1.3 1.2-1.3zm5.7 0c.7 0 1.3.6 1.3 1.3v7.6h-2.5V12c-.1-.7.5-1.3 1.2-1.3z"/></svg>\n'},20:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M22.9 1.1s1.3.3-4.3 6.5l.7 3.8.2-.2c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l-1.2 1.2.3 1.7.1-.1c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l-1.1 1.1c.2 1.9.3 3.6.1 4.5 0 0-1.2 1.2-1.8.5 0 0-2.3-7.7-3.8-11.1-5.9 6-6.4 5.6-6.4 5.6s1.2 3.8-.2 5.2l-2.3-4.3h.1l-4.3-2.3c1.3-1.3 5.2-.2 5.2-.2s-.5-.4 5.6-6.3C8.9 7.7 1.2 5.5 1.2 5.5c-.7-.7.5-1.8.5-1.8.9-.2 2.6-.1 4.5.1l1.1-1.1c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l1.7.3 1.2-1.2c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l-.2.2 3.8.7c6.2-5.5 6.5-4.2 6.5-4.2z"/></svg>\n'},21:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="117" height="17" viewBox="0 0 130 19"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path fill="#5468FF" d="M59.399.044h13.299a2.372 2.372 0 0 1 2.377 2.364v13.234a2.372 2.372 0 0 1-2.377 2.364H59.399a2.372 2.372 0 0 1-2.377-2.364V2.403A2.368 2.368 0 0 1 59.399.044z"/><path fill="#FFF" d="M66.257 4.582c-2.815 0-5.1 2.272-5.1 5.078 0 2.806 2.284 5.072 5.1 5.072 2.815 0 5.1-2.272 5.1-5.078 0-2.806-2.279-5.072-5.1-5.072zm0 8.652c-1.983 0-3.593-1.602-3.593-3.574 0-1.972 1.61-3.574 3.593-3.574 1.983 0 3.593 1.602 3.593 3.574a3.582 3.582 0 0 1-3.593 3.574zm0-6.418V9.48c0 .076.082.131.153.093l2.377-1.226c.055-.027.071-.093.044-.147a2.96 2.96 0 0 0-2.465-1.487c-.055 0-.11.044-.11.104h.001zm-3.33-1.956l-.312-.31a.783.783 0 0 0-1.106 0l-.372.37a.773.773 0 0 0 0 1.1l.307.305c.049.05.121.038.164-.01.181-.246.378-.48.597-.698.225-.223.455-.42.707-.599.055-.033.06-.109.016-.158h-.001zm5.001-.806v-.616a.781.781 0 0 0-.783-.779h-1.824a.78.78 0 0 0-.783.78v.631c0 .071.066.12.137.104a5.736 5.736 0 0 1 1.588-.223c.52 0 1.035.071 1.534.207a.106.106 0 0 0 .131-.104z"/><path fill="#252C61" d="M5.027 10.246c0 .698-.252 1.246-.757 1.644-.505.397-1.201.596-2.089.596-.888 0-1.615-.138-2.181-.414v-1.214c.358.168.739.301 1.141.397.403.097.778.145 1.125.145.508 0 .884-.097 1.125-.29a.945.945 0 0 0 .363-.779.978.978 0 0 0-.333-.747c-.222-.204-.68-.446-1.375-.725C1.33 8.57.825 8.24.531 7.865c-.294-.372-.44-.82-.44-1.343 0-.655.233-1.17.698-1.547.465-.376 1.09-.564 1.875-.564.752 0 1.5.165 2.245.494l-.408 1.047c-.698-.294-1.321-.44-1.869-.44-.415 0-.73.09-.945.271a.89.89 0 0 0-.322.717c0 .204.043.38.129.524.086.145.227.282.424.411.197.13.551.3 1.063.51.577.24.999.464 1.268.671.269.208.465.442.591.704.125.261.188.57.188.924l-.001.002zm3.98 2.24c-.924 0-1.646-.269-2.167-.808-.521-.539-.781-1.28-.781-2.226 0-.97.242-1.733.725-2.288.483-.555 1.148-.833 1.993-.833.784 0 1.404.238 1.858.714.455.476.682 1.132.682 1.966v.682H7.359c.018.577.174 1.02.467 1.33.294.31.707.464 1.241.464.351 0 .678-.033.98-.099a5.1 5.1 0 0 0 .975-.33v1.026a3.865 3.865 0 0 1-.935.312 5.723 5.723 0 0 1-1.08.091zm7.46-.107l-.252-.827h-.043c-.286.362-.575.608-.865.74-.29.13-.662.195-1.117.195-.584 0-1.039-.158-1.367-.473-.328-.315-.491-.76-.491-1.337 0-.612.227-1.074.682-1.386.455-.312 1.148-.482 2.079-.51l1.026-.032v-.317c0-.38-.089-.663-.266-.85-.177-.189-.452-.283-.824-.283-.304 0-.596.045-.875.134a6.68 6.68 0 0 0-.806.317l-.408-.902a4.414 4.414 0 0 1 1.058-.384 4.856 4.856 0 0 1 1.085-.132c.756 0 1.326.165 1.711.494.385.33.577.847.577 1.552v4.001h-.904zm5.677-6.048c.254 0 .464.018.628.054l-.124 1.176a2.383 2.383 0 0 0-.559-.064c-.505 0-.914.165-1.227.494-.313.33-.47.757-.47 1.284v3.104H19.13V6.44h.988l.167 1.047h.064c.197-.354.454-.636.771-.843a1.83 1.83 0 0 1 1.023-.312h.001zm4.125 6.155c-.899 0-1.582-.262-2.049-.787-.467-.525-.701-1.277-.701-2.259 0-.999.244-1.767.733-2.304.489-.537 1.195-.806 2.119-.806.627 0 1.191.116 1.692.35l-.381 1.014c-.534-.208-.974-.312-1.321-.312-1.028 0-1.542.682-1.542 2.046 0 .666.128 1.166.384 1.501.256.335.631.502 1.125.502a3.23 3.23 0 0 0 1.595-.419v1.101a2.53 2.53 0 0 1-.722.285 4.356 4.356 0 0 1-.932.086v.002zm8.277-.107h-1.268V8.727c0-.458-.092-.8-.277-1.026-.184-.226-.477-.338-.878-.338-.53 0-.919.158-1.168.475-.249.317-.373.848-.373 1.593v2.95H29.32V4.022h1.262v2.122c0 .34-.021.704-.064 1.09h.081a1.76 1.76 0 0 1 .717-.666c.306-.158.663-.236 1.072-.236 1.439 0 2.159.725 2.159 2.175v3.873l-.001-.002zm7.648-6.048c.741 0 1.319.27 1.732.806.414.537.62 1.291.62 2.261 0 .974-.209 1.732-.628 2.275-.419.542-1.001.814-1.746.814-.752 0-1.336-.27-1.751-.81h-.086l-.231.703h-.945V4.023h1.262V6.01l-.021.655-.032.553h.054c.401-.59.992-.886 1.772-.886zm2.917.107h1.375l1.208 3.368c.183.48.304.931.365 1.354h.043c.032-.197.091-.436.177-.717.086-.28.541-1.616 1.364-4.004h1.364l-2.541 6.73c-.462 1.235-1.232 1.853-2.31 1.853-.279 0-.551-.03-.816-.09v-1c.19.043.406.064.65.064.609 0 1.037-.353 1.284-1.058l.22-.559-2.385-5.94h.002zm-3.244.924c-.508 0-.875.15-1.098.448-.224.3-.339.8-.346 1.501v.086c0 .723.115 1.247.344 1.571.229.324.603.486 1.123.486.448 0 .787-.177 1.018-.532.231-.354.346-.867.346-1.536 0-1.35-.462-2.025-1.386-2.025l-.001.001zm-27.28 4.157c.458 0 .826-.128 1.104-.384.278-.256.416-.615.416-1.077v-.516l-.763.032c-.594.021-1.027.121-1.297.298s-.406.448-.406.814c0 .265.079.47.236.615.158.145.394.218.709.218h.001zM8.775 7.287c-.401 0-.722.127-.964.381s-.386.625-.432 1.112h2.696c-.007-.49-.125-.862-.354-1.115-.229-.252-.544-.379-.945-.379l-.001.001z"/></g><path fill="#5468FF" d="M102.162 13.784c0 1.455-.372 2.517-1.123 3.193-.75.676-1.895 1.013-3.44 1.013-.564 0-1.736-.109-2.673-.316l.345-1.689c.783.163 1.819.207 2.361.207.86 0 1.473-.174 1.84-.523.367-.349.548-.866.548-1.553v-.349a6.374 6.374 0 0 1-.838.316 4.151 4.151 0 0 1-1.194.158 4.515 4.515 0 0 1-1.616-.278 3.385 3.385 0 0 1-1.254-.817 3.744 3.744 0 0 1-.811-1.35c-.192-.54-.29-1.505-.29-2.213 0-.665.104-1.498.307-2.054a3.925 3.925 0 0 1 .904-1.433 4.124 4.124 0 0 1 1.441-.926 5.31 5.31 0 0 1 1.945-.365c.696 0 1.337.087 1.961.191a15.86 15.86 0 0 1 1.588.332v8.456h-.001zm-5.955-4.206c0 .893.197 1.885.592 2.3.394.413.904.62 1.528.62.34 0 .663-.049.964-.142a2.75 2.75 0 0 0 .734-.332v-5.29a8.531 8.531 0 0 0-1.413-.18c-.778-.022-1.369.294-1.786.801-.411.507-.619 1.395-.619 2.223zm16.121 0c0 .72-.104 1.264-.318 1.858a4.389 4.389 0 0 1-.904 1.52c-.389.42-.854.746-1.402.975-.548.23-1.391.36-1.813.36-.422-.005-1.26-.125-1.802-.36a4.088 4.088 0 0 1-1.397-.975 4.486 4.486 0 0 1-.909-1.52 5.037 5.037 0 0 1-.329-1.858c0-.719.099-1.41.318-1.999.219-.588.526-1.09.92-1.509.394-.42.865-.74 1.402-.97a4.547 4.547 0 0 1 1.786-.338 4.69 4.69 0 0 1 1.791.338c.548.23 1.019.55 1.402.97.389.42.69.921.909 1.51.23.587.345 1.28.345 1.998h.001zm-2.192.005c0-.92-.203-1.689-.597-2.223-.394-.539-.948-.806-1.654-.806-.707 0-1.26.267-1.654.806-.394.54-.586 1.302-.586 2.223 0 .932.197 1.558.592 2.098.394.545.948.812 1.654.812.707 0 1.26-.272 1.654-.812.394-.545.592-1.166.592-2.098h-.001zm6.963 4.708c-3.511.016-3.511-2.822-3.511-3.274L113.583.95l2.142-.338v10.003c0 .256 0 1.88 1.375 1.885v1.793h-.001zM120.873 14.291h-2.153V5.095l2.153-.338zM119.794 3.75c.718 0 1.304-.579 1.304-1.292 0-.714-.581-1.29-1.304-1.29-.723 0-1.304.577-1.304 1.29 0 .714.586 1.291 1.304 1.291zm6.431 1.012c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.285.311.488.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.263.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a9.335 9.335 0 0 1 1.66-.142h-.001zm.179 7.73c.657 0 1.145-.038 1.484-.104V10.22a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.17-.175.267-.175.523 0 .501.175.79.493.981.323.196.75.29 1.293.29h.001zM84.108 4.816c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.29.316.487.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.257.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a8.89 8.89 0 0 1 1.66-.142h-.001zm.185 7.736c.657 0 1.145-.038 1.484-.104V10.28a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.17-.175.267-.175.523 0 .501.175.79.493.981.318.191.75.29 1.293.29h.001zm8.683 1.738c-3.511.016-3.511-2.822-3.511-3.274L89.46.948 91.602.61v10.003c0 .256 0 1.88 1.375 1.885v1.793h-.001z"/></g></svg>'},22:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12">\n <path fill="#797979" fill-rule="evenodd" d="M6.577.5L5.304.005 2.627 1.02 0 0l.992 2.767-.986 2.685.998 2.76-1 2.717.613.22 3.39-3.45.563.06.726-.69s-.717-.92-.91-1.86c.193-.146.184-.14.355-.285C4.1 1.93 6.58.5 6.58.5zm-4.17 11.354l.22.12 2.68-1.05 2.62 1.04 2.644-1.03 1.02-2.717-.33-.944s-1.13 1.26-3.44.878c-.174.29-.25.37-.25.37s-1.11-.31-1.683-.89c-.573.58-.795.71-.795.71l.08.634-2.76 2.89zm6.26-4.395c1.817 0 3.29-1.53 3.29-3.4 0-1.88-1.473-3.4-3.29-3.4s-3.29 1.52-3.29 3.4c0 1.87 1.473 3.4 3.29 3.4z"/>\n</svg>\n'},25:function(n,t){n.exports=".algolia-places {\n width: 100%;\n}\n\n.ap-input, .ap-hint {\n width: 100%;\n padding-right: 35px;\n padding-left: 16px;\n line-height: 40px;\n height: 40px;\n border: 1px solid #CCC;\n border-radius: 3px;\n outline: none;\n font: inherit;\n appearance: none;\n -webkit-appearance: none;\n box-sizing: border-box;\n}\n\n.ap-input::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n.ap-input::-ms-clear {\n display: none;\n}\n\n.ap-input:hover ~ .ap-input-icon svg,\n.ap-input:focus ~ .ap-input-icon svg,\n.ap-input-icon:hover svg {\n fill: #aaaaaa;\n}\n\n.ap-dropdown-menu {\n width: 100%;\n background: #ffffff;\n box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n margin-top: 3px;\n overflow: hidden;\n}\n\n.ap-suggestion {\n cursor: pointer;\n height: 46px;\n line-height: 46px;\n padding-left: 18px;\n overflow: hidden;\n}\n\n.ap-suggestion em {\n font-weight: bold;\n font-style: normal;\n}\n\n.ap-address {\n font-size: smaller;\n margin-left: 12px;\n color: #aaaaaa;\n}\n\n.ap-suggestion-icon {\n margin-right: 10px;\n width: 14px;\n height: 20px;\n vertical-align: middle;\n}\n\n.ap-suggestion-icon svg {\n -webkit-transform: scale(0.9) translateY(2px);\n transform: scale(0.9) translateY(2px);\n fill: #cfcfcf;\n}\n\n.ap-input-icon {\n border: 0;\n background: transparent;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 16px;\n outline: none;\n}\n\n.ap-input-icon.ap-icon-pin {\n cursor: initial;\n}\n\n.ap-input-icon svg {\n fill: #cfcfcf;\n position: absolute;\n top: 50%;\n right: 0;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ap-cursor {\n background: #efefef;\n}\n\n.ap-cursor .ap-suggestion-icon svg {\n -webkit-transform: scale(1) translateY(2px);\n transform: scale(1) translateY(2px);\n fill: #aaaaaa;\n}\n\n.ap-footer {\n opacity: .8;\n text-align: right;\n padding: .5em 1em .5em 0;\n font-size: 12px;\n line-height: 12px;\n}\n\n.ap-footer a {\n color: inherit;\n text-decoration: none;\n}\n\n.ap-footer a svg {\n vertical-align: middle;\n}\n\n.ap-footer:hover {\n opacity: 1;\n}\n"},26:function(n,t){var c=[],s=[];function e(n,t){if(t=t||{},void 0===n)throw new Error("insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).");var e,o,a=!0===t.prepend?"prepend":"append",r=void 0!==t.container?t.container:document.querySelector("head"),i=c.indexOf(r);return-1===i&&(i=c.push(r)-1,s[i]={}),void 0!==s[i]&&void 0!==s[i][a]?e=s[i][a]:(e=s[i][a]=((o=document.createElement("style")).setAttribute("type","text/css"),o),"prepend"===a?r.insertBefore(e,r.childNodes[0]):r.appendChild(e)),65279===n.charCodeAt(0)&&(n=n.substr(1,n.length)),e.styleSheet?e.styleSheet.cssText+=n:e.textContent+=n,e}n.exports=e,n.exports.insertCss=e},27:function(n,t,e){"use strict";e.r(t);var I=e(1),_=e(9),k=e(6);function B(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.forEach(function(n){a(t,n,e[n])})}return t}function a(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var o=e(8);function r(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.forEach(function(n){i(t,n,e[n])})}return t}function i(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function c(n){var t=r({},o.a,n.templates);return{source:function(n){var t=n.algoliasearch,e=n.clientOptions,o=n.apiKey,a=n.appId,r=n.hitsPerPage,i=n.aroundLatLng,c=n.aroundRadius,s=n.aroundLatLngViaIP,u=n.insideBoundingBox,l=n.insidePolygon,p=n.getRankingInfo,d=n.countries,h=n.formatInputValue,g=n.computeQueryParams,v=void 0===g?function(n){return n}:g,f=n.useDeviceLocation,m=void 0!==f&&f,w=n.language,y=void 0===w?navigator.language.split("-")[0]:w,b=n.onHits,x=void 0===b?function(){}:b,z=n.onError,P=void 0===z?function(n){throw n}:z,L=n.onRateLimitReached,O=n.type,V=t.initPlaces(a,o,e);V.as.addAlgoliaAgent("Algolia Places ".concat(k.default));var j,S=Object(I.a)({hitsPerPage:r,type:O,countries:d,language:y,aroundLatLng:i,aroundRadius:c,aroundLatLngViaIP:s,insideBoundingBox:u,insidePolygon:l,getRankingInfo:p,formatInputValue:h,computeQueryParams:v,useDeviceLocation:m,onHits:x,onError:P,onRateLimitReached:L}),H=S.params,M=S.controls,R=null;function C(o,n){var t=B({},H,{query:o});return j&&(t.aroundLatLng=j),V.search(M.computeQueryParams(t)).then(function(e){var n=e.hits.map(function(n,t){return Object(_.a)({formatInputValue:M.formatInputValue,hit:n,hitIndex:t,query:o,rawAnswer:e})});return M.onHits({hits:n,query:o,rawAnswer:e}),n}).then(n).catch(function(n){429!==n.statusCode?M.onError(n):M.onRateLimitReached()})}return M.useDeviceLocation&&(R=navigator.geolocation.watchPosition(function(n){var t=n.coords;j="".concat(t.latitude,",").concat(t.longitude)})),C.configure=function(n){var t=Object(I.a)(B({},H,M,n));H=t.params,(M=t.controls).useDeviceLocation&&null===R?R=navigator.geolocation.watchPosition(function(n){var t=n.coords;j="".concat(t.latitude,",").concat(t.longitude)}):M.useDeviceLocation||null===R||(navigator.geolocation.clearWatch(R),j=R=null)},C}(r({},n,{formatInputValue:t.value,templates:void 0})),templates:t,displayKey:"value",name:"places",cache:!1}}e.d(t,"default",function(){return c})},37:function(n,t){"language"in navigator||(navigator.language=navigator.userLanguage&&navigator.userLanguage.replace(/-[a-z]{2}$/,String.prototype.toUpperCase)||"en-US")},6:function(n,t,e){"use strict";e.r(t),t.default="1.16.1"},7:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 14 20"><path d="M7 0C3.13 0 0 3.13 0 7c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5C5.62 9.5 4.5 8.38 4.5 7S5.62 4.5 7 4.5 9.5 5.62 9.5 7 8.38 9.5 7 9.5z"/></svg>\n'},78:function(n,t,e){e(37);var o=e(27).default,a=e(25);e(26)(a,{prepend:!0}),n.exports=o},8:function(n,t,e){"use strict";var o=e(7),a=e.n(o),r=e(15),i=e.n(r),c=e(16),s=e.n(c),u=e(17),l=e.n(u),p=e(18),d=e.n(p),h=e(19),g=e.n(h),v=e(20),f=e.n(v),m={address:a.a,city:i.a,country:s.a,busStop:l.a,trainStation:d.a,townhall:g.a,airport:f.a};var w=e(21),y=e.n(w),b=e(22),x=e.n(b);t.a={footer:'<div class="ap-footer">\n <a href="https://www.algolia.com/places" title="Search by Algolia" class="ap-footer-algolia">'.concat(y.a.trim(),'</a>\n using <a href="https://community.algolia.com/places/documentation.html#license" class="ap-footer-osm" title="Algolia Places data © OpenStreetMap contributors">').concat(x.a.trim()," <span>data</span></a>\n </div>"),value:function(n){var t=n.administrative,e=n.city,o=n.country,a=n.name,r=n.type;return"".concat(a).concat("country"!==r&&void 0!==o?",":"","\n ").concat(e?"".concat(e,","):"","\n ").concat(t?"".concat(t,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()},suggestion:function(n){var t=n.type,e=n.highlight,o=e.name,a=e.administrative,r=e.city,i=e.country;return'<span class="ap-suggestion-icon">'.concat(m[t].trim(),'</span>\n<span class="ap-name">').concat(o,'</span>\n<span class="ap-address">\n ').concat([r,a,i].filter(function(n){return void 0!==n}).join(", "),"</span>").replace(/\s*\n\s*/g," ")}}},9:function(n,t,e){"use strict";function m(n){for(var t=n[0].value,e=[],o=1;o<n.length;++o)"none"!==n[o].matchLevel&&e.push({index:o,words:n[o].matchedWords});return 0===e.length?t:(e.sort(function(n,t){return n.words>t.words?-1:n.words<t.words?1:n.index-t.index}),0===e[0].index?"".concat(t," (").concat(n[e[1].index].value,")"):"".concat(n[e[0].index].value," (").concat(t,")"))}function o(n){var t=n.formatInputValue,e=n.hit,o=n.hitIndex,a=n.query,r=n.rawAnswer;try{var i=e.locale_names[0],c=e.country,s=e.administrative&&e.administrative[0]!==i?e.administrative[0]:void 0,u=e.city&&e.city[0]!==i?e.city[0]:void 0,l=e.suburb&&e.suburb[0]!==i?e.suburb[0]:void 0,p=e.county&&e.county[0]!==i?e.county[0]:void 0,d=e.postcode?function(n,t){for(var e=t[0].value,o=[],a=1;a<t.length;++a)"none"!==t[a].matchLevel&&o.push({index:a,words:t[a].matchedWords});return 0===o.length?{postcode:n[0],highlightedPostcode:e}:(o.sort(function(n,t){return n.words>t.words?-1:n.words<t.words?1:n.index-t.index}),{postcode:n[o[0].index],highlightedPostcode:t[o[0].index].value})}(e.postcode,e._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},h=d.postcode,g=d.highlightedPostcode,v={name:m(e._highlightResult.locale_names),city:u?m(e._highlightResult.city):void 0,administrative:s?m(e._highlightResult.administrative):void 0,country:c?e._highlightResult.country.value:void 0,suburb:l?m(e._highlightResult.suburb):void 0,county:p?m(e._highlightResult.county):void 0,postcode:g},f={name:i,administrative:s,county:p,city:u,suburb:l,country:c,countryCode:function(n){for(var t=0;t<n.length;t++){var e=n[t].match(/country\/(.*)?/);if(e)return e[1]}}(e._tags),type:function(n){var t={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var e in t)if(-1!==n.indexOf(e))return t[e];return"address"}(e._tags),latlng:{lat:e._geoloc.lat,lng:e._geoloc.lng},postcode:h,postcodes:e.postcode?e.postcode:void 0};return function(a){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.forEach(function(n){var t,e,o;t=a,o=r[e=n],e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o})}return a}({},f,{highlight:v,hit:e,hitIndex:o,query:a,rawAnswer:r,value:t(f)})}catch(n){return console.error("Could not parse object",e),console.error(n),{value:"Could not parse object"}}}e.d(t,"a",function(){return o})}})});
3
- //# sourceMappingURL=placesAutocompleteDataset.min.js.map
1
  /*! 1.16.1 | ? Algolia | https://www.jsdelivr.com/package/npm/places.js?path=dist%2Fcdn */
2
  !function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.placesAutocompleteDataset=t():n.placesAutocompleteDataset=t()}(window,function(){return function(e){var o={};function a(n){if(o[n])return o[n].exports;var t=o[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=e,a.c=o,a.d=function(n,t,e){a.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:e})},a.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},a.t=function(t,n){if(1&n&&(t=a(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(a.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)a.d(e,o,function(n){return t[n]}.bind(null,o));return e},a.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return a.d(t,"a",t),t},a.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},a.p="",a(a.s=78)}({1:function(n,t,e){"use strict";function z(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.forEach(function(n){a(t,n,e[n])})}return t}function a(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var P={},L={};t.a=function(n){var t,e,o,a,r,i,c,s,u,l,p,d,h,g,v,f,m,w,y,b,x;return t=z({},P,n),e=t.hitsPerPage,o=t.aroundLatLng,a=t.aroundRadius,r=t.aroundLatLngViaIP,i=t.insideBoundingBox,c=t.insidePolygon,s=t.getRankingInfo,u=t.countries,l=t.language,p=t.type,d={countries:u,hitsPerPage:e||5,language:l||navigator.language.split("-")[0],type:p},Array.isArray(u)&&(d.countries=d.countries.map(function(n){return n.toLowerCase()})),"string"==typeof d.language&&(d.language=d.language.toLowerCase()),o?d.aroundLatLng=o:void 0!==r&&(d.aroundLatLngViaIP=r),P=z({},d,{aroundRadius:a,insideBoundingBox:i,insidePolygon:c,getRankingInfo:s}),h=z({},L,n),g=h.useDeviceLocation,v=void 0!==g&&g,f=h.computeQueryParams,m=void 0===f?function(n){return n}:f,w=h.formatInputValue,y=h.onHits,b=void 0===y?function(){}:y,x=h.onError,L={useDeviceLocation:v,computeQueryParams:m,formatInputValue:w,onHits:b,onError:void 0===x?function(n){throw n}:x,onRateLimitReached:h.onRateLimitReached},{params:P,controls:L}}},15:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 18 19"><path d="M12 9V3L9 0 6 3v2H0v14h18V9h-6zm-8 8H2v-2h2v2zm0-4H2v-2h2v2zm0-4H2V7h2v2zm6 8H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V7h2v2zm0-4H8V3h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"/></svg>\n'},16:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0zM9 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L7 13v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H6V8h2c.55 0 1-.45 1-1V5h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>\n</svg>\n'},17:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 54.9 50.5"><path d="M9.6 12.7H8.5c-2.3 0-4.1 1.9-4.1 4.1v1.1c0 2.2 1.8 4 4 4.1v21.7h-.7c-1.3 0-2.3 1-2.3 2.3h7.1c0-1.3-1-2.3-2.3-2.3h-.5V22.1c2.2-.1 4-1.9 4-4.1v-1.1c0-2.3-1.8-4.2-4.1-4.2zM46 7.6h-7.5c0-1.8-1.5-3.3-3.3-3.3h-3.6c-1.8 0-3.3 1.5-3.3 3.3H21c-2.5 0-4.6 2-4.6 4.6v26.3c0 1.7 1.3 3.1 3 3.1h.8v1.6c0 1.7 1.4 3.1 3.1 3.1 1.7 0 3-1.4 3-3.1v-1.6h14.3v1.6c0 1.7 1.4 3.1 3.1 3.1 1.7 0 3.1-1.4 3.1-3.1v-1.6h.8c1.7 0 3.1-1.4 3.1-3.1V12.2c-.2-2.5-2.2-4.6-4.7-4.6zm-27.4 4.6c0-1.3 1.1-2.4 2.4-2.4h25c1.3 0 2.4 1.1 2.4 2.4v.3c0 1.3-1.1 2.4-2.4 2.4H21c-1.3 0-2.4-1.1-2.4-2.4v-.3zM21 38c-1.5 0-2.7-1.2-2.7-2.7 0-1.5 1.2-2.7 2.7-2.7 1.5 0 2.7 1.2 2.7 2.7 0 1.5-1.2 2.7-2.7 2.7zm0-10.1c-1.3 0-2.4-1.1-2.4-2.4v-6.6c0-1.3 1.1-2.4 2.4-2.4h25c1.3 0 2.4 1.1 2.4 2.4v6.6c0 1.3-1.1 2.4-2.4 2.4H21zm24.8 10c-1.5 0-2.7-1.2-2.7-2.7 0-1.5 1.2-2.7 2.7-2.7 1.5 0 2.7 1.2 2.7 2.7 0 1.5-1.2 2.7-2.7 2.7z"/></svg>\n'},18:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 20">\n <path d="M13.105 20l-2.366-3.354H4.26L1.907 20H0l3.297-4.787c-1.1-.177-2.196-1.287-2.194-2.642V2.68C1.1 1.28 2.317-.002 3.973 0h7.065c1.647-.002 2.863 1.28 2.86 2.676v9.895c.003 1.36-1.094 2.47-2.194 2.647L15 20h-1.895zM6.11 2h2.78c.264 0 .472-.123.472-.27v-.46c0-.147-.22-.268-.472-.27H6.11c-.252.002-.47.123-.47.27v.46c0 .146.206.27.47.27zm6.26 3.952V4.175c-.004-.74-.5-1.387-1.436-1.388H4.066c-.936 0-1.43.648-1.436 1.388v1.777c-.002.86.644 1.384 1.436 1.388h6.868c.793-.004 1.44-.528 1.436-1.388zm-8.465 5.386c-.69-.003-1.254.54-1.252 1.21-.002.673.56 1.217 1.252 1.222.697-.006 1.26-.55 1.262-1.22-.002-.672-.565-1.215-1.262-1.212zm8.42 1.21c-.005-.67-.567-1.213-1.265-1.21-.69-.003-1.253.54-1.25 1.21-.003.673.56 1.217 1.25 1.222.698-.006 1.26-.55 1.264-1.22z"/>\n</svg>\n'},19:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M12 .6L2.5 6.9h18.9L12 .6zM3.8 8.2c-.7 0-1.3.6-1.3 1.3v8.8L.3 22.1c-.2.3-.3.5-.3.6 0 .6.8.6 1.3.6h21.5c.4 0 1.3 0 1.3-.6 0-.2-.1-.3-.3-.6l-2.2-3.8V9.5c0-.7-.6-1.3-1.3-1.3H3.8zm2.5 2.5c.7 0 1.1.6 1.3 1.3v7.6H5.1V12c0-.7.5-1.3 1.2-1.3zm5.7 0c.7 0 1.3.6 1.3 1.3v7.6h-2.5V12c-.1-.7.5-1.3 1.2-1.3zm5.7 0c.7 0 1.3.6 1.3 1.3v7.6h-2.5V12c-.1-.7.5-1.3 1.2-1.3z"/></svg>\n'},20:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M22.9 1.1s1.3.3-4.3 6.5l.7 3.8.2-.2c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l-1.2 1.2.3 1.7.1-.1c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l-1.1 1.1c.2 1.9.3 3.6.1 4.5 0 0-1.2 1.2-1.8.5 0 0-2.3-7.7-3.8-11.1-5.9 6-6.4 5.6-6.4 5.6s1.2 3.8-.2 5.2l-2.3-4.3h.1l-4.3-2.3c1.3-1.3 5.2-.2 5.2-.2s-.5-.4 5.6-6.3C8.9 7.7 1.2 5.5 1.2 5.5c-.7-.7.5-1.8.5-1.8.9-.2 2.6-.1 4.5.1l1.1-1.1c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l1.7.3 1.2-1.2c.4-.4 1-.4 1.3 0 .4.4.4 1 0 1.3l-.2.2 3.8.7c6.2-5.5 6.5-4.2 6.5-4.2z"/></svg>\n'},21:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="117" height="17" viewBox="0 0 130 19"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path fill="#5468FF" d="M59.399.044h13.299a2.372 2.372 0 0 1 2.377 2.364v13.234a2.372 2.372 0 0 1-2.377 2.364H59.399a2.372 2.372 0 0 1-2.377-2.364V2.403A2.368 2.368 0 0 1 59.399.044z"/><path fill="#FFF" d="M66.257 4.582c-2.815 0-5.1 2.272-5.1 5.078 0 2.806 2.284 5.072 5.1 5.072 2.815 0 5.1-2.272 5.1-5.078 0-2.806-2.279-5.072-5.1-5.072zm0 8.652c-1.983 0-3.593-1.602-3.593-3.574 0-1.972 1.61-3.574 3.593-3.574 1.983 0 3.593 1.602 3.593 3.574a3.582 3.582 0 0 1-3.593 3.574zm0-6.418V9.48c0 .076.082.131.153.093l2.377-1.226c.055-.027.071-.093.044-.147a2.96 2.96 0 0 0-2.465-1.487c-.055 0-.11.044-.11.104h.001zm-3.33-1.956l-.312-.31a.783.783 0 0 0-1.106 0l-.372.37a.773.773 0 0 0 0 1.1l.307.305c.049.05.121.038.164-.01.181-.246.378-.48.597-.698.225-.223.455-.42.707-.599.055-.033.06-.109.016-.158h-.001zm5.001-.806v-.616a.781.781 0 0 0-.783-.779h-1.824a.78.78 0 0 0-.783.78v.631c0 .071.066.12.137.104a5.736 5.736 0 0 1 1.588-.223c.52 0 1.035.071 1.534.207a.106.106 0 0 0 .131-.104z"/><path fill="#252C61" d="M5.027 10.246c0 .698-.252 1.246-.757 1.644-.505.397-1.201.596-2.089.596-.888 0-1.615-.138-2.181-.414v-1.214c.358.168.739.301 1.141.397.403.097.778.145 1.125.145.508 0 .884-.097 1.125-.29a.945.945 0 0 0 .363-.779.978.978 0 0 0-.333-.747c-.222-.204-.68-.446-1.375-.725C1.33 8.57.825 8.24.531 7.865c-.294-.372-.44-.82-.44-1.343 0-.655.233-1.17.698-1.547.465-.376 1.09-.564 1.875-.564.752 0 1.5.165 2.245.494l-.408 1.047c-.698-.294-1.321-.44-1.869-.44-.415 0-.73.09-.945.271a.89.89 0 0 0-.322.717c0 .204.043.38.129.524.086.145.227.282.424.411.197.13.551.3 1.063.51.577.24.999.464 1.268.671.269.208.465.442.591.704.125.261.188.57.188.924l-.001.002zm3.98 2.24c-.924 0-1.646-.269-2.167-.808-.521-.539-.781-1.28-.781-2.226 0-.97.242-1.733.725-2.288.483-.555 1.148-.833 1.993-.833.784 0 1.404.238 1.858.714.455.476.682 1.132.682 1.966v.682H7.359c.018.577.174 1.02.467 1.33.294.31.707.464 1.241.464.351 0 .678-.033.98-.099a5.1 5.1 0 0 0 .975-.33v1.026a3.865 3.865 0 0 1-.935.312 5.723 5.723 0 0 1-1.08.091zm7.46-.107l-.252-.827h-.043c-.286.362-.575.608-.865.74-.29.13-.662.195-1.117.195-.584 0-1.039-.158-1.367-.473-.328-.315-.491-.76-.491-1.337 0-.612.227-1.074.682-1.386.455-.312 1.148-.482 2.079-.51l1.026-.032v-.317c0-.38-.089-.663-.266-.85-.177-.189-.452-.283-.824-.283-.304 0-.596.045-.875.134a6.68 6.68 0 0 0-.806.317l-.408-.902a4.414 4.414 0 0 1 1.058-.384 4.856 4.856 0 0 1 1.085-.132c.756 0 1.326.165 1.711.494.385.33.577.847.577 1.552v4.001h-.904zm5.677-6.048c.254 0 .464.018.628.054l-.124 1.176a2.383 2.383 0 0 0-.559-.064c-.505 0-.914.165-1.227.494-.313.33-.47.757-.47 1.284v3.104H19.13V6.44h.988l.167 1.047h.064c.197-.354.454-.636.771-.843a1.83 1.83 0 0 1 1.023-.312h.001zm4.125 6.155c-.899 0-1.582-.262-2.049-.787-.467-.525-.701-1.277-.701-2.259 0-.999.244-1.767.733-2.304.489-.537 1.195-.806 2.119-.806.627 0 1.191.116 1.692.35l-.381 1.014c-.534-.208-.974-.312-1.321-.312-1.028 0-1.542.682-1.542 2.046 0 .666.128 1.166.384 1.501.256.335.631.502 1.125.502a3.23 3.23 0 0 0 1.595-.419v1.101a2.53 2.53 0 0 1-.722.285 4.356 4.356 0 0 1-.932.086v.002zm8.277-.107h-1.268V8.727c0-.458-.092-.8-.277-1.026-.184-.226-.477-.338-.878-.338-.53 0-.919.158-1.168.475-.249.317-.373.848-.373 1.593v2.95H29.32V4.022h1.262v2.122c0 .34-.021.704-.064 1.09h.081a1.76 1.76 0 0 1 .717-.666c.306-.158.663-.236 1.072-.236 1.439 0 2.159.725 2.159 2.175v3.873l-.001-.002zm7.648-6.048c.741 0 1.319.27 1.732.806.414.537.62 1.291.62 2.261 0 .974-.209 1.732-.628 2.275-.419.542-1.001.814-1.746.814-.752 0-1.336-.27-1.751-.81h-.086l-.231.703h-.945V4.023h1.262V6.01l-.021.655-.032.553h.054c.401-.59.992-.886 1.772-.886zm2.917.107h1.375l1.208 3.368c.183.48.304.931.365 1.354h.043c.032-.197.091-.436.177-.717.086-.28.541-1.616 1.364-4.004h1.364l-2.541 6.73c-.462 1.235-1.232 1.853-2.31 1.853-.279 0-.551-.03-.816-.09v-1c.19.043.406.064.65.064.609 0 1.037-.353 1.284-1.058l.22-.559-2.385-5.94h.002zm-3.244.924c-.508 0-.875.15-1.098.448-.224.3-.339.8-.346 1.501v.086c0 .723.115 1.247.344 1.571.229.324.603.486 1.123.486.448 0 .787-.177 1.018-.532.231-.354.346-.867.346-1.536 0-1.35-.462-2.025-1.386-2.025l-.001.001zm-27.28 4.157c.458 0 .826-.128 1.104-.384.278-.256.416-.615.416-1.077v-.516l-.763.032c-.594.021-1.027.121-1.297.298s-.406.448-.406.814c0 .265.079.47.236.615.158.145.394.218.709.218h.001zM8.775 7.287c-.401 0-.722.127-.964.381s-.386.625-.432 1.112h2.696c-.007-.49-.125-.862-.354-1.115-.229-.252-.544-.379-.945-.379l-.001.001z"/></g><path fill="#5468FF" d="M102.162 13.784c0 1.455-.372 2.517-1.123 3.193-.75.676-1.895 1.013-3.44 1.013-.564 0-1.736-.109-2.673-.316l.345-1.689c.783.163 1.819.207 2.361.207.86 0 1.473-.174 1.84-.523.367-.349.548-.866.548-1.553v-.349a6.374 6.374 0 0 1-.838.316 4.151 4.151 0 0 1-1.194.158 4.515 4.515 0 0 1-1.616-.278 3.385 3.385 0 0 1-1.254-.817 3.744 3.744 0 0 1-.811-1.35c-.192-.54-.29-1.505-.29-2.213 0-.665.104-1.498.307-2.054a3.925 3.925 0 0 1 .904-1.433 4.124 4.124 0 0 1 1.441-.926 5.31 5.31 0 0 1 1.945-.365c.696 0 1.337.087 1.961.191a15.86 15.86 0 0 1 1.588.332v8.456h-.001zm-5.955-4.206c0 .893.197 1.885.592 2.3.394.413.904.62 1.528.62.34 0 .663-.049.964-.142a2.75 2.75 0 0 0 .734-.332v-5.29a8.531 8.531 0 0 0-1.413-.18c-.778-.022-1.369.294-1.786.801-.411.507-.619 1.395-.619 2.223zm16.121 0c0 .72-.104 1.264-.318 1.858a4.389 4.389 0 0 1-.904 1.52c-.389.42-.854.746-1.402.975-.548.23-1.391.36-1.813.36-.422-.005-1.26-.125-1.802-.36a4.088 4.088 0 0 1-1.397-.975 4.486 4.486 0 0 1-.909-1.52 5.037 5.037 0 0 1-.329-1.858c0-.719.099-1.41.318-1.999.219-.588.526-1.09.92-1.509.394-.42.865-.74 1.402-.97a4.547 4.547 0 0 1 1.786-.338 4.69 4.69 0 0 1 1.791.338c.548.23 1.019.55 1.402.97.389.42.69.921.909 1.51.23.587.345 1.28.345 1.998h.001zm-2.192.005c0-.92-.203-1.689-.597-2.223-.394-.539-.948-.806-1.654-.806-.707 0-1.26.267-1.654.806-.394.54-.586 1.302-.586 2.223 0 .932.197 1.558.592 2.098.394.545.948.812 1.654.812.707 0 1.26-.272 1.654-.812.394-.545.592-1.166.592-2.098h-.001zm6.963 4.708c-3.511.016-3.511-2.822-3.511-3.274L113.583.95l2.142-.338v10.003c0 .256 0 1.88 1.375 1.885v1.793h-.001zM120.873 14.291h-2.153V5.095l2.153-.338zM119.794 3.75c.718 0 1.304-.579 1.304-1.292 0-.714-.581-1.29-1.304-1.29-.723 0-1.304.577-1.304 1.29 0 .714.586 1.291 1.304 1.291zm6.431 1.012c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.285.311.488.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.263.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a9.335 9.335 0 0 1 1.66-.142h-.001zm.179 7.73c.657 0 1.145-.038 1.484-.104V10.22a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.17-.175.267-.175.523 0 .501.175.79.493.981.323.196.75.29 1.293.29h.001zM84.108 4.816c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.29.316.487.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.257.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a8.89 8.89 0 0 1 1.66-.142h-.001zm.185 7.736c.657 0 1.145-.038 1.484-.104V10.28a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.17-.175.267-.175.523 0 .501.175.79.493.981.318.191.75.29 1.293.29h.001zm8.683 1.738c-3.511.016-3.511-2.822-3.511-3.274L89.46.948 91.602.61v10.003c0 .256 0 1.88 1.375 1.885v1.793h-.001z"/></g></svg>'},22:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12">\n <path fill="#797979" fill-rule="evenodd" d="M6.577.5L5.304.005 2.627 1.02 0 0l.992 2.767-.986 2.685.998 2.76-1 2.717.613.22 3.39-3.45.563.06.726-.69s-.717-.92-.91-1.86c.193-.146.184-.14.355-.285C4.1 1.93 6.58.5 6.58.5zm-4.17 11.354l.22.12 2.68-1.05 2.62 1.04 2.644-1.03 1.02-2.717-.33-.944s-1.13 1.26-3.44.878c-.174.29-.25.37-.25.37s-1.11-.31-1.683-.89c-.573.58-.795.71-.795.71l.08.634-2.76 2.89zm6.26-4.395c1.817 0 3.29-1.53 3.29-3.4 0-1.88-1.473-3.4-3.29-3.4s-3.29 1.52-3.29 3.4c0 1.87 1.473 3.4 3.29 3.4z"/>\n</svg>\n'},25:function(n,t){n.exports=".algolia-places {\n width: 100%;\n}\n\n.ap-input, .ap-hint {\n width: 100%;\n padding-right: 35px;\n padding-left: 16px;\n line-height: 40px;\n height: 40px;\n border: 1px solid #CCC;\n border-radius: 3px;\n outline: none;\n font: inherit;\n appearance: none;\n -webkit-appearance: none;\n box-sizing: border-box;\n}\n\n.ap-input::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n.ap-input::-ms-clear {\n display: none;\n}\n\n.ap-input:hover ~ .ap-input-icon svg,\n.ap-input:focus ~ .ap-input-icon svg,\n.ap-input-icon:hover svg {\n fill: #aaaaaa;\n}\n\n.ap-dropdown-menu {\n width: 100%;\n background: #ffffff;\n box-shadow: 0 1px 10px rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n margin-top: 3px;\n overflow: hidden;\n}\n\n.ap-suggestion {\n cursor: pointer;\n height: 46px;\n line-height: 46px;\n padding-left: 18px;\n overflow: hidden;\n}\n\n.ap-suggestion em {\n font-weight: bold;\n font-style: normal;\n}\n\n.ap-address {\n font-size: smaller;\n margin-left: 12px;\n color: #aaaaaa;\n}\n\n.ap-suggestion-icon {\n margin-right: 10px;\n width: 14px;\n height: 20px;\n vertical-align: middle;\n}\n\n.ap-suggestion-icon svg {\n -webkit-transform: scale(0.9) translateY(2px);\n transform: scale(0.9) translateY(2px);\n fill: #cfcfcf;\n}\n\n.ap-input-icon {\n border: 0;\n background: transparent;\n position: absolute;\n top: 0;\n bottom: 0;\n right: 16px;\n outline: none;\n}\n\n.ap-input-icon.ap-icon-pin {\n cursor: initial;\n}\n\n.ap-input-icon svg {\n fill: #cfcfcf;\n position: absolute;\n top: 50%;\n right: 0;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ap-cursor {\n background: #efefef;\n}\n\n.ap-cursor .ap-suggestion-icon svg {\n -webkit-transform: scale(1) translateY(2px);\n transform: scale(1) translateY(2px);\n fill: #aaaaaa;\n}\n\n.ap-footer {\n opacity: .8;\n text-align: right;\n padding: .5em 1em .5em 0;\n font-size: 12px;\n line-height: 12px;\n}\n\n.ap-footer a {\n color: inherit;\n text-decoration: none;\n}\n\n.ap-footer a svg {\n vertical-align: middle;\n}\n\n.ap-footer:hover {\n opacity: 1;\n}\n"},26:function(n,t){var c=[],s=[];function e(n,t){if(t=t||{},void 0===n)throw new Error("insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).");var e,o,a=!0===t.prepend?"prepend":"append",r=void 0!==t.container?t.container:document.querySelector("head"),i=c.indexOf(r);return-1===i&&(i=c.push(r)-1,s[i]={}),void 0!==s[i]&&void 0!==s[i][a]?e=s[i][a]:(e=s[i][a]=((o=document.createElement("style")).setAttribute("type","text/css"),o),"prepend"===a?r.insertBefore(e,r.childNodes[0]):r.appendChild(e)),65279===n.charCodeAt(0)&&(n=n.substr(1,n.length)),e.styleSheet?e.styleSheet.cssText+=n:e.textContent+=n,e}n.exports=e,n.exports.insertCss=e},27:function(n,t,e){"use strict";e.r(t);var I=e(1),_=e(9),k=e(6);function B(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.forEach(function(n){a(t,n,e[n])})}return t}function a(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var o=e(8);function r(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.forEach(function(n){i(t,n,e[n])})}return t}function i(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function c(n){var t=r({},o.a,n.templates);return{source:function(n){var t=n.algoliasearch,e=n.clientOptions,o=n.apiKey,a=n.appId,r=n.hitsPerPage,i=n.aroundLatLng,c=n.aroundRadius,s=n.aroundLatLngViaIP,u=n.insideBoundingBox,l=n.insidePolygon,p=n.getRankingInfo,d=n.countries,h=n.formatInputValue,g=n.computeQueryParams,v=void 0===g?function(n){return n}:g,f=n.useDeviceLocation,m=void 0!==f&&f,w=n.language,y=void 0===w?navigator.language.split("-")[0]:w,b=n.onHits,x=void 0===b?function(){}:b,z=n.onError,P=void 0===z?function(n){throw n}:z,L=n.onRateLimitReached,O=n.type,V=t.initPlaces(a,o,e);V.as.addAlgoliaAgent("Algolia Places ".concat(k.default));var j,S=Object(I.a)({hitsPerPage:r,type:O,countries:d,language:y,aroundLatLng:i,aroundRadius:c,aroundLatLngViaIP:s,insideBoundingBox:u,insidePolygon:l,getRankingInfo:p,formatInputValue:h,computeQueryParams:v,useDeviceLocation:m,onHits:x,onError:P,onRateLimitReached:L}),H=S.params,M=S.controls,R=null;function C(o,n){var t=B({},H,{query:o});return j&&(t.aroundLatLng=j),V.search(M.computeQueryParams(t)).then(function(e){var n=e.hits.map(function(n,t){return Object(_.a)({formatInputValue:M.formatInputValue,hit:n,hitIndex:t,query:o,rawAnswer:e})});return M.onHits({hits:n,query:o,rawAnswer:e}),n}).then(n).catch(function(n){429!==n.statusCode?M.onError(n):M.onRateLimitReached()})}return M.useDeviceLocation&&(R=navigator.geolocation.watchPosition(function(n){var t=n.coords;j="".concat(t.latitude,",").concat(t.longitude)})),C.configure=function(n){var t=Object(I.a)(B({},H,M,n));H=t.params,(M=t.controls).useDeviceLocation&&null===R?R=navigator.geolocation.watchPosition(function(n){var t=n.coords;j="".concat(t.latitude,",").concat(t.longitude)}):M.useDeviceLocation||null===R||(navigator.geolocation.clearWatch(R),j=R=null)},C}(r({},n,{formatInputValue:t.value,templates:void 0})),templates:t,displayKey:"value",name:"places",cache:!1}}e.d(t,"default",function(){return c})},37:function(n,t){"language"in navigator||(navigator.language=navigator.userLanguage&&navigator.userLanguage.replace(/-[a-z]{2}$/,String.prototype.toUpperCase)||"en-US")},6:function(n,t,e){"use strict";e.r(t),t.default="1.16.1"},7:function(n,t){n.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 14 20"><path d="M7 0C3.13 0 0 3.13 0 7c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5C5.62 9.5 4.5 8.38 4.5 7S5.62 4.5 7 4.5 9.5 5.62 9.5 7 8.38 9.5 7 9.5z"/></svg>\n'},78:function(n,t,e){e(37);var o=e(27).default,a=e(25);e(26)(a,{prepend:!0}),n.exports=o},8:function(n,t,e){"use strict";var o=e(7),a=e.n(o),r=e(15),i=e.n(r),c=e(16),s=e.n(c),u=e(17),l=e.n(u),p=e(18),d=e.n(p),h=e(19),g=e.n(h),v=e(20),f=e.n(v),m={address:a.a,city:i.a,country:s.a,busStop:l.a,trainStation:d.a,townhall:g.a,airport:f.a};var w=e(21),y=e.n(w),b=e(22),x=e.n(b);t.a={footer:'<div class="ap-footer">\n <a href="https://www.algolia.com/places" title="Search by Algolia" class="ap-footer-algolia">'.concat(y.a.trim(),'</a>\n using <a href="https://community.algolia.com/places/documentation.html#license" class="ap-footer-osm" title="Algolia Places data © OpenStreetMap contributors">').concat(x.a.trim()," <span>data</span></a>\n </div>"),value:function(n){var t=n.administrative,e=n.city,o=n.country,a=n.name,r=n.type;return"".concat(a).concat("country"!==r&&void 0!==o?",":"","\n ").concat(e?"".concat(e,","):"","\n ").concat(t?"".concat(t,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()},suggestion:function(n){var t=n.type,e=n.highlight,o=e.name,a=e.administrative,r=e.city,i=e.country;return'<span class="ap-suggestion-icon">'.concat(m[t].trim(),'</span>\n<span class="ap-name">').concat(o,'</span>\n<span class="ap-address">\n ').concat([r,a,i].filter(function(n){return void 0!==n}).join(", "),"</span>").replace(/\s*\n\s*/g," ")}}},9:function(n,t,e){"use strict";function m(n){for(var t=n[0].value,e=[],o=1;o<n.length;++o)"none"!==n[o].matchLevel&&e.push({index:o,words:n[o].matchedWords});return 0===e.length?t:(e.sort(function(n,t){return n.words>t.words?-1:n.words<t.words?1:n.index-t.index}),0===e[0].index?"".concat(t," (").concat(n[e[1].index].value,")"):"".concat(n[e[0].index].value," (").concat(t,")"))}function o(n){var t=n.formatInputValue,e=n.hit,o=n.hitIndex,a=n.query,r=n.rawAnswer;try{var i=e.locale_names[0],c=e.country,s=e.administrative&&e.administrative[0]!==i?e.administrative[0]:void 0,u=e.city&&e.city[0]!==i?e.city[0]:void 0,l=e.suburb&&e.suburb[0]!==i?e.suburb[0]:void 0,p=e.county&&e.county[0]!==i?e.county[0]:void 0,d=e.postcode?function(n,t){for(var e=t[0].value,o=[],a=1;a<t.length;++a)"none"!==t[a].matchLevel&&o.push({index:a,words:t[a].matchedWords});return 0===o.length?{postcode:n[0],highlightedPostcode:e}:(o.sort(function(n,t){return n.words>t.words?-1:n.words<t.words?1:n.index-t.index}),{postcode:n[o[0].index],highlightedPostcode:t[o[0].index].value})}(e.postcode,e._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},h=d.postcode,g=d.highlightedPostcode,v={name:m(e._highlightResult.locale_names),city:u?m(e._highlightResult.city):void 0,administrative:s?m(e._highlightResult.administrative):void 0,country:c?e._highlightResult.country.value:void 0,suburb:l?m(e._highlightResult.suburb):void 0,county:p?m(e._highlightResult.county):void 0,postcode:g},f={name:i,administrative:s,county:p,city:u,suburb:l,country:c,countryCode:function(n){for(var t=0;t<n.length;t++){var e=n[t].match(/country\/(.*)?/);if(e)return e[1]}}(e._tags),type:function(n){var t={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var e in t)if(-1!==n.indexOf(e))return t[e];return"address"}(e._tags),latlng:{lat:e._geoloc.lat,lng:e._geoloc.lng},postcode:h,postcodes:e.postcode?e.postcode:void 0};return function(a){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.forEach(function(n){var t,e,o;t=a,o=r[e=n],e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o})}return a}({},f,{highlight:v,hit:e,hitIndex:o,query:a,rawAnswer:r,value:t(f)})}catch(n){return console.error("Could not parse object",e),console.error(n),{value:"Could not parse object"}}}e.d(t,"a",function(){return o})}})});
 
js/mappress.min.js CHANGED
@@ -1 +1 @@
1
- var mapp=window.mapp||{};+function(n){mapp.Map=function(n,t){this.defaults={center:null,editable:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null};this.highlight=null;this.iw=null;this.places=null;this.poi=null;this.settings=t?t:{};this.templates=null;this.dir_=null;this.div={};this.layers_={};this.map_=null;this.pois_=[];this.xhr_;this.zindex_=0;_.extend(this,this.defaults,n,this.settings)};mapp.Map.prototype={display:function(){var t=this,i;if(this.div.layout=this.sel?n(".mapp-layout",this.sel):n("#"+this.name+"-layout"),n.each(["canvas","controls","dialog","directions","filters","iw","list","menu","search"],function(i,r){t.div[r]=n(".mapp-"+r,t.div.layout)}),this.sanity()===!0){this.templates=this.editable?{loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?{loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:{loop:"map-loop",item:"map-item",popup:"map-popup"};mappl10n.options.engine=="leaflet"?(i=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap<\/a>',minZoom:0,scrollWheelZoom:!1,worldCopyJump:!0,zoomControl:null},this.mapOpts),i.minZoom=isNaN(parseInt(i.minZoom))?0:parseInt(i.minZoom),this.map_=new L.Map(this.div.canvas.get(0),i),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_),this.iw=L.popup(),this.iw.setContent(this.div.iw.get(0))):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),i=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,keyboardShortcuts:!1,mapTypeControl:!0,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,scrollwheel:!1,streetViewControl:!this.editable&&!this.query},this.mapOpts),i.minZoom=isNaN(parseInt(i.minZoom))?0:parseInt(i.minZoom),this.map_.setOptions(i),this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow,this.iw.setContent(this.div.iw.get(0)),this.addLayers());this.addStyles();this.addControls();this.addMenu();this.setMapTypeId(this.mapTypeId,!0);this.places=new mapp.Places(n(".mapp-places",this.div.search),{map:t});this.editable&&this.places.sel.focus();n(this.places).on("search.mapp",function(n,i){t.search(i)});this.addEvents("click drag",function(){t.close()});this.toggleView("mini",this.div.layout.width()<mappl10n.options.mini);this.div.layout.on("click","[data-mapp-action]",function(i){var r=n(this).attr("data-mapp-action");i.preventDefault();t.action(r,n(this).attr("data-mapp-"+r),n(this))});this.div.filters.on("change",function(){t.ajaxQuery()});n(window).resize(function(){t.resize()});this.places.parse(this.center,function(n){t.center=n&&n.geometry&&n.geometry.location?{lat:n.geometry.location.lat,lng:n.geometry.location.lng}:null;t.query?t.ajaxQuery(function(){t.initCenter()}):(t.setPois(t.pois),t.initCenter())})}},initCenter:function(){var n=this;this.recenter();this.renderList();this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove();mappl10n.options.engine=="leaflet"?this.initOpen():mapp.event.addListenerOnce(n.map_,"idle",function(){n.initOpen()})},initOpen:function(){var n=this.pois_.length?this.pois_[0]:null;this.initialOpenDirections?this.openDirections(null,n):n&&this.initialOpenInfo&&n.open()},search:function(n){var i,t,f,u,r;n&&n.geometry&&(i=n.geometry.location?n.geometry.location:null,t=n.geometry.viewport?n.geometry.viewport:null,mappl10n.options.engine=="leaflet"?(f=new L.LatLng(i.lat,i.lng),r=f.toBounds(mappl10n.options.radius*1e3)):(u=new google.maps.Circle({center:i,radius:mappl10n.options.radius*1e3}),r=t?new google.maps.LatLngBounds(new google.maps.LatLng(t.sw.lat,t.sw.lng),new google.maps.LatLng(t.ne.lat,t.ne.lng)).union(u.getBounds()):u.getBounds()),this.fitBounds(r),this.setView(i))},load:function(n){_.extend(this,this.defaults,n,this.settings);this.setMapTypeId(this.mapTypeId,!0);this.setPois(this.pois);this.recenter()},action:function(t,i,r){var f=this,u;switch(t){case"center":this.toggleView("menu",!1);this.close();this.recenter();break;case"dir":this.openDirections(null,this.poi);break;case"dir-from":this.openDirections(this.poi,null);break;case"filters-reset":this.div.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate(function(n){f.search(n)});break;case"layer":this.toggleLayer(i);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":u=r.attr("data-mapp-poi");this.open(this.pois_[u]);break;case"show":this.div.layout.show();this.resize();this.initCenter();break;case"view-map":this.toggleView("list",!1);break;case"view-list":this.toggleView("list",!0);break;default:return!0}},dialog:function(n,t){var i=this;n?(this.div.dialog.html(n),this.div.dialog.show(),t&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout(function(){i.dialog(null)},4e3))):this.div.dialog.hide()},addEvents:function(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)mapp.event.addListener(this.map_,n[i],t)},close:function(){mappl10n.options.engine=="leaflet"?this.map_.closePopup():this.iw.close();this.select(null);n(this).triggerHandler("mapp.close")},openDirections:function(n,t){var i=n?n.getAddress():"",r=t?t.getAddress():"";n?n.open():t&&t.open();this.dir_||(this.dir_=new mapp.Directions(this.div.directions,this));this.dir_.open(i,r)},sanity:function(){if(!this.div.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);if(mappl10n.options.autoupdate==="tc")return mapp.lib.log("Maps API missing (800001)");if(typeof _=="undefined")return mapp.lib.alert("ERROR: underscore.js not loaded. Check cacheing / optimizing plugins.");if(mappl10n.options.engine=="leaflet"){if(typeof L=="undefined")return mapp.lib.alert("ERROR: Unable to load Leaflet")}else{if(typeof google=="undefined")return mapp.lib.alert("ERROR: Google Maps API not loaded");n(document).ready(function(){n('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")})}return!0},select:function(t){if(t){var i=n.inArray(t,this.pois_),r=n('[data-mapp-poi="'+i+'"]',this.div.list);mapp.lib.scrollTo(this.div.list,r);t.setZIndex(++this.zindex_)}this.poi=t},setHighlight:function(n){this.highlight&&(mappl10n.options.engine=="leaflet"?this.highlight.remove():this.highlight.setMap(null));n&&(mappl10n.options.engine=="leaflet"?this.highlight=new L.Marker(n.getPosition()).addTo(this.map_):(this.highlight=new google.maps.Marker({position:n.getPosition()}),this.highlight.setMap(this.map_)))},getMap:function(){return this.map_},renderList:function(){var i=this.getBounds(),r=0,u=this,t;if(!this.editable)for(t=0;t<this.pois_.length;t++)this.pois_[t].visible=this.pois_[t].type!="kml",this.query&&i&&!i.contains(this.pois_[t].getPosition())&&(this.pois_[t].visible=!1),r+=this.pois_[t].visible;this.div.list.html(mapp.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:r}));this.editable&&n(".mapp-items",u.sel).sortable({axis:"y",cursor:"move",delay:200,update:function(){u.sortPois(n(this).sortable("toArray",{attribute:"data-mapp-poi"}))}})},getPois:function(){return this.pois_},insertPoi:function(n){var t=this;this.pois_.unshift(n);n.setMap(this);t.renderList();this.select(n)},removePoi:function(t){var r=this,i=n.inArray(t,this.pois_);i!=-1&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),r.renderList())},resetPois:function(){for(i=0;i<this.pois_.length;i++)this.pois_[i].setMap(null);this.pois_=[];this.zindex_=0},setPois:function(n){var t,i;if(this.resetPois(),n){for(t=0;t<n.length;t++)i=new mapp.Poi(n[t]),this.pois_.push(i),i.id=this.pois_.length-1,i.setMap(this),i.setZIndex(this.zindex_+n.length-1-t);this.zindex_+=n.length-1}this.renderList()},sortPois:function(n){for(var r,t=Array(),i=0;i<n.length;i++){if(r=parseInt(n[i]),isNaN(r))return!1;t.push(this.pois_[r])}if(t.length!=this.pois_.length)return!1;this.pois_=t;this.renderList()},open:function(t,i){var r=null,u;if(this.close(),this.select(t),mappl10n.options.mashupClick!="poi"&&t.postid&&t.url){mappl10n.options.mashupClick=="post"?window.location.assign(t.url):window.open(t.url);return}this.toggleView("list",!1);i&&i.featureData?r=i.featureData:i&&i.propagatedFrom&&i.propagatedFrom.feature&&i.propagatedFrom.feature.properties&&(r=i.propagatedFrom.feature.properties);this.div.iw.html(t.render("popup",r));mappl10n.options.engine=="leaflet"?(this.iw.setLatLng(t.getPosition()),this.iw.options.offset=t.getAnchorPoint(),this.map_.openPopup(this.iw)):(u=new google.maps.MVCObject,u.setValues({position:t.getPosition(i),anchorPoint:t.getAnchorPoint(i)}),this.iw.open(this.map_,u));n(this).triggerHandler("mapp.open",t)},renderMenu:function(){var t=this;for(layer in this.layers_)this.layers_[layer].getMap()&&n('[data-mapp-layer="'+layer+'"]',this.div.layout).addClass("mapp-active")},addStyles:function(){var u=this,l,f,r,i;if(mappl10n.options.engine=="leaflet"){if(this.editable){for(l=[],f=L.control.layers(),r=0;r<mappl10n.options.baseLayers.length;r++){var o=mappl10n.options.baseLayers[r],s=mappl10n.options.providers[o.provider],h=n.extend({},s,o);f.addBaseLayer(L.tileLayer(s.url,h),h.label)}mappl10n.options.baseLayers.length>1&&f.addTo(this.map_)}this.map_.on("baselayerchange",function(n){u.mapTypeId=n.layer.options.name})}else{var t=mappl10n.options.styles?mappl10n.options.styles:[],e=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];if(e&&typeof t[e]!="undefined"&&this.map_.setOptions({styles:t[e]}),this.editable){for(i in t)this.map_.mapTypes.set(i,new google.maps.StyledMapType(t[i],{name:i})),c.push(i);this.map_.setOptions({mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else this.mapTypeId&&typeof t[this.mapTypeId]!="undefined"&&this.map_.setOptions({styles:t[this.mapTypeId]});mapp.event.addListener(this.map_,"maptypeid_changed",function(){u.mapTypeId=u.map_.getMapTypeId()})}},addControls:function(){var n=this;this.div.controls.html(mapp.lib.template("map-controls",{map:this}))},addLayers:function(){var u,i,t,r;for(this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},u=n.makeArray(this.layers),i=0;i<u.length;i++)t=n.trim(u[i]),r=t.split(".").pop(),this.layers_[t]?this.toggleLayer(t):r=="kml"||r=="kmz"?this.layers_[t]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:t}):r=="json"&&(this.layers_[t]=new google.maps.Data({map:this.map_}).loadGeoJson(t))},addMenu:function(){var t=this;n("body").on("click",function(i){var r=n(i.target),u=r.attr("data-mapp-action");r==t.div.filters||u=="filters-toggle"||r.closest(t.div.filters).length||t.toggleView("filters",!1);r==t.div.menu||u=="menu-toggle"||r.closest(t.div.menu).length||t.toggleView("menu",!1)})},toggleLayer:function(t,i){var r=this;i=typeof i!="undefined"?i:this.layers_[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){r.layers_[t].setMap(null)});i&&this.layers_[t].setMap(this.map_)},togglePois:function(n){n=!!n;for(var t=0;t<this.pois_.length;t++)this.pois_[t].setVisible(n)},toggleView:function(n,t){t=typeof t=="undefined"?!this.div.layout.hasClass("mapp-view-"+n):t;this.div.layout.toggleClass("mapp-view-"+n,t);n=="menu"&&t&&this.renderMenu();n=="directions"&&this.resize()},resize:function(){var n=this.getCenter();this.toggleView("mini",this.div.layout.width()<mappl10n.options.mini);mappl10n.options.engine=="leaflet"?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize");n&&this.setView(n)},recenter:function(){var t=this.center&&this.center.lat&&this.center.lng?this.center:null,n=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,i,r;if(t&&!n&&this.query){this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});return}if(t){this.setView(t,n?n:1);return}if(this.pois_.length==0){this.setView({lat:0,lng:0},n?n:1);return}if(this.pois_.length==1){this.pois_[0].center(n);return}for(bounds=mappl10n.options.engine=="leaflet"?new L.LatLngBounds:new google.maps.LatLngBounds,i=0;i<this.pois_.length;i++)r=this.pois_[i].getBounds(),bounds=r?mappl10n.options.engine=="leaflet"?bounds.extend(r):bounds.union(r):bounds.extend(this.pois_[i].getPosition());n?this.setView(bounds.getCenter().toJSON(),n):this.fitBounds(bounds)},toJSON:function(){var n;for(this.pois=[],n=0;n<this.pois_.length;n++)this.pois.push(this.pois_[n].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,title:this.title,width:this.width,zoom:this.zoom}},ajaxSave:function(n){var t=this,i=JSON.stringify(this),r=!this.mapid||!this.postid?mappl10n.options.postid:this.postid;mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:i,postid:r,nonce:mappl10n.options.nonce},callback:function(i){i.status=="OK"&&(t.mapid||(t.mapid=i.data.mapid),n())}})},fitBounds:function(n,t){var t=mappl10n.options.engine=="leaflet"&&t?{paddingTopLeft:[t.left,t.top],paddingBottomRight:[t.right,t.bottom]}:t;return this.map_.fitBounds(n,t)},getBounds:function(){try{return this.map_.getBounds()}catch(n){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(n){return null}},getMapTypeId:function(n){return mappl10n.options.engine=="leaflet"?"roadmap":this.map_.getMapTypeId(n)},setMapTypeId:function(t){var s=this,i,r,e,u,o,f;if(mappl10n.options.engine=="leaflet")for(this.map_.eachLayer(function(n){s.map_.removeLayer(n)}),t=!this.editable&&mappl10n.options.style&&t=="streets"?mappl10n.options.style:t,t=_.findIndex(mappl10n.options.baseLayers,{name:t})>=0?t:mappl10n.options.baseLayers[0].name,i=0;i<mappl10n.options.baseLayers.length;i++)r=mappl10n.options.baseLayers[i],e=mappl10n.options.providers[r.provider],r.name==t&&(u=n.extend({},e,r),o=L.tileLayer(u.url,u),o.addTo(this.map_));else f=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1,t=this.editable?f||typeof mappl10n.options.styles[t]!="undefined"?t:"roadmap":f?t:"roadmap",this.map_.setMapTypeId(t)},setView:function(n,t,i){mappl10n.options.engine=="leaflet"?(t==null&&(t=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(n,t,i)):(n=n&&!n.toJSON?{lat:parseFloat(n.lat),lng:parseFloat(n.lng)}:n,t=t?parseInt(t):null,n&&this.map_.setCenter(n),t&&this.map_.setZoom(t))}};mapp.Map.ajaxGet=function(n,t,i){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:n,nonce:mappl10n.options.nonce},callback:function(n){if(n.status=="OK"){var r=new mapp.Map(n.data.map,t);i(r)}}})};mapp.Map.ajaxDelete=function(n,t){mapp.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:n,nonce:mappl10n.options.nonce},callback:function(n){n.status=="OK"&&t&&t()}})}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Directions=function(t,i){this.sel=n(t);this.map=i;this.directionsRenderer=null;this.directionsService=null;this.placesService=null;var r=this;this.sel.on("keydown",function(n){n.which==13?(r.getDirections(),n.preventDefault()):n.which==27&&r.close()});this.sel.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action"),u=n(".mapp-dir-daddr",r.sel).val(),f=n(".mapp-dir-saddr",r.sel).val();t.preventDefault();switch(i){case"dir-cancel":r.close();break;case"dir-get":r.getDirections();break;case"dir-myloc":r.map.places.geolocate(function(t){n(".mapp-dir-saddr",r.sel).val(t.name);r.getDirections()});break;case"dir-swap":n(".mapp-dir-saddr",r.sel).val(u);n(".mapp-dir-daddr",r.sel).val(f);r.getDirections()}});this.open=function(t,i){if(mappl10n.options.directions=="google"){this.openGoogle(t,i);return}this.map.toggleView("directions",!0);n(".mapp-dir-addr",this.sel).removeClass("mapp-error");n(".mapp-dir-saddr",this.sel).val(t);n(".mapp-dir-daddr",this.sel).val(i);n(".mapp-dir-get",this.sel).focus();n(".mapp-dir-saddr",this.sel).focus()};this.close=function(){this.map.toggleView("directions",!1);this.directionsRenderer&&(this.directionsRenderer.setPanel(null),this.directionsRenderer.getMap()&&(this.directionsRenderer.setMap(null),this.map.togglePois(!0)))};this.getDirections=function(){this.map.close();this.openGoogle(n(".mapp-dir-saddr",this.sel).val(),n(".mapp-dir-daddr",this.sel).val());return};this.openGoogle=function(n,t){var i=mappl10n.options.directionsServer;i.toLowerCase().indexOf("http")==-1&&(i="https://"+i);i+="?saddr="+encodeURIComponent(n);i+="&daddr="+encodeURIComponent(t);window.open(i)}}}(jQuery);mapp=window.mapp||{};mapp.geocoders={};+function(n){mapp.geocoders.Algolia=function(n){this.map=n;this.places=algoliasearch.initPlaces()};mapp.geocoders.Algolia.prototype={geocode:function(n,t){var i=this;this.getPredictions(n,function(i){i&&i.hits.length?t({formatted_address:i.hits[0].locale_names[0],name:n,geometry:{location:{lat:i.hits[0]._geoloc.lat,lng:i.hits[0]._geoloc.lng}}}):t(null)})},getDetails:function(n,t){if(mappl10n.options.geocoder=="nominatim")return this.getNominatimDetails(n,t);if(mappl10n.options.geocoder=="mapbox"&&mappl10n.options.mapbox)return this.getMapboxDetails(n,t);t({formatted_address:n.value,name:n.name,geometry:{location:n.latlng}});return},getNominatimDetails:function(t,i){url="https://nominatim.openstreetmap.org/search?format=json&limit=1&q="+encodeURIComponent(t.value);url=mappl10n.options.country?url+"&countrycodes="+mappl10n.options.country.toLowerCase():url;url=mappl10n.options.language?url+"&accept-language="+mappl10n.options.language.toLowerCase():url;n.getJSON(url,function(n){if(n&&n.length){var r=n[0],u=r.boundingbox&&r.boundingbox.length==4?{sw:{lat:r.boundingbox[0],lng:r.boundingbox[2]},ne:{lat:r.boundingbox[1],lng:r.boundingbox[3]}}:null;i({formatted_address:r.display_name,name:t.name,geometry:{location:{lat:r.lat,lng:r.lon},viewport:u}})}else i({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})})},getMapboxDetails:function(t,i){url="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURIComponent(t.value)+".json?access_token="+mappl10n.options.mapbox;url=mappl10n.options.country?url+"&country="+mappl10n.options.country.toLowerCase():url;url=mappl10n.options.language?url+"&language="+mappl10n.options.language.toLowerCase():url;n.getJSON(url,function(n){if(n&&n.features&&n.features.length>0){var r=n.features[0],u=r.bbox&&r.bbox.length==4?{sw:{lat:r.bbox[1],lng:r.bbox[0]},ne:{lat:r.bbox[3],lng:r.bbox[2]}}:null;i({formatted_address:r.place_name,name:t.name,geometry:{location:{lat:r.center[1],lng:r.center[0]},viewport:u}})}else i({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})})},getPredictions:function(n,t){this.places.search({query:n,language:mappl10n.options.language},function(n,i){n||!i?t(null):t(i)})}}}(jQuery);+function(n){mapp.geocoders.Google=function(t){this.map=t;this.token=null;this.types=this.map.editable?null:["geocode"];var i=n('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0));this.autocompleteService=new google.maps.places.AutocompleteService;i.remove()};mapp.geocoders.Google.prototype={geocode:function(t,i){var r=this;this.getPredictions(t,function(t){t&&n.isArray(t)?r.getDetails(t[0],function(n){i(n)}):i(null)})},getDetails:function(n,t){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;this.token=null;var i={placeId:n.place_id,sessionToken:this.token};this.placesService.getDetails(i,function(n,i){if(i=="OK"&&n&&n.geometry){if(n.geometry.location&&(n.geometry.location=n.geometry.location.toJSON()),n.geometry.viewport){var r=n.geometry.viewport.toJSON();n.geometry.viewport={sw:{lat:r.south,lng:r.west},ne:{lat:r.north,lng:r.east}}}t(n)}else t(null)})},getPredictions:function(n,t){var i,r;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;i=this.map.getMap().getBounds();i=i?i:new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180));r={input:n,bounds:i,sessionToken:this.token,types:this.types};this.autocompleteService.getPlacePredictions(r,function(n,i){i=="OK"&&n&&n.length?t(n):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),t(null))})}}}(jQuery);mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){var n="https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png";return mappl10n.options.engine=="leaflet"?L.icon({iconUrl:n,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:n}};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};+function(n){mapp.InfoBox=function(t,i){var f=n.extend({border:20},i),u=null,r=null,o,e=this;r=n('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib" tabindex="0"><\/div><div class="mapp-ib-tip"><\/div><\/div>').appendTo(t.getMap().getDiv());jQuery(window).resize(function(){e.close()});r.on("keydown",function(n){n.which==27&&e.close()});r.on("click",".mapp-close",function(){e.close()});this.getContent=function(){return n(".mapp-ib",r)};this.setContent=function(t){n(".mapp-ib",r).empty().append(t)};this.open=function(n,t){u=t;this.setMap(n)};this.onAdd=function(){o=!1;var t=n(":input",r);r.show();t.length?t.first().focus():r.focus();google.maps.event.trigger(e,"domready")};this.draw=function(){var l=this.getMap(),a=n(".mapp-ib-body",r),s=this.getProjection().fromLatLngToContainerPixel(u.position),t,h,c,i,e;o||(o=!0,t={width:n(":first-child",l.getDiv()).width(),height:n(":first-child",l.getDiv()).height()},r.css({"max-height":"9999px",left:0,bottom:0,top:"auto",right:"auto"}),h=r.outerWidth(!0),c=r.outerHeight(!0),c>t.height+u.anchorPoint.y-2*f.border&&(c=t.height+u.anchorPoint.y-2*f.border,r.css({"max-height":c+2})),i=s.x,e=s.y,i+h/2>t.width&&(i=t.width-h/2),i-h/2<0&&(i=h/2),e-c+u.anchorPoint.y<f.border&&(e=c-u.anchorPoint.y+f.border),e>t.height&&(e=t.height),(s.x-i||s.y-e)&&l.panBy(s.x-i,s.y-e),r.css({left:i-h/2,bottom:t.height-e-u.anchorPoint.y}))};this.close=function(){r.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))};this.onRemove=function(){r.hide()}};mappl10n.options.engine!="leaflet"&&(mapp.InfoBox.prototype=new google.maps.OverlayView)}(jQuery);mapp=window.mapp||{};+function(n){mapp.lib={ajax:function(t){var i=this;return n.extend({type:"GET",data:null,spinner:null,callback:n.noop},t),t.spinner&&t.spinner.show(),n.ajax({type:t.type,url:mappl10n.options.ajaxurl,data:t.data,success:function(n,r,u){if(t.spinner&&t.spinner.hide(),n.status!="OK"){var f=typeof n=="object"?n.status:n;i.alert("AJAX ERROR\r\nResponse="+f+" TextStatus="+r+"\r\nResponseText="+u.responseText)}if(n.output){i.log("AJAX Output\r\n"+n.output);return}t.callback&&t.callback(n,u)},error:function(n,r,u){(t.spinner&&t.spinner.hide(),r!="cancel")&&typeof u!="undefined"&&u!=""&&i.alert("AJAX ERROR\r\nTextStatus="+r+"\r\nError="+u+"\r\nResponseText="+n.responseText)}})},alert:function(n){mappl10n.options.admin||mappl10n.options.debug?alert(n):window.console&&console.error(n)},jqVersionCheck:function(t){if(typeof n=="undefined"||typeof t=="undefined")return!1;for(t=t.split("."),v=n.fn.jquery.split("."),i=0;i<t.length;i++){var r=parseInt(t[i]),u=typeof v[i]!="undefined"?parseInt(v[i]):0;if(u!=r)return u>r}return!0},log:function(n){window.console&&console.error(n)},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var i=n.scrollTop(),u=n.height(),r=i+t.position().top,f=r+t.outerHeight(!0);r<i?n.scrollTop(r):f>i+u&&n.scrollTop(f-u)}},template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var r=mappl10n.options.templates?mappl10n.options.template[t]:n("#mapp-tmpl-"+t).html();if(r)mapp.lib.templates[t]=_.template(r.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});else return""}return mapp.lib.templates[t](i)}};mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+n.fn.jquery);n("body").on("tabsactivate tabsshow",function(t,i){var r=i.newPanel?i.newPanel:i.panel;r&&n(".mapp-layout",r).each(function(){var i=n(this).find(".mapp-canvas").attr("id"),t=window[i];t.resize();t.recenter()})})}(jQuery);+function(){mappl10n.options.engine=="leaflet"&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(this.lat*1e6)/1e6+", "+Math.round(this.lng*1e6)/1e6});mapp.event={addListener:function(n,t,i){if(mappl10n.options.engine=="leaflet")n.on(t,i);else google.maps.event.addListener(n,t,i)},addListenerOnce:function(n,t,i){if(mappl10n.options.engine=="leaflet")n.once(t,i);else google.maps.event.addListenerOnce(n,t,i)},clearInstanceListeners:function(n){mappl10n.options.engine=="leaflet"?n.off():google.maps.event.clearInstanceListeners(n)},clearListeners:function(n,t){mappl10n.options.engine=="leaflet"?n.off(t):google.maps.event.clearListeners(n,"rightclick")},trigger:function(n,t,i){mappl10n.options.engine=="leaflet"?n.fire(t,i):google.maps.event.trigger(n,t,i)}}}(jQuery);mapp=window.mapp||{};jQuery.fn.AlgoliaAutocomplete=jQuery.fn.autocomplete.noConflict();+function(n){mapp.Places=function(t,i){var r=this;this.sel=n(t);this.opts=n.extend({map:null},i);this.geocoder=mappl10n.options.engine=="leaflet"?new mapp.geocoders.Algolia(this.opts.map):new mapp.geocoders.Google(this.opts.map);this.sel.on("keydown",function(t){if(t.which==13){t.preventDefault();var i=r.parseLatLng(r.sel.val());i&&(n(r).triggerHandler("search.mapp",i),r.sel.AlgoliaAutocomplete("close"),t.stopImmediatePropagation());r.sel.val().substring(0,4)=="http"&&(n(r).triggerHandler("search.mapp",r.sel.val()),r.sel.AlgoliaAutocomplete("close"),t.stopImmediatePropagation())}});this.autocomplete()};mapp.Places.prototype={parse:function(t,i){var f=this,u=t&&t.name?n.trim(t.name):n.trim(t),r;if(!u){i(null);return}if(u=="user"){this.geolocate(function(n){i(n)});return}if(t&&t.geometry){i(t);return}if(r=this.parseLatLng(t),r){i(r);return}this.geocoder.geocode(t,function(n){i(n)})},parseLatLng:function(t){var i,e,r,u,f;return t.lat&&t.lng?i=t:(e=t&&t.name?n.trim(t.name):n.trim(t),r=e.split(","),r.length==2&&(u=parseFloat(r[0]),f=parseFloat(r[1]),isNaN(u)||isNaN(f)||(i={lat:u,lng:f}))),i?{name:i.lat+", "+i.lng,geometry:{location:i}}:null},geolocate:function(n){var t=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(t){var i={lat:t.coords.latitude,lng:t.coords.longitude};n({name:i.lat+", "+i.lng,geometry:{location:i}})},function(t){var i=t&&t.message?" : "+t.message:"";alert(mappl10n.no_geolocate+i);n(null)},{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4})},autocomplete:function(){var t=this,r,i,u;this.sel.on("autocomplete:selected",function(i,r){t.geocoder.getDetails(r,function(i){t.parse(i,function(i){i&&n(t).triggerHandler("search.mapp",i)})})});r={empty:'<div class="list-group search-results-dropdown"><div class="list-group-item">'+mappl10n.no_results+"<\/div><\/div>",header:'<div class="list-group search-results-dropdown">'};mappl10n.options.engine=="leaflet"?(i={algoliasearch:algoliasearch,templates:r},mappl10n.options.country&&(i.countries=[mappl10n.options.country]),mappl10n.options.language&&(i.language=mappl10n.options.language),u=placesAutocompleteDataset(i)):u={display:"description",source:function(n,i){t.geocoder.getPredictions(n,function(n){matches=n;i(matches)})},templates:r};this.sel.AlgoliaAutocomplete({autoselect:!0,cssClasses:{prefix:"mapp-aa"},debug:!1,hint:!0,highlight:!0,minLength:1},u)}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(t){var u,f,r,o,i,e,h,s;if(this.defaults={address:null,body:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},n.extend(this,this.defaults,t),t&&t.correctedAddress&&(this.address=t.correctedAddress),mappl10n.options.engine=="leaflet"&&this.isPoly()&&(this.type=null),t.viewport&&t.viewport.sw&&t.viewport.ne&&(u=t.viewport.sw,f=t.viewport.ne,this.viewport=mappl10n.options.engine=="leaflet"?new L.LatLngBounds(L.latLng(u.lat,u.lng),L.latLng(f.lat,f.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(u.lat,u.lng),new google.maps.LatLng(f.lat,f.lng))),r=[],o=[],!t.overlay)switch(this.type){case"polygon":if(t.poly&&t.poly.paths)for(i=0;i<t.poly.paths.length;i++){for(r=[],e=0;e<t.poly.paths[i].length;e++)r.push(new google.maps.LatLng(t.poly.paths[i][e].lat,t.poly.paths[i][e].lng));o.push(new google.maps.MVCArray(r))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(t.poly);break;case"polyline":if(t.poly&&t.poly.path)for(i=0;i<t.poly.path.length;i++)r.push(new google.maps.LatLng(t.poly.path[i].lat,t.poly.path[i].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(r)});this.setColors(t.poly);break;case"circle":h=new google.maps.LatLng(t.point.lat,t.point.lng);this.overlay=new google.maps.Circle({center:h,radius:parseFloat(t.poly.radius)});this.setColors(t.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(t.poly);break;case"kml":s=t.kml&&t.kml.url?t.kml.url:"";this.overlay=mappl10n.options.engine=="leaflet"?omnivore.kml(s):new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:this.overlay=mappl10n.options.engine=="leaflet"?L.marker([t.point.lat,t.point.lng],{title:t.title}):new google.maps.Marker({position:new google.maps.LatLng(t.point.lat,t.point.lng),title:t.title})}t.type||this.setIcon(t.iconid)};mapp.Poi.prototype={toJSON:function(){var n={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},u=this.getPosition(),i,t,r;if(n.point=u.toJSON(),i=this.viewport?this.viewport:this.getBounds(),i&&(t=i.toJSON(),n.viewport={sw:{lat:t.south,lng:t.west},ne:{lat:t.north,lng:t.east}}),this.type=="kml"&&(n.kml=this.kml),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push(t.toJSON())});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push(n.toJSON())});n.poly.paths.push(i)});break;case"rectangle":r=this.overlay.getBounds();n.viewport={sw:r.getSouthWest().toJSON(),ne:r.getNorthEast().toJSON()}}}return n},setMap:function(n){var t=this;if(this.map=n,mapp.event.clearInstanceListeners(this.overlay),n==null){mappl10n.options.engine=="leaflet"?this.overlay.remove():this.overlay.setMap(null);return}this.type=="kml"&&(mappl10n.options.engine=="leaflet"?(mapp.event.addListenerOnce(this.overlay,"ready",function(){t.viewport=t.overlay.getBounds()}),mapp.event.addListenerOnce(this.overlay,"error",function(){alert(mappl10n.kml_error)})):(mapp.event.addListener(this.overlay,"defaultviewport_changed",function(){t.viewport=t.overlay.getDefaultViewport()}),mapp.event.addListener(this.overlay,"status_changed",function(){var n=t.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)})));mapp.event.addListener(this.overlay,"click",function(n){t.open(n)});this.setEditable(this.map.editable);mappl10n.options.engine=="leaflet"?this.overlay.addTo(n.getMap()):this.overlay.setMap(n.getMap())},setEditable:function(n){var t=this;this.type!="kml"&&(mappl10n.options.engine=="leaflet"?this.overlay.options.draggable=n:this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay,"dragstart"),n&&(mapp.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.close()}),(this.type=="polygon"||this.type=="polyline")&&mapp.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},setZIndex:function(n){mappl10n.options.engine=="leaflet"?this.type||this.overlay.setZIndexOffset(n):this.overlay.set("zIndex",n)},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.iconid=n,mappl10n.options.engine=="leaflet"?this.overlay.setIcon(mapp.Icons.get(n)):(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n))))},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},setTemplateColors:function(n,t,i){var r=this.type=="polyline"?{strokeColor:n,strokeOpacity:t/100,strokeWeight:i}:{fillColor:n,fillOpacity:t/100,strokeColor:n,strokeWeight:i,strokeOpacity:1};this.setColors(r)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},getTemplateColors:function(){var n=this.getColors();return this.type=="polyline"?{color:n.strokeColor,opacity:n.strokeOpacity*100,weight:n.strokeWeight}:{color:n.fillColor,opacity:n.fillOpacity*100,weight:n.strokeWeight}},center:function(n){var t=this.getBounds();if(typeof n=="number"){this.map.setView(this.getPosition(),n);return}if(!t){this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));return}this.map.fitBounds(t);this.map.setView(this.getPosition(),n)},open:function(n){this.map.open(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=mappl10n.options.engine=="leaflet"?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport();n=n?n:this.viewport;break;default:return this.viewport}return n},getPosition:function(n){if(!this.type)return mappl10n.options.engine=="leaflet"?this.overlay.getLatLng():this.overlay.getPosition();if(this.type=="kml"&&n&&n.latLng)return n.latLng;var t=this.getBounds();return t?t.getCenter():mappl10n.options.engine=="leaflet"?new L.latLng(0,0):new google.maps.LatLng(0,0)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(n){var t=this.isPoly()?"poly":this.type;switch(t){case"kml":return mappl10n.options.engine=="leaflet"?[0,0]:n&&n.pixelOffset?new google.maps.Point(n.pixelOffset.width,n.pixelOffset.height):new google.maps.Point(0,0);case"poly":return mappl10n.options.engine=="leaflet"?[0,0]:new google.maps.Point(0,0);default:return mappl10n.options.engine=="leaflet"?this.overlay.options.icon.options.popupAnchor?this.overlay.options.icon.options.popupAnchor:[0,-32]:typeof this.overlay.anchorPoint!="undefined"?this.overlay.anchorPoint:new google.maps.Point(0,-32)}},render:function(n,t){var i=_.extend(this,{icon:mapp.Icons.getUrl(this.iconid)});return t&&(i.body=t.description,i.title=t.name),mapp.lib.template(this.map.templates[n],{poi:i,colors:this.getTemplateColors()})}}}(jQuery);mapp=window.mapp||{};mapp.widgets={};+function(n){mapp.widgets.Grid=function(t,i){this.el=n(t);this.options=jQuery.extend({action:null,sortable:!1},i);var r=this;this.table=n("table",this.el);this.template=n("script",this.el).html().replace(new RegExp("'","g"),'"');this.el.on("click",function(t){var u=n(t.target),i=u.attr("data-mapp-action");i&&(r[i](t),t.preventDefault())})};mapp.widgets.Grid.prototype={add:function(){this.table.show();var t=n(this.template).appendTo(this.table);n(":input:eq(0)",t).focus()},remove:function(t){var i=n(t.target).closest("tr").remove();n("tbody > tr",this.table).length||this.table.hide()}}}(jQuery);+function(n){mapp.widgets.Popup=function(t,i){var r,u;if(this.activeToggle=null,this.content=t,this.el=null,r=this,this.options=n.extend({max:!1,modal:!1,position:null,toggle:null},i),this.options.modal?this.el=this.content.addClass("mapp-popup-fixed"):(this.el=n('<div class="mapp-popup">'),this.setContent(t)),this.el.attr("tabindex",0),this.options.max&&this.el.addClass("mapp-popup-max"),this.el.hide(),!this.options.modal)n(document).on("click.mapp.popup",function(t){n.contains(r.el.get(0),t.target)||r.el.get(0)==t.target||r.close()});if(this.options.toggle){u=typeof this.options.toggle=="string"?this.options.toggle:this.options.toggle.selector;n(document).on("click",u,function(t){r.activeToggle=n(this);r.open();t.stopPropagation()})}this.el.on("click",".mapp-close",function(){r.close()});this.el.on("keydown",function(n){n.which==27&&r.close()});return this};mapp.widgets.Popup.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.backdrop&&(this.backdrop.remove(),n("body").removeClass("mapp-popup-modal")),this.el.hide(),this.activeToggle&&this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},open:function(){var t=this;this.options.modal||this.el.parent().length||this.el.appendTo("body");this.el.show();this.options.modal?(this.backdrop=n('<div class="mapp-popup-backdrop"><\/div>'),this.el.after(this.backdrop),n("body").addClass("mapp-popup-modal")):this.el.position(n.extend({my:"center bottom",at:"center top-5",of:this.activeToggle,collision:"flipfit"},this.options.position));this.el.focus();this.el.trigger("open.mapp.popup")},setContent:function(n){this.el.empty();this.el.append('<span class="mapp-close">').append(n)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery);+function(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop();window[n.name]=new mapp.Map(n);window[n.name].display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappEditor=new mapp.Media:mapp.load()
1
+ var mapp=window.mapp||{};+function(n){mapp.Map=function(n,t){this.defaults={center:null,editable:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null};this.model=n;this.highlight=null;this.iw=null;this.places=null;this.poi=null;this.settings=t?t:{};this.templates=null;this.dir_=null;this.div={};this.layers_={};this.map_=null;this.pois_=[];this.xhr_;this.zindex_=0;_.extend(this,this.defaults,n,this.settings)};mapp.Map.prototype={display:function(){var t=this,i;if(this.div.layout=this.sel?n(".mapp-layout",this.sel):n("#"+this.name+"-layout"),n.each(["canvas","controls","dialog","directions","filters","iw","list","menu","search"],function(i,r){t.div[r]=n(".mapp-"+r,t.div.layout)}),this.sanity()===!0){this.templates=this.editable?{loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?{loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:{loop:"map-loop",item:"map-item",popup:"map-popup"};this.toggleView("mini");mappl10n.options.engine=="leaflet"?(i=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap<\/a>',minZoom:0,worldCopyJump:!0,zoomControl:null},this.mapOpts),i.minZoom=isNaN(parseInt(i.minZoom))?0:parseInt(i.minZoom),this.map_=new L.Map(this.div.canvas.get(0),i),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_),this.iw=L.popup(),this.iw.setContent(this.div.iw.get(0))):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),i=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:this.editable||this.query?!1:!0},this.mapOpts),i.minZoom=isNaN(parseInt(i.minZoom))?0:parseInt(i.minZoom),this.map_.setOptions(i),this.iw=mappl10n.options.iwType=="ib"||this.editable?new mapp.InfoBox(this):new google.maps.InfoWindow,this.iw.setContent(this.div.iw.get(0)),this.addLayers());this.addStyles();this.addMenu();this.setMapTypeId(this.mapTypeId,!0);this.places=new mapp.Places(n(".mapp-places",this.div.search),{map:t});this.editable&&this.places.sel.focus();n(this.places).on("search.mapp",function(n,i){t.search(i)});this.addEvents("click drag",function(){t.close()});this.div.layout.on("click","[data-mapp-action]",function(i){var r=n(this).attr("data-mapp-action");i.preventDefault();t.action(r,n(this).attr("data-mapp-"+r),n(this))});this.div.filters.on("change",function(){t.ajaxQuery()});n(window).resize(function(){t.toggleView("mini");t.resize()});this.places.parse(this.center,function(n){t.center=n&&n.geometry&&n.geometry.location?{lat:n.geometry.location.lat,lng:n.geometry.location.lng}:null;t.query?t.ajaxQuery(function(){t.initCenter()}):(t.setPois(t.pois),t.initCenter())})}},initCenter:function(){var n=this;this.recenter();this.renderList();this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove();mappl10n.options.engine=="leaflet"?this.initOpen():mapp.event.addListenerOnce(n.map_,"idle",function(){n.initOpen()})},initOpen:function(){var n=this.pois_.length?this.pois_[0]:null;this.initialOpenDirections?this.openDirections(null,n):n&&this.initialOpenInfo&&n.open()},search:function(n){var i,t,f,u,r;n&&n.geometry&&(i=n.geometry.location?n.geometry.location:null,t=n.geometry.viewport?n.geometry.viewport:null,mappl10n.options.engine=="leaflet"?(f=new L.LatLng(i.lat,i.lng),r=f.toBounds(mappl10n.options.radius*1e3)):(u=new google.maps.Circle({center:i,radius:mappl10n.options.radius*1e3}),r=t?new google.maps.LatLngBounds(new google.maps.LatLng(t.sw.lat,t.sw.lng),new google.maps.LatLng(t.ne.lat,t.ne.lng)).union(u.getBounds()):u.getBounds()),this.fitBounds(r),this.setView(i))},action:function(t,i,r){var f=this,u;switch(t){case"center":this.toggleView("menu",!1);this.close();this.recenter();break;case"dir":this.openDirections(null,this.poi);break;case"dir-from":this.openDirections(this.poi,null);break;case"filters-reset":this.div.filters.find(":input").each(function(){this.type=="checkbox"||this.type=="radio"?n(this).prop("checked",!1):n(this).val("")});this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate(function(n){f.search(n)});break;case"layer":this.toggleLayer(i);this.toggleView("menu",!1);break;case"menu-toggle":this.toggleView("menu");break;case"open":u=r.attr("data-mapp-poi");this.open(this.pois_[u]);break;case"view-map":this.toggleView("list",!1);break;case"view-list":this.toggleView("list",!0);break;default:return!0}},dialog:function(n,t){var i=this;n?(this.div.dialog.html(n),this.div.dialog.show(),t&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout(function(){i.dialog(null)},4e3))):this.div.dialog.hide()},addEvents:function(n,t){n=n.split(" ");for(var i=0;i<n.length;i++)mapp.event.addListener(this.map_,n[i],t)},close:function(){mappl10n.options.engine=="leaflet"?this.map_.closePopup():this.iw.close();this.dir_&&this.dir_.close();this.select(null);n(this).triggerHandler("mapp.close")},openDirections:function(n,t){var i=n?n.getAddress():"",r=t?t.getAddress():"";n?n.open():t&&t.open();this.dir_||(this.dir_=new mapp.Directions(this.div.directions,this));this.dir_.open(i,r)},sanity:function(){if(!this.div.canvas.length)return mapp.lib.log("MapPress: Missing map name or container for map: "+this.name);if(mappl10n.options.autoupdate==="tc")return mapp.lib.log("Maps API missing (800001)");if(typeof _=="undefined")return mapp.lib.alert("ERROR: underscore.js not loaded. Check cacheing / optimizing plugins.");if(mappl10n.options.engine=="leaflet"){if(typeof L=="undefined")return mapp.lib.alert("ERROR: Unable to load Leaflet")}else{if(typeof google=="undefined")return mapp.lib.alert("ERROR: Google Maps API not loaded");n(document).ready(function(){n('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&mapp.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")})}return!0},select:function(t){if(n(".mapp-item",this.div.list).removeClass("mapp-selected"),t){var r=n.inArray(t,this.pois_),i=n('[data-mapp-poi="'+r+'"]',this.div.list);mapp.lib.scrollTo(this.div.list,i);t.setZIndex(++this.zindex_);i.addClass("mapp-selected")}this.poi=t},setHighlight:function(n){this.highlight&&(mappl10n.options.engine=="leaflet"?this.highlight.remove():this.highlight.setMap(null));n&&(mappl10n.options.engine=="leaflet"?this.highlight=new L.Marker(n.getPosition()).addTo(this.map_):(this.highlight=new google.maps.Marker({position:n.getPosition()}),this.highlight.setMap(this.map_)))},getMap:function(){return this.map_},renderList:function(){var i=this.getBounds(),r=0,u=this,t;if(!this.editable)for(t=0;t<this.pois_.length;t++)this.pois_[t].visible=this.pois_[t].type!="kml",this.query&&i&&!i.contains(this.pois_[t].getPosition())&&(this.pois_[t].visible=!1),r+=this.pois_[t].visible;this.div.list.html(mapp.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:r}));this.editable&&n(".mapp-items",u.sel).sortable({axis:"y",cursor:"move",delay:200,update:function(){u.sortPois(n(this).sortable("toArray",{attribute:"data-mapp-poi"}))}})},getPois:function(){return this.pois_},insertPoi:function(n){var t=this;this.pois_.unshift(n);n.setMap(this);t.renderList();this.select(n)},removePoi:function(t){var r=this,i=n.inArray(t,this.pois_);i!=-1&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),r.renderList())},resetPois:function(){for(i=0;i<this.pois_.length;i++)this.pois_[i].setMap(null);this.pois_=[];this.zindex_=0},setPois:function(n){var t,i;if(this.resetPois(),n){for(t=0;t<n.length;t++)i=new mapp.Poi(n[t]),this.pois_.push(i),i.id=this.pois_.length-1,i.setMap(this),i.setZIndex(this.zindex_+n.length-1-t);this.zindex_+=n.length-1}},sortPois:function(n){for(var r,t=Array(),i=0;i<n.length;i++){if(r=parseInt(n[i]),isNaN(r))return!1;t.push(this.pois_[r])}if(t.length!=this.pois_.length)return!1;this.pois_=t;this.renderList()},open:function(t,i){var r=null,u;if(this.close(),this.select(t),mappl10n.options.mashupClick!="poi"&&t.postid&&t.url){mappl10n.options.mashupClick=="post"?window.location.assign(t.url):window.open(t.url);return}this.toggleView("list",!1);i&&i.featureData?r=i.featureData:i&&i.propagatedFrom&&i.propagatedFrom.feature&&i.propagatedFrom.feature.properties&&(r=i.propagatedFrom.feature.properties);this.div.iw.html(t.render("popup",r));mappl10n.options.engine=="leaflet"?(this.iw.setLatLng(t.getPosition()),this.iw.options.offset=t.getAnchorPoint(),this.map_.openPopup(this.iw)):(u=new google.maps.MVCObject,u.setValues({position:t.getPosition(i),anchorPoint:t.getAnchorPoint(i)}),this.iw.open(this.map_,u));n(this).triggerHandler("mapp.open",t)},renderMenu:function(){var t=this;for(layer in this.layers_)n('[data-mapp-layer="'+layer+'"]',this.div.layout).toggleClass("mapp-active",this.layers_[layer].getMap()!=null)},addStyles:function(){var u=this,l,f,r,i;if(mappl10n.options.engine=="leaflet"){if(this.editable){for(l=[],f=L.control.layers(),r=0;r<mappl10n.options.baseLayers.length;r++){var o=mappl10n.options.baseLayers[r],s=mappl10n.options.providers[o.provider],h=n.extend({},s,o);f.addBaseLayer(L.tileLayer(s.url,h),h.label)}mappl10n.options.baseLayers.length>1&&f.addTo(this.map_)}this.map_.on("baselayerchange",function(n){u.mapTypeId=n.layer.options.name})}else{var t=mappl10n.options.styles?mappl10n.options.styles:[],e=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];if(e&&typeof t[e]!="undefined"&&this.map_.setOptions({styles:t[e]}),this.editable){for(i in t)this.map_.mapTypes.set(i,new google.maps.StyledMapType(t[i],{name:i})),c.push(i);this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else this.mapTypeId&&typeof t[this.mapTypeId]!="undefined"&&this.map_.setOptions({styles:t[this.mapTypeId]});mapp.event.addListener(this.map_,"maptypeid_changed",function(){u.mapTypeId=u.map_.getMapTypeId()})}},addLayers:function(){var u,i,t,r;for(this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer},u=n.makeArray(this.layers),i=0;i<u.length;i++)t=n.trim(u[i]),r=t.split(".").pop(),this.layers_[t]?this.toggleLayer(t):r=="kml"||r=="kmz"?this.layers_[t]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:t}):r=="json"&&(this.layers_[t]=new google.maps.Data({map:this.map_}).loadGeoJson(t))},addMenu:function(){var t=this;n("body").on("click",function(i){var r=n(i.target),u=r.attr("data-mapp-action");r==t.div.filters||u=="filters-toggle"||r.closest(t.div.filters).length||t.toggleView("filters",!1);r==t.div.menu||u=="menu-toggle"||r.closest(t.div.menu).length||t.toggleView("menu",!1)})},toggleLayer:function(t,i){var r=this;i=typeof i!="undefined"?i:this.layers_[t].getMap()==null;n.each(["traffic","bicycling","transit"],function(n,t){r.layers_[t].setMap(null)});i&&this.layers_[t].setMap(this.map_)},togglePois:function(n){n=!!n;for(var t=0;t<this.pois_.length;t++)this.pois_[t].setVisible(n)},toggleView:function(n,t){if(n=="mini"){t=this.div.layout.width()<mappl10n.options.mini;this.div.layout.toggleClass("mapp-view-"+n,t);t||this.toggleView("list",!1);return}t=typeof t=="undefined"?!this.div.layout.hasClass("mapp-view-"+n):t;this.div.layout.toggleClass("mapp-view-"+n,t);n=="list"&&t&&this.renderList();n=="menu"&&t&&this.renderMenu();n=="directions"&&this.resize()},resize:function(){var n=this.getCenter();mappl10n.options.engine=="leaflet"?this.map_.invalidateSize():mapp.event.trigger(this.map_,"resize");n&&this.setView(n)},recenter:function(){var t=this.center&&this.center.lat&&this.center.lng?this.center:null,n=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null,i,r;if(t&&!n&&this.query){this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});return}if(t){this.setView(t,n?n:1);return}if(this.pois_.length==0){this.setView({lat:0,lng:0},n?n:1);return}if(this.pois_.length==1){this.pois_[0].center(n);return}for(bounds=mappl10n.options.engine=="leaflet"?new L.LatLngBounds:new google.maps.LatLngBounds,i=0;i<this.pois_.length;i++)r=this.pois_[i].getBounds(),bounds=r?mappl10n.options.engine=="leaflet"?bounds.extend(r):bounds.union(r):bounds.extend(this.pois_[i].getPosition());n?this.setView(bounds.getCenter().toJSON(),n):this.fitBounds(bounds)},fitBounds:function(n,t){var t=mappl10n.options.engine=="leaflet"&&t?{paddingTopLeft:[t.left,t.top],paddingBottomRight:[t.right,t.bottom]}:t;return this.map_.fitBounds(n,t)},getBounds:function(){try{return this.map_.getBounds()}catch(n){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(n){return null}},getMapTypeId:function(n){return mappl10n.options.engine=="leaflet"?"roadmap":this.map_.getMapTypeId(n)},setMapTypeId:function(t){var s=this,i,r,e,u,o,f;if(mappl10n.options.engine=="leaflet")for(this.map_.eachLayer(function(n){s.map_.removeLayer(n)}),t=!this.editable&&mappl10n.options.style&&t=="streets"?mappl10n.options.style:t,t=_.findIndex(mappl10n.options.baseLayers,{name:t})>=0?t:mappl10n.options.baseLayers[0].name,i=0;i<mappl10n.options.baseLayers.length;i++)r=mappl10n.options.baseLayers[i],e=mappl10n.options.providers[r.provider],r.name==t&&(u=n.extend({},e,r),o=L.tileLayer(u.url,u),o.addTo(this.map_));else f=n.inArray(t,["roadmap","satellite","terrain","hybrid"])!=-1,t=this.editable?f||typeof mappl10n.options.styles[t]!="undefined"?t:"roadmap":f?t:"roadmap",this.map_.setMapTypeId(t)},setView:function(n,t,i){mappl10n.options.engine=="leaflet"?(t==null&&(t=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(n,t,i)):(n=n&&!n.toJSON?{lat:parseFloat(n.lat),lng:parseFloat(n.lng)}:n,t=t?parseInt(t):null,n&&this.map_.setCenter(n),t&&this.map_.setZoom(t))},toJSON:function(){var n;for(this.pois=[],n=0;n<this.pois_.length;n++)this.pois.push(this.pois_[n].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}},ajaxSave:function(n){var t=this;this.postid||(this.postid=mappl10n.options.postid);mapp.lib.ajax({type:"POST",data:{action:"mapp_save",map:JSON.stringify(this),nonce:mappl10n.options.nonce},callback:function(i){var r,u;if(i.status=="OK"){t.mapid||(t.mapid=i.data.mapid);r=t.toJSON();for(u in r)t.model[u]=r[u];n()}}})}};mapp.Map.ajaxGet=function(n,t){mapp.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:n,nonce:mappl10n.options.nonce},callback:function(n){n.status=="OK"&&t(n.data.map)}})};mapp.Map.ajaxDelete=function(n,t){mapp.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:n,nonce:mappl10n.options.nonce},callback:function(n){n.status=="OK"&&t&&t()}})}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Directions=function(t,i){this.sel=n(t);this.map=i;var r=this;this.sel.on("keydown",function(n){n.which==13?(r.getDirections(),n.preventDefault()):n.which==27&&r.close()});this.sel.on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action"),u=n(".mapp-dir-daddr",r.sel).val(),f=n(".mapp-dir-saddr",r.sel).val();t.preventDefault();switch(i){case"dir-cancel":r.close();break;case"dir-get":r.getDirections();break;case"dir-swap":n(".mapp-dir-saddr",r.sel).val(u);n(".mapp-dir-daddr",r.sel).val(f)}});this.open=function(t,i){if(mappl10n.options.directions=="google"){this.openGoogle(t,i);return}this.map.toggleView("directions",!0);n(".mapp-dir-addr",this.sel).removeClass("mapp-error");n(".mapp-dir-saddr",this.sel).val(t);n(".mapp-dir-daddr",this.sel).val(i);n(".mapp-dir-get",this.sel).focus();n(".mapp-dir-saddr",this.sel).focus()};this.close=function(){this.map.toggleView("directions",!1)};this.getDirections=function(){var t=n(".mapp-dir-saddr",this.sel).val().trim(),i=n(".mapp-dir-daddr",this.sel).val().trim();this.map.close();this.openGoogle(t,i)};this.openGoogle=function(n,t){var i=mappl10n.options.directionsServer;i.toLowerCase().indexOf("http")==-1&&(i="https://"+i);i+="/maps/dir/?api=1&origin="+encodeURIComponent(n)+"&destination="+encodeURIComponent(t);window.open(i)}}}(jQuery);mapp=window.mapp||{};mapp.geocoders={};+function(n){mapp.geocoders.Algolia=function(n){this.map=n;this.places=algoliasearch.initPlaces()};mapp.geocoders.Algolia.prototype={geocode:function(n,t){var i=this;this.getPredictions(n,function(i){i&&i.hits.length?t({formatted_address:i.hits[0].locale_names[0],name:n,geometry:{location:{lat:i.hits[0]._geoloc.lat,lng:i.hits[0]._geoloc.lng}}}):t(null)})},getDetails:function(n,t){if(mappl10n.options.geocoder=="nominatim")return this.getNominatimDetails(n,t);if(mappl10n.options.geocoder=="mapbox"&&mappl10n.options.mapbox)return this.getMapboxDetails(n,t);t({formatted_address:n.value,name:n.name,geometry:{location:n.latlng}});return},getNominatimDetails:function(t,i){url="https://nominatim.openstreetmap.org/search?format=json&limit=1&q="+encodeURIComponent(t.value);url=mappl10n.options.country?url+"&countrycodes="+mappl10n.options.country.toLowerCase():url;url=mappl10n.options.language?url+"&accept-language="+mappl10n.options.language.toLowerCase():url;n.getJSON(url,function(n){if(n&&n.length){var r=n[0],u=r.boundingbox&&r.boundingbox.length==4?{sw:{lat:r.boundingbox[0],lng:r.boundingbox[2]},ne:{lat:r.boundingbox[1],lng:r.boundingbox[3]}}:null;i({formatted_address:r.display_name,name:t.name,geometry:{location:{lat:r.lat,lng:r.lon},viewport:u}})}else i({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})})},getMapboxDetails:function(t,i){url="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURIComponent(t.value)+".json?access_token="+mappl10n.options.mapbox;url=mappl10n.options.country?url+"&country="+mappl10n.options.country.toLowerCase():url;url=mappl10n.options.language?url+"&language="+mappl10n.options.language.toLowerCase():url;n.getJSON(url,function(n){if(n&&n.features&&n.features.length>0){var r=n.features[0],u=r.bbox&&r.bbox.length==4?{sw:{lat:r.bbox[1],lng:r.bbox[0]},ne:{lat:r.bbox[3],lng:r.bbox[2]}}:null;i({formatted_address:r.place_name,name:t.name,geometry:{location:{lat:r.center[1],lng:r.center[0]},viewport:u}})}else i({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})})},getPredictions:function(n,t){this.places.search({query:n,language:mappl10n.options.language},function(n,i){n||!i?t(null):t(i)})}}}(jQuery);+function(n){mapp.geocoders.Google=function(t){this.map=t;this.token=null;this.types=this.map.editable?null:["geocode"];var i=n('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0));this.autocompleteService=new google.maps.places.AutocompleteService;i.remove()};mapp.geocoders.Google.prototype={geocode:function(t,i){var r=this;this.getPredictions(t,function(t){t&&n.isArray(t)?r.getDetails(t[0],function(n){i(n)}):i(null)})},getDetails:function(n,t){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;this.token=null;var i={placeId:n.place_id,sessionToken:this.token};this.placesService.getDetails(i,function(n,i){if(i=="OK"&&n&&n.geometry){if(n.geometry.location&&(n.geometry.location=n.geometry.location.toJSON()),n.geometry.viewport){var r=n.geometry.viewport.toJSON();n.geometry.viewport={sw:{lat:r.south,lng:r.west},ne:{lat:r.north,lng:r.east}}}t(n)}else t(null)})},getPredictions:function(n,t){var i,r;this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;i=this.map.getMap().getBounds();i=i?i:new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180));r={input:n,bounds:i,sessionToken:this.token,types:this.types};this.autocompleteService.getPlacePredictions(r,function(n,i){i=="OK"&&n&&n.length?t(n):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),t(null))})}}}(jQuery);mapp=window.mapp||{};mapp.Icons={};mapp.Icons.get=function(){var n="https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png";return mappl10n.options.engine=="leaflet"?L.icon({iconUrl:n,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:n}};mapp.Icons.getUrl=function(){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"};mapp=window.mapp||{};+function(n){mapp.InfoBox=function(t,i){var f=n.extend({border:20},i),u=null,r=null,o,e=this;r=n('<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib" tabindex="0"><\/div><div class="mapp-ib-tip"><\/div><\/div>').appendTo(t.getMap().getDiv());jQuery(window).resize(function(){e.close()});r.on("keydown",function(n){n.which==27&&e.close()});r.on("click",".mapp-close",function(){e.close()});this.getContent=function(){return n(".mapp-ib",r)};this.setContent=function(t){n(".mapp-ib",r).empty().append(t)};this.open=function(n,t){u=t;this.setMap(n)};this.onAdd=function(){o=!1;var t=n(":input",r);r.show();t.length?t.first().focus():r.focus();google.maps.event.trigger(e,"domready")};this.draw=function(){var l=this.getMap(),a=n(".mapp-ib-body",r),s=this.getProjection().fromLatLngToContainerPixel(u.position),t,h,c,i,e;o||(o=!0,t={width:n(":first-child",l.getDiv()).width(),height:n(":first-child",l.getDiv()).height()},r.css({"max-height":"9999px",left:0,bottom:0,top:"auto",right:"auto"}),h=r.outerWidth(!0),c=r.outerHeight(!0),c>t.height+u.anchorPoint.y-2*f.border&&(c=t.height+u.anchorPoint.y-2*f.border,r.css({"max-height":c+2})),i=s.x,e=s.y,i+h/2>t.width&&(i=t.width-h/2),i-h/2<0&&(i=h/2),e-c+u.anchorPoint.y<f.border&&(e=c-u.anchorPoint.y+f.border),e>t.height&&(e=t.height),(s.x-i||s.y-e)&&l.panBy(s.x-i,s.y-e),r.css({left:i-h/2,bottom:t.height-e-u.anchorPoint.y}))};this.close=function(){r.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))};this.onRemove=function(){r.hide()}};mappl10n.options.engine!="leaflet"&&(mapp.InfoBox.prototype=new google.maps.OverlayView)}(jQuery);mapp=window.mapp||{};+function(n){mapp.lib={ajax:function(t){var i=this;return n.extend({type:"GET",data:null,spinner:null,callback:n.noop},t),t.spinner&&t.spinner.show(),n.ajax({type:t.type,url:mappl10n.options.ajaxurl,data:t.data,success:function(n,r,u){if(t.spinner&&t.spinner.hide(),n.status!="OK"){var f=typeof n=="object"?n.status:n;i.alert("AJAX ERROR\r\nResponse="+f+" TextStatus="+r+"\r\nResponseText="+u.responseText)}if(n.output){i.log("AJAX Output\r\n"+n.output);return}t.callback&&t.callback(n,u)},error:function(n,r,u){(t.spinner&&t.spinner.hide(),r!="cancel")&&typeof u!="undefined"&&u!=""&&i.alert("AJAX ERROR\r\nTextStatus="+r+"\r\nError="+u+"\r\nResponseText="+n.responseText)}})},alert:function(n){mappl10n.options.admin||mappl10n.options.debug?alert(n):window.console&&console.error(n)},jqVersionCheck:function(t){if(typeof n=="undefined"||typeof t=="undefined")return!1;for(t=t.split("."),v=n.fn.jquery.split("."),i=0;i<t.length;i++){var r=parseInt(t[i]),u=typeof v[i]!="undefined"?parseInt(v[i]):0;if(u!=r)return u>r}return!0},log:function(n){window.console&&console.error(n)},scrollTo:function(n,t){if(n&&t&&n.length&&t.length){var r=n.scrollTop(),u=n.height(),i=r+t.position().top,f=i+t.outerHeight(!0);i<r?n.scrollTop(i):f>r+u&&n.scrollTop(i)}},template:function(t,i){if(mapp.lib.templates=mapp.lib.templates?mapp.lib.templates:{},!mapp.lib.templates[t]){var r=mappl10n.options.templates?mappl10n.options.template[t]:n("#mapp-tmpl-"+t).html();if(r)mapp.lib.templates[t]=_.template(r.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});else return""}return mapp.lib.templates[t](i)}};mapp.lib.jqVersionCheck("1.7")||mapp.lib.alert("jQuery version is too old: "+n.fn.jquery);n("body").on("tabsactivate tabsshow",function(t,i){var r=i.newPanel?i.newPanel:i.panel;r&&n(".mapp-layout",r).each(function(){var i=n(this).find(".mapp-canvas").attr("id"),t=window[i];t.resize();t.recenter()})})}(jQuery);+function(){mappl10n.options.engine=="leaflet"&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(this.lat*1e6)/1e6+", "+Math.round(this.lng*1e6)/1e6});mapp.event={addListener:function(n,t,i){for(var u=t.split(" "),r=0;r<u.length;r++)if(mappl10n.options.engine=="leaflet")n.on(u[r],i);else google.maps.event.addListener(n,u[r],i)},addListenerOnce:function(n,t,i){for(var u=t.split(" "),r=0;r<u.length;r++)if(mappl10n.options.engine=="leaflet")n.once(u[r],i);else google.maps.event.addListenerOnce(n,u[r],i)},clearInstanceListeners:function(n){mappl10n.options.engine=="leaflet"?n.off():google.maps.event.clearInstanceListeners(n)},clearListeners:function(n,t){mappl10n.options.engine=="leaflet"?n.off(t):google.maps.event.clearListeners(n,t)},trigger:function(n,t,i){mappl10n.options.engine=="leaflet"?n.fire(t,i):google.maps.event.trigger(n,t,i)}}}(jQuery);mapp=window.mapp||{};jQuery.fn.AlgoliaAutocomplete=jQuery.fn.autocomplete.noConflict();+function(n){mapp.Places=function(t,i){var r=this;this.sel=n(t);this.opts=n.extend({map:null},i);this.geocoder=mappl10n.options.engine=="leaflet"?new mapp.geocoders.Algolia(this.opts.map):new mapp.geocoders.Google(this.opts.map);this.sel.on("keydown",function(t){if(t.which==13){t.preventDefault();var i=r.parseLatLng(r.sel.val());i&&(n(r).triggerHandler("search.mapp",i),r.sel.AlgoliaAutocomplete("close"),t.stopImmediatePropagation());r.sel.val().substring(0,4)=="http"&&(n(r).triggerHandler("search.mapp",r.sel.val()),r.sel.AlgoliaAutocomplete("close"),t.stopImmediatePropagation())}});this.autocomplete()};mapp.Places.prototype={parse:function(t,i){var f=this,u=t&&t.name?n.trim(t.name):n.trim(t),r;if(!u){i(null);return}if(u=="user"){this.geolocate(function(n){i(n)});return}if(t&&t.geometry){i(t);return}if(r=this.parseLatLng(t),r){i(r);return}this.geocoder.geocode(t,function(n){i(n)})},parseLatLng:function(t){var i,e,r,u,f;return t.lat&&t.lng?i=t:(e=t&&t.name?n.trim(t.name):n.trim(t),r=e.split(","),r.length==2&&(u=parseFloat(r[0]),f=parseFloat(r[1]),isNaN(u)||isNaN(f)||(i={lat:u,lng:f}))),i?{name:i.lat+", "+i.lng,geometry:{location:i}}:null},geolocate:function(n){var t=this;if(!navigator||!navigator.geolocation){alert(mappl10n.no_geolocate);return}navigator.geolocation.getCurrentPosition(function(t){var i={lat:t.coords.latitude,lng:t.coords.longitude};n({name:i.lat+", "+i.lng,geometry:{location:i}})},function(t){var i=t&&t.message?" : "+t.message:"";alert(mappl10n.no_geolocate+i);n(null)},{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4})},autocomplete:function(){var t=this,r,i,u;this.sel.on("autocomplete:selected",function(i,r){t.geocoder.getDetails(r,function(i){t.parse(i,function(i){i&&n(t).triggerHandler("search.mapp",i)})})});r={empty:function(n,t){return t&&mappl10n.options.pro&&n&&n.toLowerCase().substring(0,4)=="http"?"":'<div class="list-group search-results-dropdown"><div class="list-group-item">'+mappl10n.no_results+"<\/div><\/div>"},header:'<div class="list-group search-results-dropdown">'};mappl10n.options.engine=="leaflet"?(i={algoliasearch:algoliasearch,templates:r},mappl10n.options.country&&(i.countries=[mappl10n.options.country]),mappl10n.options.language&&(i.language=mappl10n.options.language),u=placesAutocompleteDataset(i)):u={display:"description",source:function(n,i){t.geocoder.getPredictions(n,function(n){matches=n;i(matches)})},templates:r};this.sel.AlgoliaAutocomplete({autoselect:!0,cssClasses:{prefix:"mapp-aa"},debug:!1,hint:!0,highlight:!0,minLength:1},u)}}}(jQuery);mapp=window.mapp||{};+function(n){mapp.Poi=function(t){var u,f,r,o,i,e,h,s;if(this.defaults={address:null,body:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},n.extend(this,this.defaults,t),t&&t.correctedAddress&&(this.address=t.correctedAddress),mappl10n.options.engine=="leaflet"&&this.isPoly()&&(this.type=null),t.viewport&&t.viewport.sw&&t.viewport.ne&&t.viewport.sw.lat&&(u=t.viewport.sw,f=t.viewport.ne,this.viewport=mappl10n.options.engine=="leaflet"?new L.LatLngBounds(L.latLng(u.lat,u.lng),L.latLng(f.lat,f.lng)):new google.maps.LatLngBounds(new google.maps.LatLng(u.lat,u.lng),new google.maps.LatLng(f.lat,f.lng))),r=[],o=[],!t.overlay)switch(this.type){case"polygon":if(t.poly&&t.poly.paths)for(i=0;i<t.poly.paths.length;i++){for(r=[],e=0;e<t.poly.paths[i].length;e++)r.push(new google.maps.LatLng(t.poly.paths[i][e].lat,t.poly.paths[i][e].lng));o.push(new google.maps.MVCArray(r))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(o)});this.setColors(t.poly);break;case"polyline":if(t.poly&&t.poly.path)for(i=0;i<t.poly.path.length;i++)r.push(new google.maps.LatLng(t.poly.path[i].lat,t.poly.path[i].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(r)});this.setColors(t.poly);break;case"circle":h=new google.maps.LatLng(t.point.lat,t.point.lng);this.overlay=new google.maps.Circle({center:h,radius:parseFloat(t.poly.radius)});this.setColors(t.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport});this.setColors(t.poly);break;case"kml":s=t.kml&&t.kml.url?t.kml.url:"";this.overlay=mappl10n.options.engine=="leaflet"?omnivore.kml(s):new google.maps.KmlLayer(s,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:this.overlay=mappl10n.options.engine=="leaflet"?L.marker([t.point.lat,t.point.lng],{title:t.title}):new google.maps.Marker({position:new google.maps.LatLng(t.point.lat,t.point.lng),title:t.title})}t.type||this.setIcon(t.iconid)};mapp.Poi.prototype={toJSON:function(){var n={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},u=this.getPosition(),i,t,r;if(n.point=u.toJSON(),i=this.viewport?this.viewport:this.getBounds(),i&&(t=i.toJSON(),n.viewport={sw:{lat:t.south,lng:t.west},ne:{lat:t.north,lng:t.east}}),this.type=="kml"&&(n.kml=this.kml),this.isPoly()){n.poly=this.getColors();switch(this.type){case"circle":n.poly.radius=this.overlay.getRadius();break;case"polyline":n.poly.path=[];this.overlay.getPath().forEach(function(t){n.poly.path.push(t.toJSON())});break;case"polygon":n.poly.paths=[];this.overlay.getPaths().forEach(function(t){var i=[];t.forEach(function(n){i.push(n.toJSON())});n.poly.paths.push(i)});break;case"rectangle":r=this.overlay.getBounds();n.viewport={sw:r.getSouthWest().toJSON(),ne:r.getNorthEast().toJSON()}}}return n},setMap:function(n){var t=this;if(this.map=n,mapp.event.clearInstanceListeners(this.overlay),n==null){mappl10n.options.engine=="leaflet"?this.overlay.remove():this.overlay.setMap(null);return}this.type=="kml"&&(mappl10n.options.engine=="leaflet"?(mapp.event.addListenerOnce(this.overlay,"ready",function(){t.viewport=t.overlay.getBounds()}),mapp.event.addListenerOnce(this.overlay,"error",function(){alert(mappl10n.kml_error)})):(mapp.event.addListener(this.overlay,"defaultviewport_changed",function(){t.viewport=t.overlay.getDefaultViewport()}),mapp.event.addListener(this.overlay,"status_changed",function(){var n=t.overlay.getStatus();n!="OK"&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+n)})));mapp.event.addListener(this.overlay,"click",function(n){t.open(n)});this.setEditable(this.map.editable);mappl10n.options.engine=="leaflet"?this.overlay.addTo(n.getMap()):this.overlay.setMap(n.getMap())},setEditable:function(n){var t=this;this.type!="kml"&&(mappl10n.options.engine=="leaflet"?this.overlay.options.draggable=n:this.overlay.setDraggable(n),this.isPoly()&&this.overlay.setEditable(n),mapp.event.clearListeners(this.overlay,"rightclick"),mapp.event.clearListeners(this.overlay,"dragstart"),n&&(mapp.event.addListener(this.overlay,"dragstart",function(){t.viewport=null;t.map.close()}),(this.type=="polygon"||this.type=="polyline")&&mapp.event.addListener(this.overlay,"rightclick",function(n){n.vertex!=null&&t.overlay.getPath().getLength()>2&&t.overlay.getPath().removeAt(n.vertex)})))},setZIndex:function(n){mappl10n.options.engine=="leaflet"?this.type||this.overlay.setZIndexOffset(n):this.overlay.set("zIndex",n)},setIcon:function(n){this.type||typeof mapp.Icons=="undefined"||(this.iconid=n,mappl10n.options.engine=="leaflet"?this.overlay.setIcon(mapp.Icons.get(n)):(this.overlay.setIcon(null),this.overlay.setIcon(mapp.Icons.get(n))))},setVisible:function(n){typeof this.overlay.setVisible!="undefined"&&this.overlay.setVisible(n)},setColors:function(n){var i={};for(var t in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})n&&typeof n[t]!="undefined"&&(i[t]=n[t]);this.overlay.setOptions(i)},setTemplateColors:function(n,t,i){var r=this.type=="polyline"?{strokeColor:n,strokeOpacity:t/100,strokeWeight:i}:{fillColor:n,fillOpacity:t/100,strokeColor:n,strokeWeight:i,strokeOpacity:1};this.setColors(r)},getColors:function(){var t={};for(var n in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})typeof this.overlay[n]!="undefined"&&(t[n]=this.overlay[n]);return t},getTemplateColors:function(){var n=this.getColors();return this.type=="polyline"?{color:n.strokeColor,opacity:n.strokeOpacity*100,weight:n.strokeWeight}:{color:n.fillColor,opacity:n.fillOpacity*100,weight:n.strokeWeight}},center:function(n){var t=this.getBounds();if(typeof n=="number"){this.map.setView(this.getPosition(),n);return}if(!t){this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));return}this.map.fitBounds(t);this.map.setView(this.getPosition(),n,{animate:!1})},open:function(n){this.map.open(this,n)},isPoly:function(){return jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])!=-1},getBounds:function(){var n;switch(this.type){case"polyline":n=new google.maps.LatLngBounds;this.overlay.getPath().forEach(function(t){n.extend(t)});break;case"polygon":n=new google.maps.LatLngBounds;this.overlay.getPaths().forEach(function(t){t.forEach(function(t){n.extend(t)})});break;case"rectangle":case"circle":n=this.overlay.getBounds();break;case"kml":n=mappl10n.options.engine=="leaflet"?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport();n=n?n:this.viewport;break;default:return this.viewport}return n},getPosition:function(n){if(!this.type)return mappl10n.options.engine=="leaflet"?this.overlay.getLatLng():this.overlay.getPosition();if(this.type=="kml"&&n&&n.latLng)return n.latLng;var t=this.getBounds();return t?t.getCenter():mappl10n.options.engine=="leaflet"?new L.latLng(0,0):new google.maps.LatLng(0,0)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(n){var t=this.isPoly()?"poly":this.type;switch(t){case"kml":return mappl10n.options.engine=="leaflet"?[0,0]:n&&n.pixelOffset?new google.maps.Point(n.pixelOffset.width,n.pixelOffset.height):new google.maps.Point(0,0);case"poly":return mappl10n.options.engine=="leaflet"?[0,0]:new google.maps.Point(0,0);default:return mappl10n.options.engine=="leaflet"?this.overlay.options.icon.options.popupAnchor?this.overlay.options.icon.options.popupAnchor:[0,-32]:typeof this.overlay.anchorPoint!="undefined"?this.overlay.anchorPoint:new google.maps.Point(0,-32)}},render:function(n,t){var i=_.extend(this,{icon:mapp.Icons.getUrl(this.iconid)});return t&&(i.body=t.description,i.title=t.name),mapp.lib.template(this.map.templates[n],{poi:i,colors:this.getTemplateColors()})}}}(jQuery);mapp=window.mapp||{};mapp.widgets={};+function(n){mapp.widgets.Grid=function(t,i){this.el=n(t);this.options=jQuery.extend({action:null,sortable:!1},i);var r=this;this.table=n("table",this.el);this.template=n("script",this.el).html().replace(new RegExp("'","g"),'"');this.el.on("click",function(t){var u=n(t.target),i=u.attr("data-mapp-action");i&&(r[i](t),t.preventDefault())})};mapp.widgets.Grid.prototype={add:function(){this.table.show();var t=n(this.template).appendTo(this.table);n(":input:eq(0)",t).focus()},remove:function(t){var i=n(t.target).closest("tr").remove();n("tbody > tr",this.table).length||this.table.hide()}}}(jQuery);+function(n){mapp.widgets.Popup=function(t,i){this.activeToggle=null;this.backdrop=null;this.content=n(t);this.el=null;var r=this;if(this.options=n.extend({closeButton:!1,closeOnEsc:!0,max:!1,modal:!1,onRequestClose:null,position:null,toggle:null},i),this.el=n('<div class="mapp-popup">'),this.setContent(t),this.el.attr("tabindex",0),this.options.max&&this.el.addClass("mapp-popup-max"),this.el.hide(),this.options.toggle)n(document).on("click",n(this.options.toggle).selector,function(t){r.activeToggle=n(this);r.open();t.stopPropagation()});if(this.options.modal){if(this.el.addClass("mapp-popup-modal"),this.backdrop=n('<div class="mapp-popup-backdrop"><\/div>'),n("body").append(this.backdrop),this.options.closeOnEsc)n(this.backdrop).on("click",function(){r.requestClose()})}else n(document).on("click",function(n){r.el.has(n.target).length||r.el.get(0)==n.target||r.requestClose()});this.el.on("click",".mapp-close",function(){r.requestClose()});this.el.on("keydown",function(n){n.which==27&&r.options.closeOnEsc&&r.requestClose()});return this};mapp.widgets.Popup.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),this.options.modal&&(this.backdrop.hide(),n("body").removeClass("mapp-popup-noscroll")),this.activeToggle&&this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},open:function(){var t=this;this.el.parent().length||this.el.appendTo("body");this.el.show();this.options.modal?(this.backdrop.show(),n("body").addClass("mapp-popup-noscroll")):this.el.position(n.extend({my:"center top",at:"center bottom + 5",of:this.activeToggle,collision:"flipfit"},this.options.position));this.el.focus();this.el.trigger("open.mapp.popup")},requestClose:function(){this.options.onRequestClose?this.options.onRequestClose():this.close()},setContent:function(n){this.el.empty();this.options.closeButton&&this.el.append('<span class="mapp-close">');this.el.append(n)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery);+function(){mapp.load=function(){if(typeof mapp!="undefined"&&mapp.data)while(mapp.data.length){var n=mapp.data.pop();window[n.name]=new mapp.Map(n);window[n.name].display()}}}(jQuery);typeof mapp.Media!="undefined"?window.mappMedia=new mapp.Media:mapp.load()
js/mappress_editor.min.js CHANGED
@@ -1 +1 @@
1
- var mapp=window.mapp||{};+function(n){mapp.Media=function(){this.editor=null;this.map=null;this.settings=null;this.sel=n(".mapp-media");this.items=null;var t=this;this.initialize=function(){this.find();this.sel.on("change",".mapp-media-list-type",function(){var i=n(".mapp-media-list-type",this.sel).val();n(".mapp-media-search").val("");n(".mapp-media-search").toggle(i=="all");t.find()});this.sel.on("keydown",".mapp-media-search",function(n){if(n.which==13)return!1});this.sel.on("input",".mapp-media-search",function(){t.find()});this.settings={editable:!0,name:"mapp0"};this.sel.on("click","[data-mapp-media]",function(i){i.preventDefault();var r=n(this).attr("data-mapp-media");t[r]()});this.sel.on("click",".mapp-media-list .mapp-item",function(){n(".mapp-media-list .mapp-item",this.sel).removeClass("mapp-active");n(this).addClass("mapp-active")});this.sel.on("click",".mapp-media-list [data-mapp-media-list]",function(i){i.preventDefault();var r=n(this).attr("data-mapp-media-list"),u=n(this).closest(".mapp-item"),f=u.attr("data-mapp-mapid");return t[r](f),!1});this.sel.on("change",".mapp-media-viewport",function(){n(this).is(":checked")||(t.map.center=t.map.zoom=null,t.map.recenter())});n(".mapp-media-size").click(function(t){var i=n(this).data("width"),r=n(this).data("height");n(".mapp-media-width").val(i);n(".mapp-media-height").val(r);t.preventDefault()});n("#publish, #post-preview").click(function(){t.save()});n(".mapp-media-title").keydown(function(n){n.which==13&&(n.preventDefault(),t.save())})};this.add=function(){var n=new mapp.Map(this.settings);n.width=mappl10n.options.sizes[mappl10n.options.size].width;n.height=mappl10n.options.sizes[mappl10n.options.size].height;t.open(n)};this.cancel=function(){t.closeEditor()};this.closeEditor=function(){this.editor.close();this.map=null;this.editor=null;n(".mapp-media-edit-panel").hide();n(".mapp-media-list-panel").show()};this.edit=function(n){mapp.Map.ajaxGet(n,this.settings,function(n){t.open(n)})};this.find=function(){var t=this;this.items!==null?this.renderList():(n(".spinner",this.sel).css("visibility","visible"),mapp.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(i){i.status=="OK"&&(n(".spinner",this.sel).css("visibility","hidden"),t.items=_.sortBy(i.data,"post_title"),t.renderList())}}))};this.insert=function(n){n=n?n:this.map.mapid;var t='[mappress mapid="'+n+'"]';send_to_editor(t)};this.open=function(t){this.map=t;n(".mapp-edit",this.sel).html(mapp.lib.template("edit-map"));var i=this.map.mapid;i?n(".mapp-media-mapid").text(i):n(".mapp-media-mapid").text("");n(".mapp-media-title").val(this.map.title);n(".mapp-media-width").val(this.map.width);n(".mapp-media-height").val(this.map.height);n(".mapp-media-viewport").prop("checked",!!(this.map.center&&this.map.zoom));n(".mapp-media-edit-panel").show();n(".mapp-media-list-panel").hide();this.editor=new mapp.Editor(this.map)};this.remove=function(n){if(confirm(mappl10n.delete_map_prompt)){var t=_.findIndex(this.items,{mapid:n});t>-1&&(this.items.splice(t,1),mapp.Map.ajaxDelete(n),this.renderList())}};this.renderList=function(){var t=null,i=400,r=null,u=n(".mapp-media-list-type",this.sel).val(),f=n(".mapp-media-search",this.sel).val().toLowerCase();t=u=="all"?_.filter(this.items,function(n){return n.post_title&&n.post_title.toLowerCase().indexOf(f)!=-1||n.map_title&&n.map_title.toLowerCase().indexOf(f)!=-1}):_.filter(this.items,function(n){return n.postid==mappl10n.options.postid});t.length>i?(r=mappl10n.more.replace("%d",i).replace("%d",t.length),t=t.slice(0,i)):r="";n(".mapp-media-list",this.sel).html(mapp.lib.template("media-list",{items:t,type:u,more:r}))};this.save=function(){var t=this;this.map&&(this.map.title=n.trim(n(".mapp-media-title").val()),this.map.width=n(".mapp-media-width").val(),this.map.height=n(".mapp-media-height").val(),n(".mapp-media-viewport").prop("checked")?(this.map.center=this.map.getMap().getCenter().toJSON(),this.map.zoom=this.map.getMap().getZoom()):(this.map.center=null,this.map.zoom=null),this.map.ajaxSave(function(){var i=t.map.mapid?t.map.mapid.toString():null,r=_.findIndex(t.items,function(n){return n.mapid==i});r==-1?t.items.unshift({mapid:i,map_title:t.map.title,postid:mappl10n.options.postid,post_title:n("#title").val()||n("#post-title-0").val()}):t.items[r].map_title=t.map.title;t.renderList();t.closeEditor()}))};this.initialize.apply(this)}}(jQuery);+function(n){mapp.Editor=function(t){this.drawingManager=null;this.map=t;this.poiEditor=null;this.sel=n(".mapp-edit");var i=this;this.initialize=function(){this.map.display();this.poiEditor=new mapp.PoiEditor(this.map);this.initDrawingManager();n(this.map.places).off("search.mapp");n(this.map.places).on("search.mapp",function(n,t){i.insertPoi(t)});this.sel.on("click","[data-mapp-editor]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-editor");i[r]()})};this.close=function(){this.map.close()};this.insertPoi=function(n){var t;if(n)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.close(),n.geometry){var i=n.formatted_address?n.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,r=n.name==i?"":i,t=new mapp.Poi({address:i,body:r,iconid:this.poiEditor.lastIcon,point:n.geometry.location,title:n.name,viewport:n.geometry.viewport?n.geometry.viewport:null});this.map.insertPoi(t);t.center()}else n.overlay&&(t=new mapp.Poi({body:"",iconid:n.type=="marker"?null:"poly",overlay:n.overlay,title:n.type=="marker"?n.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:n.type=="marker"?null:n.type}),this.map.insertPoi(t))};this.initDrawingManager=function(){};this.layer=function(){var n=window.prompt(mappl10n.layer);n&&i.insertPoi(n)};this.initialize.apply(this)};mapp.PoiEditor=function(t){this.map=t;this.poi=null;this.sel=null;this.lastIcon=null;var i=this;this.initialize=function(){this.sel=n(this.map.iw.getContent());n(this.map).on("mapp.open",function(n,t){i.render(t)});n(this.map).on("mapp.close",function(){i.mce(!1)});this.sel.on("click","[data-mapp-poi]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-poi");i[r]()});this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",function(){var t=n(this).hasClass("mapp-poi-visual");i.mce(t)});this.sel.on("keydown",function(t){t.which==13&&t.target!=n("#mapp-poi-body")&&(t.preventDefault(),i.save())});this.sel.on("change","[data-mapp-iconpicker]",function(){i.poi.setIcon(n("[data-mapp-iconpicker]").attr("data-mapp-iconid"));i.lastIcon=i.poi.iconid;i.map.renderList()});this.sel.on("change","[data-mapp-colorpicker]",function(){i.poi.setTemplateColors(n("[data-mapp-colorpicker]").attr("data-mapp-color"),n("[data-mapp-colorpicker]").attr("data-mapp-opacity"),n("[data-mapp-colorpicker]").attr("data-mapp-weight"));i.map.renderList()})};this.cancel=function(){this.map.close()};this.initMCE=function(){var n,t,i;typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(n="en",typeof tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(t=window.tinyMCEPreInit.mceInit.content,n=typeof t.language!="undefined"?t.language:"en"),i={mode:"none",height:"75px",convert_urls:!1,language:n,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",toolbar2:"",toolbar3:"",toolbar4:""},tinyMCE.init(i),this.mce(!0))};this.mce=function(t){var r=t?"mceAddEditor":"mceRemoveEditor";typeof tinyMCE!="undefined"&&tinyMCE.execCommand(r,!1,"mapp-poi-body");n(".mapp-poi-visual, .mapp-poi-html",i.sel).removeClass("mapp-active");t?n(".mapp-poi-visual",i.sel).addClass("mapp-active"):n(".mapp-poi-html",i.sel).addClass("mapp-active")};this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.close(),this.map.removePoi(this.poi))};this.render=function(t){this.poi=t;n("[data-mapp-iconpicker]").trigger("refresh");n("[data-mapp-colorpicker]").trigger("refresh");this.initMCE()};this.save=function(){typeof tinyMCE!="undefined"&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save();this.poi.title=n(".mapp-poi-title").val();this.poi.body=n(".mapp-poi-body").val();this.map.renderList();this.map.close()};this.initialize.apply(this)}}(jQuery)
1
+ var mapp=window.mapp||{};+function(n){mapp.Media=function(){this.editor=null;this.map=null;this.settings={editable:!0,name:"mapp0"};this.sel=n(".mapp-media");this.items=null;var t=this;this.initialize=function(){this.find();this.sel.on("change",".mapp-media-list-type",function(){var i=n(".mapp-media-list-type",this.sel).val();n(".mapp-media-search").val("");n(".mapp-media-search").toggle(i=="all");t.find()});this.sel.on("keydown",".mapp-media-search",function(n){if(n.which==13)return!1});this.sel.on("input",".mapp-media-search",function(){t.find()});this.sel.on("click","[data-mapp-media]",function(i){i.preventDefault();var r=n(this).attr("data-mapp-media");t[r]()});this.sel.on("click",".mapp-media-list .mapp-item",function(){n(".mapp-media-list .mapp-item",this.sel).removeClass("mapp-active");n(this).addClass("mapp-active")});this.sel.on("click",".mapp-media-list [data-mapp-media-list]",function(i){i.preventDefault();var r=n(this).attr("data-mapp-media-list"),u=n(this).closest(".mapp-item"),f=u.attr("data-mapp-mapid");return t[r](f),!1});this.sel.on("change",".mapp-media-viewport",function(){n(this).is(":checked")||(t.map.center=t.map.zoom=null,t.map.recenter())});n(".mapp-media-size").click(function(t){var i=n(this).data("width"),r=n(this).data("height");n(".mapp-media-width").val(i);n(".mapp-media-height").val(r);t.preventDefault()});n("#publish, #post-preview").click(function(){t.save()});n(".mapp-media-title").keydown(function(n){n.which==13&&(n.preventDefault(),t.save())})};this.add=function(){var n=new mapp.Map({},this.settings);n.width=mappl10n.options.sizes[mappl10n.options.size].width;n.height=mappl10n.options.sizes[mappl10n.options.size].height;t.open(n)};this.cancel=function(){t.closeEditor()};this.closeEditor=function(){this.editor.close();this.map=null;this.editor=null;n(".mapp-media-edit-panel").hide();n(".mapp-media-list-panel").show()};this.edit=function(n){mapp.Map.ajaxGet(n,function(n){var i=new mapp.Map(n,t.settings);t.open(i)})};this.find=function(){var t=this;this.items!==null?this.renderList():(n(".spinner",this.sel).css("visibility","visible"),mapp.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(i){i.status=="OK"&&(n(".spinner",this.sel).css("visibility","hidden"),t.items=_.sortBy(i.data,"post_title"),t.renderList())}}))};this.insert=function(n){n=n?n:this.map.mapid;var t='[mappress mapid="'+n+'"]';send_to_editor(t)};this.open=function(t){this.map=t;n(".mapp-edit",this.sel).html(mapp.lib.template("edit-map"));var i=this.map.mapid;i?n(".mapp-media-mapid").text(i):n(".mapp-media-mapid").text("");n(".mapp-media-title").val(this.map.title);n(".mapp-media-width").val(this.map.width);n(".mapp-media-height").val(this.map.height);n(".mapp-media-viewport").prop("checked",!!(this.map.center&&this.map.zoom));n(".mapp-media-edit-panel").show();n(".mapp-media-list-panel").hide();this.editor=new mapp.Editor(this.map)};this.remove=function(n){if(confirm(mappl10n.delete_map_prompt)){var t=_.findIndex(this.items,{mapid:n});t>-1&&(this.items.splice(t,1),mapp.Map.ajaxDelete(n),this.renderList())}};this.renderList=function(){var t=null,i=400,r=null,u=n(".mapp-media-list-type",this.sel).val(),f=n(".mapp-media-search",this.sel).val().toLowerCase();t=u=="all"?_.filter(this.items,function(n){return n.post_title&&n.post_title.toLowerCase().indexOf(f)!=-1||n.map_title&&n.map_title.toLowerCase().indexOf(f)!=-1}):_.filter(this.items,function(n){return n.postid==mappl10n.options.postid});t.length>i?(r=mappl10n.more.replace("%d",i).replace("%d",t.length),t=t.slice(0,i)):r="";n(".mapp-media-list",this.sel).html(mapp.lib.template("media-list",{items:t,type:u,more:r}))};this.save=function(){var t=this;this.map&&(this.map.title=n.trim(n(".mapp-media-title").val()),this.map.width=n(".mapp-media-width").val(),this.map.height=n(".mapp-media-height").val(),n(".mapp-media-viewport").prop("checked")?(this.map.center=this.map.getMap().getCenter().toJSON(),this.map.zoom=this.map.getMap().getZoom()):(this.map.center=null,this.map.zoom=null),this.map.ajaxSave(function(){var i=t.map.mapid?t.map.mapid.toString():null,r=_.findIndex(t.items,function(n){return n.mapid==i});r==-1?t.items.unshift({mapid:i,map_title:t.map.title,postid:mappl10n.options.postid,post_title:n("#title").val()||n("#post-title-0").val()}):t.items[r].map_title=t.map.title;t.renderList();t.closeEditor()}))};this.initialize.apply(this)}}(jQuery);+function(n){mapp.Editor=function(t){this.drawingManager=null;this.map=t;this.poiEditor=null;this.sel=n(".mapp-edit");var i=this;this.initialize=function(){this.map.display();this.poiEditor=new mapp.PoiEditor(this.map);this.initDrawingManager();n(this.map.places).off("search.mapp");n(this.map.places).on("search.mapp",function(n,t){i.insertPoi(t)});this.sel.on("click","[data-mapp-editor]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-editor");i[r]()})};this.close=function(){this.map.close()};this.insertPoi=function(n){var t;if(n)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.close(),n.geometry){var i=n.formatted_address?n.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,r=n.name==i?"":i,t=new mapp.Poi({address:i,body:r,iconid:this.poiEditor.lastIcon,point:n.geometry.location,title:n.name,viewport:n.geometry.viewport?n.geometry.viewport:null});this.map.insertPoi(t);t.center()}else n.overlay&&(t=new mapp.Poi({body:"",iconid:n.type=="marker"?null:"poly",overlay:n.overlay,title:n.type=="marker"?n.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:n.type=="marker"?null:n.type}),this.map.insertPoi(t))};this.initDrawingManager=function(){};this.layer=function(){var n=window.prompt(mappl10n.layer);n&&i.insertPoi(n)};this.initialize.apply(this)};mapp.PoiEditor=function(t){this.map=t;this.poi=null;this.sel=null;this.lastIcon=null;var i=this;this.initialize=function(){this.sel=n(this.map.iw.getContent());n(this.map).on("mapp.open",function(n,t){i.render(t)});n(this.map).on("mapp.close",function(){i.mce(!1)});this.sel.on("click","[data-mapp-poi]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-poi");i[r]()});this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",function(){var t=n(this).hasClass("mapp-poi-visual");i.mce(t)});this.sel.on("keydown",function(t){t.which==13&&t.target!=n("#mapp-poi-body")&&(t.preventDefault(),i.save())});this.sel.on("change","[data-mapp-iconpicker]",function(){i.poi.setIcon(n("[data-mapp-iconpicker]").attr("data-mapp-iconid"));i.lastIcon=i.poi.iconid;i.map.renderList()});this.sel.on("change","[data-mapp-colorpicker]",function(){i.poi.setTemplateColors(n("[data-mapp-colorpicker]").attr("data-mapp-color"),n("[data-mapp-colorpicker]").attr("data-mapp-opacity"),n("[data-mapp-colorpicker]").attr("data-mapp-weight"));i.map.renderList()})};this.cancel=function(){this.map.close()};this.initMCE=function(){var n,t,i;typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(n="en",typeof tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(t=window.tinyMCEPreInit.mceInit.content,n=typeof t.language!="undefined"?t.language:"en"),i={mode:"none",height:"75px",convert_urls:!1,language:n,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",toolbar2:"",toolbar3:"",toolbar4:""},tinyMCE.init(i),this.mce(!0))};this.mce=function(t){var r=t?"mceAddEditor":"mceRemoveEditor";typeof tinyMCE!="undefined"&&tinyMCE.execCommand(r,!1,"mapp-poi-body");n(".mapp-poi-visual, .mapp-poi-html",i.sel).removeClass("mapp-active");t?n(".mapp-poi-visual",i.sel).addClass("mapp-active"):n(".mapp-poi-html",i.sel).addClass("mapp-active")};this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.close(),this.map.removePoi(this.poi))};this.render=function(t){this.poi=t;n("[data-mapp-iconpicker]").trigger("refresh");n("[data-mapp-colorpicker]").trigger("refresh");this.initMCE()};this.save=function(){typeof tinyMCE!="undefined"&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save();this.poi.title=n(".mapp-poi-title").val();this.poi.body=n(".mapp-poi-body").val();this.map.renderList();this.map.close()};this.initialize.apply(this)}}(jQuery)
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Maps for WordPress 2.53.9\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-04-02T22:06:20+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
@@ -33,33 +33,33 @@ msgstr ""
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
- #: forms/editor.php:11
37
  msgid "Add KML"
38
  msgstr ""
39
 
40
- #: forms/editor.php:47
41
  msgid "Visual"
42
  msgstr ""
43
 
44
- #: forms/editor.php:47
45
  msgid "HTML"
46
  msgstr ""
47
 
48
- #: forms/editor.php:53
49
  #: forms/media.php:49
50
- #: forms/settings.php:41
51
  msgid "Save"
52
  msgstr ""
53
 
54
- #: forms/editor.php:54
55
  #: forms/media.php:50
56
- #: forms/settings.php:42
57
  msgid "Cancel"
58
  msgstr ""
59
 
60
- #: forms/editor.php:55
61
  #: forms/media.php:72
62
- #: forms/settings.php:44
63
  #: mappress_controls.php:102
64
  msgid "Delete"
65
  msgstr ""
@@ -92,7 +92,7 @@ msgstr ""
92
  #: forms/media.php:27
93
  #: forms/media.php:63
94
  #: forms/media.php:67
95
- #: mappress.php:415
96
  msgid "Untitled"
97
  msgstr ""
98
 
@@ -111,7 +111,6 @@ msgstr ""
111
 
112
  #: forms/media.php:70
113
  #: forms/settings.php:4
114
- #: forms/settings.php:18
115
  msgid "Edit"
116
  msgstr ""
117
 
@@ -119,135 +118,147 @@ msgstr ""
119
  msgid "No maps found"
120
  msgstr ""
121
 
122
- #: forms/settings.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  msgid "New"
124
  msgstr ""
125
 
126
- #: forms/settings.php:24
127
  msgid "Custom"
128
  msgstr ""
129
 
130
- #: forms/settings.php:27
131
  msgid "Editor"
132
  msgstr ""
133
 
134
- #: forms/settings.php:28
135
- #: mappress_settings.php:184
136
  #: pro/mappress_pro_settings.php:219
137
  msgid "Default"
138
  msgstr ""
139
 
140
- #: mappress.php:153
141
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
142
  msgstr ""
143
 
144
- #: mappress.php:158
145
  msgid "WARNING: MapPress is not compatible with the WP-Geo plugin. Please deactivate or uninstall WP-Geo before using MapPress."
146
  msgstr ""
147
 
148
- #: mappress.php:163
149
  msgid "A Google Maps API key is required"
150
  msgstr ""
151
 
152
- #: mappress.php:163
153
  msgid "Please update your"
154
  msgstr ""
155
 
156
- #: mappress.php:163
157
  msgid "MapPress Settings"
158
  msgstr ""
159
 
160
- #: mappress.php:314
161
- #: mappress.php:766
162
  msgid "Version"
163
  msgstr ""
164
 
165
- #: mappress.php:315
166
- msgid "Documentation"
167
  msgstr ""
168
 
169
- #: mappress.php:316
170
- msgid "Support"
171
- msgstr ""
172
-
173
- #: mappress.php:318
174
  msgid "Upgrade to MapPress Pro"
175
  msgstr ""
176
 
177
- #: mappress.php:404
178
  msgid "Are you sure you want to delete?"
179
  msgstr ""
180
 
181
- #: mappress.php:405
182
  msgid "Delete this map?"
183
  msgstr ""
184
 
185
- #: mappress.php:406
186
  msgid "Google cannot return directions between those addresses. There is no route between them or the routing information is not available."
187
  msgstr ""
188
 
189
- #: mappress.php:407
190
  msgid "Error reading KML file"
191
  msgstr ""
192
 
193
- #: mappress.php:408
194
  msgid "URL for KML file"
195
  msgstr ""
196
 
197
- #: mappress.php:409
198
  msgid "Loading"
199
  msgstr ""
200
 
201
- #: mappress.php:410
202
- msgid "%d of %d shown"
203
  msgstr ""
204
 
205
- #: mappress.php:411
206
  msgid "Unable to get your location"
207
  msgstr ""
208
 
209
- #: mappress.php:412
210
  msgid "No results"
211
  msgstr ""
212
 
213
- #: mappress.php:413
214
  msgid "Save changes?"
215
  msgstr ""
216
 
217
- #: mappress.php:414
218
  msgid "Shape"
219
  msgstr ""
220
 
221
- #: mappress.php:440
222
  msgid "Improve this map"
223
  msgstr ""
224
 
225
- #: mappress.php:456
226
- #: mappress.php:475
227
  msgid "Streets"
228
  msgstr ""
229
 
230
- #: mappress.php:457
231
  msgid "Outdoors"
232
  msgstr ""
233
 
234
- #: mappress.php:458
235
  msgid "Light"
236
  msgstr ""
237
 
238
- #: mappress.php:459
239
  msgid "Dark"
240
  msgstr ""
241
 
242
- #: mappress.php:460
243
  msgid "Satellite"
244
  msgstr ""
245
 
246
- #: mappress.php:461
247
  msgid "Satellite Streets"
248
  msgstr ""
249
 
250
- #: mappress.php:549
251
  msgid "Settings"
252
  msgstr ""
253
 
@@ -255,273 +266,275 @@ msgstr ""
255
  msgid "Add"
256
  msgstr ""
257
 
258
- #: mappress_map.php:91
259
- #: mappress_settings.php:306
260
  msgid "MapPress"
261
  msgstr ""
262
 
263
- #: mappress_map.php:166
264
  msgid "Map not found"
265
  msgstr ""
266
 
267
- #: mappress_map.php:428
268
  #: pro/mappress_pro_settings.php:37
269
  msgid "Filter"
270
  msgstr ""
271
 
272
- #: mappress_map.php:461
273
- msgid "Show map"
274
- msgstr ""
275
-
276
- #: mappress_map.php:465
277
- msgid "Map"
278
- msgstr ""
279
-
280
- #: mappress_map.php:466
281
- msgid "List"
282
- msgstr ""
283
-
284
- #: mappress_settings.php:84
285
  msgid "Sample Map"
286
  msgstr ""
287
 
288
- #: mappress_settings.php:86
289
  msgid "Basic Settings"
290
  msgstr ""
291
 
292
- #: mappress_settings.php:87
293
  msgid "Mapping Engine"
294
  msgstr ""
295
 
296
- #: mappress_settings.php:90
297
  msgid "Mapbox access token"
298
  msgstr ""
299
 
300
- #: mappress_settings.php:92
301
  msgid "Google API key"
302
  msgstr ""
303
 
304
- #: mappress_settings.php:97
305
  msgid "License"
306
  msgstr ""
307
 
308
- #: mappress_settings.php:99
309
  msgid "Map Settings"
310
  msgstr ""
311
 
312
- #: mappress_settings.php:100
313
  msgid "Post types"
314
  msgstr ""
315
 
316
- #: mappress_settings.php:101
317
  msgid "Automatic display"
318
  msgstr ""
319
 
320
- #: mappress_settings.php:102
321
  msgid "Map alignment"
322
  msgstr ""
323
 
324
- #: mappress_settings.php:103
325
  #: templates/map-popup.php:3
326
  #: templates/mashup-popup.php:6
327
  msgid "Directions"
328
  msgstr ""
329
 
330
- #: mappress_settings.php:105
331
  msgid "POI Settings"
332
  msgstr ""
333
 
334
- #: mappress_settings.php:106
335
  msgid "Default zoom"
336
  msgstr ""
337
 
338
- #: mappress_settings.php:107
339
- #: mappress_settings.php:249
340
  msgid "Open first POI"
341
  msgstr ""
342
 
343
- #: mappress_settings.php:110
344
  msgid "Mashups"
345
  msgstr ""
346
 
347
- #: mappress_settings.php:111
348
  msgid "Icons"
349
  msgstr ""
350
 
351
- #: mappress_settings.php:112
352
  msgid "Styled Maps"
353
  msgstr ""
354
 
355
- #: mappress_settings.php:113
356
  msgid "Geocoding"
357
  msgstr ""
358
 
359
- #: mappress_settings.php:114
360
  msgid "Templates"
361
  msgstr ""
362
 
363
- #: mappress_settings.php:117
364
  msgid "Localization"
365
  msgstr ""
366
 
367
- #: mappress_settings.php:118
368
  msgid "Language"
369
  msgstr ""
370
 
371
- #: mappress_settings.php:119
372
  msgid "Country"
373
  msgstr ""
374
 
375
- #: mappress_settings.php:120
376
  msgid "Directions server"
377
  msgstr ""
378
 
379
- #: mappress_settings.php:122
380
  msgid "Miscellaneous"
381
  msgstr ""
382
 
383
- #: mappress_settings.php:124
384
  msgid "Compatiblity"
385
  msgstr ""
386
 
387
- #: mappress_settings.php:125
388
  msgid "Scripts"
389
  msgstr ""
390
 
391
- #: mappress_settings.php:126
392
  msgid "Map sizes"
393
  msgstr ""
394
 
395
- #: mappress_settings.php:185
396
  msgid "Center"
397
  msgstr ""
398
 
399
- #: mappress_settings.php:186
400
  msgid "Left"
401
  msgstr ""
402
 
403
- #: mappress_settings.php:187
404
  msgid "Right"
405
  msgstr ""
406
 
407
- #: mappress_settings.php:201
408
  msgid "Top of post"
409
  msgstr ""
410
 
411
- #: mappress_settings.php:202
412
  msgid "Bottom of post"
413
  msgstr ""
414
 
415
- #: mappress_settings.php:203
416
  msgid "None"
417
  msgstr ""
418
 
419
- #: mappress_settings.php:210
420
- #: mappress_settings.php:254
421
  msgid "(list)"
422
  msgstr ""
423
 
424
- #: mappress_settings.php:215
425
  msgid "Country code for searches"
426
  msgstr ""
427
 
428
- #: mappress_settings.php:219
429
  msgid "Prevent other plugins/themes from loading the Google Maps API"
430
  msgstr ""
431
 
432
- #: mappress_settings.php:223
433
- #: mappress_settings.php:232
434
  msgid "Google"
435
  msgstr ""
436
 
437
- #: mappress_settings.php:223
438
  msgid "Inline"
439
  msgstr ""
440
 
441
- #: mappress_settings.php:232
442
  msgid "Leaflet"
443
  msgstr ""
444
 
445
- #: mappress_settings.php:234
446
  msgid "Leaflet is free and requires no API key. Google requires an API key and has strict usage limits."
447
  msgstr ""
448
 
449
- #: mappress_settings.php:240
450
- #: mappress_settings.php:243
451
  msgid "Output scripts in footer"
452
  msgstr ""
453
 
454
- #: mappress_settings.php:241
455
  msgid "Disabled because Jetpack Infinite Scroll is active"
456
  msgstr ""
457
 
458
- #: mappress_settings.php:244
459
  msgid "disable if maps are output using AJAX"
460
  msgstr ""
461
 
462
- #: mappress_settings.php:257
463
  msgid "Language for map controls"
464
  msgstr ""
465
 
466
- #: mappress_settings.php:261
467
  msgid "Enter token to use Mapbox map tiles"
468
  msgstr ""
469
 
 
 
 
 
 
 
 
 
 
 
470
  #: mappress_settings.php:268
 
 
 
 
471
  msgid "Default zoom when displaying a single POI"
472
  msgstr ""
473
 
474
- #: mappress_settings.php:281
475
  msgid "Easy Google Maps"
476
  msgstr ""
477
 
478
- #: mappress_settings.php:289
479
  msgid "Width (px or %)"
480
  msgstr ""
481
 
482
- #: mappress_settings.php:289
483
  msgid "Height (px)"
484
  msgstr ""
485
 
486
- #: mappress_settings.php:289
487
  msgid "Default size"
488
  msgstr ""
489
 
490
- #: mappress_settings.php:311
491
- #: mappress_settings.php:319
492
  msgid "Save Changes"
493
  msgstr ""
494
 
495
- #: mappress_settings.php:312
496
- #: mappress_settings.php:320
497
  msgid "Reset Defaults"
498
  msgstr ""
499
 
500
- #: mappress_template.php:25
501
  msgid "address"
502
  msgstr ""
503
 
504
- #: mappress_template.php:26
505
  msgid "body"
506
  msgstr ""
507
 
508
- #: mappress_template.php:27
509
  msgid "icon"
510
  msgstr ""
511
 
512
- #: mappress_template.php:28
513
  msgid "thumbnail"
514
  msgstr ""
515
 
516
- #: mappress_template.php:29
517
  msgid "title"
518
  msgstr ""
519
 
520
- #: mappress_template.php:30
521
  msgid "url"
522
  msgstr ""
523
 
524
- #: mappress_template.php:31
525
  msgid "custom field"
526
  msgstr ""
527
 
@@ -727,7 +740,7 @@ msgid "Format"
727
  msgstr ""
728
 
729
  #: pro/mappress_pro_settings.php:212
730
- msgid "Permanently resize existing maps"
731
  msgstr ""
732
 
733
  #: pro/mappress_pro_settings.php:214
@@ -891,35 +904,19 @@ msgstr ""
891
  msgid "WordPress 4.9 or higher is needed to use the template editor."
892
  msgstr ""
893
 
894
- #: pro/mappress_pro_settings.php:405
895
- msgid "Map popup"
896
- msgstr ""
897
-
898
- #: pro/mappress_pro_settings.php:406
899
- msgid "Map list item"
900
- msgstr ""
901
-
902
- #: pro/mappress_pro_settings.php:407
903
- msgid "Mashup popup"
904
- msgstr ""
905
-
906
- #: pro/mappress_pro_settings.php:408
907
- msgid "Mashup list item"
908
- msgstr ""
909
-
910
- #: pro/mappress_pro_settings.php:422
911
  msgid "or "
912
  msgstr ""
913
 
914
- #: pro/mappress_pro_settings.php:430
915
  msgid "Show featured image thumbnails in mashup POIs"
916
  msgstr ""
917
 
918
- #: pro/mappress_updater.php:117
919
  msgid "Communication error"
920
  msgstr ""
921
 
922
- #: pro/mappress_updater.php:123
923
  msgid "JSON error"
924
  msgstr ""
925
 
@@ -963,23 +960,23 @@ msgstr ""
963
  msgid "Example: initialopeninfo=\"true\""
964
  msgstr ""
965
 
966
- #: templates/map-controls.php:1
967
  msgid "Menu"
968
  msgstr ""
969
 
970
- #: templates/map-controls.php:3
971
  msgid "Center map"
972
  msgstr ""
973
 
974
- #: templates/map-controls.php:6
975
  msgid "Traffic"
976
  msgstr ""
977
 
978
- #: templates/map-controls.php:7
979
  msgid "Bicycling"
980
  msgstr ""
981
 
982
- #: templates/map-controls.php:8
983
  msgid "Transit"
984
  msgstr ""
985
 
@@ -987,7 +984,7 @@ msgstr ""
987
  msgid "My location"
988
  msgstr ""
989
 
990
- #: templates/map-directions.php:16
991
  msgid "Get Directions"
992
  msgstr ""
993
 
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MapPress Maps for WordPress 2.54\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-04-10T00:24:22+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
+ #: forms/editor.php:14
37
  msgid "Add KML"
38
  msgstr ""
39
 
40
+ #: forms/editor.php:50
41
  msgid "Visual"
42
  msgstr ""
43
 
44
+ #: forms/editor.php:50
45
  msgid "HTML"
46
  msgstr ""
47
 
48
+ #: forms/editor.php:56
49
  #: forms/media.php:49
50
+ #: forms/settings.php:27
51
  msgid "Save"
52
  msgstr ""
53
 
54
+ #: forms/editor.php:57
55
  #: forms/media.php:50
56
+ #: forms/settings.php:28
57
  msgid "Cancel"
58
  msgstr ""
59
 
60
+ #: forms/editor.php:58
61
  #: forms/media.php:72
62
+ #: forms/settings.php:30
63
  #: mappress_controls.php:102
64
  msgid "Delete"
65
  msgstr ""
92
  #: forms/media.php:27
93
  #: forms/media.php:63
94
  #: forms/media.php:67
95
+ #: mappress.php:427
96
  msgid "Untitled"
97
  msgstr ""
98
 
111
 
112
  #: forms/media.php:70
113
  #: forms/settings.php:4
 
114
  msgid "Edit"
115
  msgstr ""
116
 
118
  msgid "No maps found"
119
  msgstr ""
120
 
121
+ #: forms/settings.php:3
122
+ msgid "Map popup"
123
+ msgstr ""
124
+
125
+ #: forms/settings.php:3
126
+ msgid "Map list item"
127
+ msgstr ""
128
+
129
+ #: forms/settings.php:3
130
+ msgid "Mashup popup"
131
+ msgstr ""
132
+
133
+ #: forms/settings.php:3
134
+ msgid "Mashup list item"
135
+ msgstr ""
136
+
137
+ #: forms/settings.php:10
138
  msgid "New"
139
  msgstr ""
140
 
141
+ #: forms/settings.php:10
142
  msgid "Custom"
143
  msgstr ""
144
 
145
+ #: forms/settings.php:13
146
  msgid "Editor"
147
  msgstr ""
148
 
149
+ #: forms/settings.php:14
150
+ #: mappress_settings.php:178
151
  #: pro/mappress_pro_settings.php:219
152
  msgid "Default"
153
  msgstr ""
154
 
155
+ #: mappress.php:156
156
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
157
  msgstr ""
158
 
159
+ #: mappress.php:161
160
  msgid "WARNING: MapPress is not compatible with the WP-Geo plugin. Please deactivate or uninstall WP-Geo before using MapPress."
161
  msgstr ""
162
 
163
+ #: mappress.php:166
164
  msgid "A Google Maps API key is required"
165
  msgstr ""
166
 
167
+ #: mappress.php:166
168
  msgid "Please update your"
169
  msgstr ""
170
 
171
+ #: mappress.php:166
172
  msgid "MapPress Settings"
173
  msgstr ""
174
 
175
+ #: mappress.php:318
176
+ #: mappress.php:824
177
  msgid "Version"
178
  msgstr ""
179
 
180
+ #: mappress.php:320
181
+ msgid "Help"
182
  msgstr ""
183
 
184
+ #: mappress.php:322
 
 
 
 
185
  msgid "Upgrade to MapPress Pro"
186
  msgstr ""
187
 
188
+ #: mappress.php:416
189
  msgid "Are you sure you want to delete?"
190
  msgstr ""
191
 
192
+ #: mappress.php:417
193
  msgid "Delete this map?"
194
  msgstr ""
195
 
196
+ #: mappress.php:418
197
  msgid "Google cannot return directions between those addresses. There is no route between them or the routing information is not available."
198
  msgstr ""
199
 
200
+ #: mappress.php:419
201
  msgid "Error reading KML file"
202
  msgstr ""
203
 
204
+ #: mappress.php:420
205
  msgid "URL for KML file"
206
  msgstr ""
207
 
208
+ #: mappress.php:421
209
  msgid "Loading"
210
  msgstr ""
211
 
212
+ #: mappress.php:422
213
+ msgid "%1d of %2d shown"
214
  msgstr ""
215
 
216
+ #: mappress.php:423
217
  msgid "Unable to get your location"
218
  msgstr ""
219
 
220
+ #: mappress.php:424
221
  msgid "No results"
222
  msgstr ""
223
 
224
+ #: mappress.php:425
225
  msgid "Save changes?"
226
  msgstr ""
227
 
228
+ #: mappress.php:426
229
  msgid "Shape"
230
  msgstr ""
231
 
232
+ #: mappress.php:453
233
  msgid "Improve this map"
234
  msgstr ""
235
 
236
+ #: mappress.php:469
237
+ #: mappress.php:488
238
  msgid "Streets"
239
  msgstr ""
240
 
241
+ #: mappress.php:470
242
  msgid "Outdoors"
243
  msgstr ""
244
 
245
+ #: mappress.php:471
246
  msgid "Light"
247
  msgstr ""
248
 
249
+ #: mappress.php:472
250
  msgid "Dark"
251
  msgstr ""
252
 
253
+ #: mappress.php:473
254
  msgid "Satellite"
255
  msgstr ""
256
 
257
+ #: mappress.php:474
258
  msgid "Satellite Streets"
259
  msgstr ""
260
 
261
+ #: mappress.php:603
262
  msgid "Settings"
263
  msgstr ""
264
 
266
  msgid "Add"
267
  msgstr ""
268
 
269
+ #: mappress_map.php:90
270
+ #: mappress_settings.php:321
271
  msgid "MapPress"
272
  msgstr ""
273
 
274
+ #: mappress_map.php:165
275
  msgid "Map not found"
276
  msgstr ""
277
 
278
+ #: mappress_map.php:420
279
  #: pro/mappress_pro_settings.php:37
280
  msgid "Filter"
281
  msgstr ""
282
 
283
+ #: mappress_settings.php:85
 
 
 
 
 
 
 
 
 
 
 
 
284
  msgid "Sample Map"
285
  msgstr ""
286
 
287
+ #: mappress_settings.php:87
288
  msgid "Basic Settings"
289
  msgstr ""
290
 
291
+ #: mappress_settings.php:88
292
  msgid "Mapping Engine"
293
  msgstr ""
294
 
295
+ #: mappress_settings.php:91
296
  msgid "Mapbox access token"
297
  msgstr ""
298
 
299
+ #: mappress_settings.php:93
300
  msgid "Google API key"
301
  msgstr ""
302
 
303
+ #: mappress_settings.php:98
304
  msgid "License"
305
  msgstr ""
306
 
307
+ #: mappress_settings.php:100
308
  msgid "Map Settings"
309
  msgstr ""
310
 
311
+ #: mappress_settings.php:101
312
  msgid "Post types"
313
  msgstr ""
314
 
315
+ #: mappress_settings.php:102
316
  msgid "Automatic display"
317
  msgstr ""
318
 
319
+ #: mappress_settings.php:103
320
  msgid "Map alignment"
321
  msgstr ""
322
 
323
+ #: mappress_settings.php:104
324
  #: templates/map-popup.php:3
325
  #: templates/mashup-popup.php:6
326
  msgid "Directions"
327
  msgstr ""
328
 
329
+ #: mappress_settings.php:107
330
  msgid "POI Settings"
331
  msgstr ""
332
 
333
+ #: mappress_settings.php:108
334
  msgid "Default zoom"
335
  msgstr ""
336
 
337
+ #: mappress_settings.php:109
338
+ #: mappress_settings.php:243
339
  msgid "Open first POI"
340
  msgstr ""
341
 
342
+ #: mappress_settings.php:112
343
  msgid "Mashups"
344
  msgstr ""
345
 
346
+ #: mappress_settings.php:113
347
  msgid "Icons"
348
  msgstr ""
349
 
350
+ #: mappress_settings.php:114
351
  msgid "Styled Maps"
352
  msgstr ""
353
 
354
+ #: mappress_settings.php:115
355
  msgid "Geocoding"
356
  msgstr ""
357
 
358
+ #: mappress_settings.php:116
359
  msgid "Templates"
360
  msgstr ""
361
 
362
+ #: mappress_settings.php:119
363
  msgid "Localization"
364
  msgstr ""
365
 
366
+ #: mappress_settings.php:120
367
  msgid "Language"
368
  msgstr ""
369
 
370
+ #: mappress_settings.php:121
371
  msgid "Country"
372
  msgstr ""
373
 
374
+ #: mappress_settings.php:122
375
  msgid "Directions server"
376
  msgstr ""
377
 
378
+ #: mappress_settings.php:124
379
  msgid "Miscellaneous"
380
  msgstr ""
381
 
382
+ #: mappress_settings.php:126
383
  msgid "Compatiblity"
384
  msgstr ""
385
 
386
+ #: mappress_settings.php:127
387
  msgid "Scripts"
388
  msgstr ""
389
 
390
+ #: mappress_settings.php:128
391
  msgid "Map sizes"
392
  msgstr ""
393
 
394
+ #: mappress_settings.php:179
395
  msgid "Center"
396
  msgstr ""
397
 
398
+ #: mappress_settings.php:180
399
  msgid "Left"
400
  msgstr ""
401
 
402
+ #: mappress_settings.php:181
403
  msgid "Right"
404
  msgstr ""
405
 
406
+ #: mappress_settings.php:195
407
  msgid "Top of post"
408
  msgstr ""
409
 
410
+ #: mappress_settings.php:196
411
  msgid "Bottom of post"
412
  msgstr ""
413
 
414
+ #: mappress_settings.php:197
415
  msgid "None"
416
  msgstr ""
417
 
418
+ #: mappress_settings.php:204
419
+ #: mappress_settings.php:248
420
  msgid "(list)"
421
  msgstr ""
422
 
423
+ #: mappress_settings.php:209
424
  msgid "Country code for searches"
425
  msgstr ""
426
 
427
+ #: mappress_settings.php:213
428
  msgid "Prevent other plugins/themes from loading the Google Maps API"
429
  msgstr ""
430
 
431
+ #: mappress_settings.php:217
432
+ #: mappress_settings.php:226
433
  msgid "Google"
434
  msgstr ""
435
 
436
+ #: mappress_settings.php:217
437
  msgid "Inline"
438
  msgstr ""
439
 
440
+ #: mappress_settings.php:226
441
  msgid "Leaflet"
442
  msgstr ""
443
 
444
+ #: mappress_settings.php:228
445
  msgid "Leaflet is free and requires no API key. Google requires an API key and has strict usage limits."
446
  msgstr ""
447
 
448
+ #: mappress_settings.php:234
449
+ #: mappress_settings.php:237
450
  msgid "Output scripts in footer"
451
  msgstr ""
452
 
453
+ #: mappress_settings.php:235
454
  msgid "Disabled because Jetpack Infinite Scroll is active"
455
  msgstr ""
456
 
457
+ #: mappress_settings.php:238
458
  msgid "disable if maps are output using AJAX"
459
  msgstr ""
460
 
461
+ #: mappress_settings.php:251
462
  msgid "Language for map controls"
463
  msgstr ""
464
 
465
+ #: mappress_settings.php:255
466
  msgid "Enter token to use Mapbox map tiles"
467
  msgstr ""
468
 
469
+ #: mappress_settings.php:262
470
+ #: mappress_settings.php:267
471
+ msgid "Map type control"
472
+ msgstr ""
473
+
474
+ #: mappress_settings.php:263
475
+ msgid "Street view control"
476
+ msgstr ""
477
+
478
+ #: mappress_settings.php:264
479
  #: mappress_settings.php:268
480
+ msgid "Zoom control"
481
+ msgstr ""
482
+
483
+ #: mappress_settings.php:283
484
  msgid "Default zoom when displaying a single POI"
485
  msgstr ""
486
 
487
+ #: mappress_settings.php:296
488
  msgid "Easy Google Maps"
489
  msgstr ""
490
 
491
+ #: mappress_settings.php:304
492
  msgid "Width (px or %)"
493
  msgstr ""
494
 
495
+ #: mappress_settings.php:304
496
  msgid "Height (px)"
497
  msgstr ""
498
 
499
+ #: mappress_settings.php:304
500
  msgid "Default size"
501
  msgstr ""
502
 
503
+ #: mappress_settings.php:326
504
+ #: mappress_settings.php:334
505
  msgid "Save Changes"
506
  msgstr ""
507
 
508
+ #: mappress_settings.php:327
509
+ #: mappress_settings.php:335
510
  msgid "Reset Defaults"
511
  msgstr ""
512
 
513
+ #: mappress_template.php:33
514
  msgid "address"
515
  msgstr ""
516
 
517
+ #: mappress_template.php:34
518
  msgid "body"
519
  msgstr ""
520
 
521
+ #: mappress_template.php:35
522
  msgid "icon"
523
  msgstr ""
524
 
525
+ #: mappress_template.php:36
526
  msgid "thumbnail"
527
  msgstr ""
528
 
529
+ #: mappress_template.php:37
530
  msgid "title"
531
  msgstr ""
532
 
533
+ #: mappress_template.php:38
534
  msgid "url"
535
  msgstr ""
536
 
537
+ #: mappress_template.php:39
538
  msgid "custom field"
539
  msgstr ""
540
 
740
  msgstr ""
741
 
742
  #: pro/mappress_pro_settings.php:212
743
+ msgid "Permanently resize existing maps (classic editor only)"
744
  msgstr ""
745
 
746
  #: pro/mappress_pro_settings.php:214
904
  msgid "WordPress 4.9 or higher is needed to use the template editor."
905
  msgstr ""
906
 
907
+ #: pro/mappress_pro_settings.php:413
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
908
  msgid "or "
909
  msgstr ""
910
 
911
+ #: pro/mappress_pro_settings.php:421
912
  msgid "Show featured image thumbnails in mashup POIs"
913
  msgstr ""
914
 
915
+ #: pro/mappress_updater.php:116
916
  msgid "Communication error"
917
  msgstr ""
918
 
919
+ #: pro/mappress_updater.php:122
920
  msgid "JSON error"
921
  msgstr ""
922
 
960
  msgid "Example: initialopeninfo=\"true\""
961
  msgstr ""
962
 
963
+ #: templates/map-controls.php:2
964
  msgid "Menu"
965
  msgstr ""
966
 
967
+ #: templates/map-controls.php:4
968
  msgid "Center map"
969
  msgstr ""
970
 
971
+ #: templates/map-controls.php:7
972
  msgid "Traffic"
973
  msgstr ""
974
 
975
+ #: templates/map-controls.php:8
976
  msgid "Bicycling"
977
  msgstr ""
978
 
979
+ #: templates/map-controls.php:9
980
  msgid "Transit"
981
  msgstr ""
982
 
984
  msgid "My location"
985
  msgstr ""
986
 
987
+ #: templates/map-directions.php:13
988
  msgid "Get Directions"
989
  msgstr ""
990
 
languages/texts.php CHANGED
@@ -22,6 +22,10 @@ __("Save center / zoom");
22
  __("Insert into post");
23
  __("Edit");
24
  __("No maps found");
 
 
 
 
25
  __("New");
26
  __("Custom");
27
  __("Editor");
@@ -32,8 +36,7 @@ __("A Google Maps API key is required");
32
  __("Please update your");
33
  __("MapPress Settings");
34
  __("Version");
35
- __("Documentation");
36
- __("Support");
37
  __("Upgrade to MapPress Pro");
38
  __("Are you sure you want to delete?");
39
  __("Delete this map?");
@@ -41,7 +44,7 @@ __("Google cannot return directions between those addresses. There is no route
41
  __("Error reading KML file");
42
  __("URL for KML file");
43
  __("Loading");
44
- __("%d of %d shown");
45
  __("Unable to get your location");
46
  __("No results");
47
  __("Save changes?");
@@ -58,9 +61,6 @@ __("Add");
58
  __("MapPress");
59
  __("Map not found");
60
  __("Filter");
61
- __("Show map");
62
- __("Map");
63
- __("List");
64
  __("Sample Map");
65
  __("Basic Settings");
66
  __("Mapping Engine");
@@ -106,6 +106,9 @@ __("Disabled because Jetpack Infinite Scroll is active");
106
  __("disable if maps are output using AJAX");
107
  __("Language for map controls");
108
  __("Enter token to use Mapbox map tiles");
 
 
 
109
  __("Default zoom when displaying a single POI");
110
  __("Easy Google Maps");
111
  __("Width (px or %)");
@@ -168,7 +171,7 @@ __("Checkboxes");
168
  __("Select");
169
  __("Key");
170
  __("Format");
171
- __("Permanently resize existing maps");
172
  __("from %s to %s");
173
  __("Force Resize");
174
  __("Algolia");
@@ -209,10 +212,6 @@ __("Mapbox Studio");
209
  __("Enter styles from %s");
210
  __("Only admins or multisite super-admins can edit templates");
211
  __("WordPress 4.9 or higher is needed to use the template editor.");
212
- __("Map popup");
213
- __("Map list item");
214
- __("Mashup popup");
215
- __("Mashup list item");
216
  __("or ");
217
  __("Show featured image thumbnails in mashup POIs");
218
  __("Communication error");
22
  __("Insert into post");
23
  __("Edit");
24
  __("No maps found");
25
+ __("Map popup");
26
+ __("Map list item");
27
+ __("Mashup popup");
28
+ __("Mashup list item");
29
  __("New");
30
  __("Custom");
31
  __("Editor");
36
  __("Please update your");
37
  __("MapPress Settings");
38
  __("Version");
39
+ __("Help");
 
40
  __("Upgrade to MapPress Pro");
41
  __("Are you sure you want to delete?");
42
  __("Delete this map?");
44
  __("Error reading KML file");
45
  __("URL for KML file");
46
  __("Loading");
47
+ __("%1d of %2d shown");
48
  __("Unable to get your location");
49
  __("No results");
50
  __("Save changes?");
61
  __("MapPress");
62
  __("Map not found");
63
  __("Filter");
 
 
 
64
  __("Sample Map");
65
  __("Basic Settings");
66
  __("Mapping Engine");
106
  __("disable if maps are output using AJAX");
107
  __("Language for map controls");
108
  __("Enter token to use Mapbox map tiles");
109
+ __("Map type control");
110
+ __("Street view control");
111
+ __("Zoom control");
112
  __("Default zoom when displaying a single POI");
113
  __("Easy Google Maps");
114
  __("Width (px or %)");
171
  __("Select");
172
  __("Key");
173
  __("Format");
174
+ __("Permanently resize existing maps (classic editor only)");
175
  __("from %s to %s");
176
  __("Force Resize");
177
  __("Algolia");
212
  __("Enter styles from %s");
213
  __("Only admins or multisite super-admins can edit templates");
214
  __("WordPress 4.9 or higher is needed to use the template editor.");
 
 
 
 
215
  __("or ");
216
  __("Show featured image thumbnails in mashup POIs");
217
  __("Communication error");
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Maps for WordPress
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
- Version: 2.53.9
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
@@ -35,7 +35,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
35
  }
36
 
37
  class Mappress {
38
- const VERSION = '2.53.9';
39
 
40
  static
41
  $baseurl,
@@ -63,7 +63,7 @@ class Mappress {
63
 
64
  // Pro updater
65
  if (self::$pro)
66
- self::$updater = new Mappress_Updater(self::$basename, 'mappress', self::VERSION, self::$options->license, self::$options->betas, Mappress_Pro_Settings::get_usage());
67
 
68
  add_action('admin_menu', array(__CLASS__, 'admin_menu'));
69
  add_action('init', array(__CLASS__, 'init'), 0); // Priority 0 required for widgets_init hook
@@ -117,9 +117,12 @@ class Mappress {
117
 
118
  $editing = in_array($hook, array('edit.php', 'post.php', 'post-new.php'));
119
 
 
 
 
120
  // Settings scripts
121
  if ($hook == self::$pages[0]) {
122
- self::load('settings');
123
  if (function_exists('wp_enqueue_code_editor'))
124
  wp_enqueue_code_editor(array( 'type' => 'php' ));
125
  }
@@ -241,7 +244,7 @@ class Mappress {
241
  $wps = wp_scripts();
242
  foreach($wps->registered as $registered) {
243
  if (stripos($registered->src, 'maps.googleapis.com') !== false && stripos($registered->handle, 'mappress') === false) {
244
- $registered->src = self::$baseurl . '/forms/dummy.js';
245
  }
246
  }
247
  }
@@ -310,10 +313,11 @@ class Mappress {
310
  return $mashup->display();
311
  }
312
 
313
- static function get_support_links($title = 'MapPress') {
314
- $html = "<div class='mapp-support'>" . __('Version', 'mappress-google-maps-for-wordpress') . ':' . self::$version;
315
- $html .= " | <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'>" . __('Documentation', 'mappress-google-maps-for-wordpress') . "</a>";
316
- $html .= " | <a target='_blank' href='https://mappresspro.com/chris-contact'>" . __('Support', 'mappress-google-maps-for-wordpress') . "</a>";
 
317
  if (!self::$pro)
318
  $html .= "<a class='button button-primary' href='https://mappresspro.com/mappress' target='_blank'>" . __('Upgrade to MapPress Pro', 'mappress-google-maps-for-wordpress') . "</a>";
319
  $html .= "</div>";
@@ -332,19 +336,27 @@ class Mappress {
332
  *
333
  */
334
  static function init() {
335
- // Register hooks and create database tables
336
  Mappress_Map::register();
 
337
 
338
- // Register static classes
339
  if (self::$pro) {
340
  Mappress_Icons::register();
341
  Mappress_Meta::register();
342
  Mappress_Pro_Settings::register();
343
  Mappress_Query::register();
344
- Mappress_Template::register();
345
  Mappress_Widget::register();
346
  }
347
 
 
 
 
 
 
 
 
 
 
 
348
  // Check if upgrade is needed
349
  $current_version = get_option('mappress_version');
350
 
@@ -407,7 +419,7 @@ class Mappress {
407
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
408
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
409
  'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
410
- 'more' => __('%d of %d shown', 'mappress-google-maps-for-wordpress'),
411
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
412
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
413
  'save' => __('Save changes?', 'mappress-google-maps-for-wordpress'),
@@ -420,10 +432,11 @@ class Mappress {
420
  'admin' => current_user_can('administrator'),
421
  'ajaxurl' => admin_url('admin-ajax.php'),
422
  'debug' => self::$debug,
 
423
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
424
  'language' => self::get_language(),
425
  'mapbox' => self::get_api_keys()->mapbox,
426
- 'mini' => 600,
427
  'nonce' => wp_create_nonce('mappress'),
428
  'postid' => ($post) ? $post->ID : null, // Note: GT => numeric, classic => string
429
  'pro' => self::$pro,
@@ -447,7 +460,7 @@ class Mappress {
447
  'url' => 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
448
  )
449
  );
450
- $l10n['options']['providers'] = apply_filters('mappress_tile_providers', $providers);
451
 
452
  // Baselayers
453
  $baselayers = array();
@@ -477,7 +490,7 @@ class Mappress {
477
  }
478
 
479
  // User-defined baselayers
480
- $l10n['options']['baseLayers'] = apply_filters('mappress_baselayers', $baselayers);
481
  } else {
482
  // Google wizard styles
483
  $l10n['options']['styles'] = array();
@@ -490,15 +503,10 @@ class Mappress {
490
  foreach($options as $option)
491
  $l10n['options'][$option] = self::$options->$option;
492
 
493
- return $l10n;
494
  }
495
 
496
- static function load($type = null) {
497
- if (self::$loaded)
498
- return;
499
- else
500
- self::$loaded = true;
501
-
502
  $dev = self::is_dev();
503
  $footer = self::is_footer();
504
 
@@ -506,43 +514,89 @@ class Mappress {
506
  $min = ($dev) ? "" : ".min";
507
  $js = ($dev) ? "http://localhost/$dev/wp-content/plugins/mappress-google-maps-for-wordpress/src" : self::$baseurl . '/js';
508
 
509
- if (self::$options->engine == 'leaflet') {
510
- wp_enqueue_script("mappress-leaflet", $js . "/leaflet/leaflet.js", null, '1.4.0', $footer);
511
- wp_enqueue_script("mappress-omnivore", $js . "/leaflet/leaflet-omnivore.min.js", null, '0.3.1', $footer);
512
- wp_enqueue_script("mappress-algolia-places", $js . "/algolia/placesAutocompleteDataset.min.js", null, '1.16.1', $footer);
513
- wp_enqueue_script("mappress-algolia-search", $js . "/algolia/algoliasearchLite.min.js", null, '3.32.0', $footer);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
514
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
515
  } else {
516
- $language = self::get_language();
517
- $language = ($language) ? "&language=$language" : '';
518
- $apiversion = ($dev) ? 'v=3.exp' : 'v=3';
519
- $apikey = "&key=" . self::get_api_keys()->browser;
520
- $libs = ($type == 'editor') ? '&libraries=places,drawing' : '&libraries=places';
521
- wp_enqueue_script("mappress-gmaps", "https://maps.googleapis.com/maps/api/js?{$apiversion}{$language}{$libs}{$apikey}", null, null, $footer);
522
  }
523
 
524
- if ($type == 'editor')
525
- wp_enqueue_script('mappress_editor', $js . "/mappress_editor$min.js", array('jquery', 'jquery-ui-position', 'jquery-ui-sortable'), self::$version, $footer);
526
 
527
  if ($type == 'settings')
528
- wp_enqueue_script('mappress_settings', $js . "/mappress_settings$min.js", array('postbox', 'jquery', 'jquery-ui-position', 'jquery-ui-sortable'), self::$version, $footer);
529
 
530
- // Autocomplete
531
- wp_enqueue_script('mappress-algolia-autocomplete', $js . "/algolia/autocomplete.jquery.min.js", array('jquery'), '0.36.0', $footer);
532
 
533
  // mappress.js includes loader, so must come after editor
534
- wp_enqueue_script('mappress', $js . "/mappress$min.js", array('underscore', 'jquery'), self::$version, $footer);
535
 
536
- if ($dev) {
537
- foreach(array('directions', 'geocoding', 'icons', 'infobox', 'lib', 'places', 'poi', 'widgets', 'loader') as $script)
538
- wp_enqueue_script($script, $js . "/mappress_{$script}.js", null, self::$version, $footer);
539
- }
540
 
541
  wp_localize_script('mappress', 'mappl10n', self::l10n());
542
 
543
  // Templates
544
- if ($type != 'editor')
545
- Mappress_Template::load($footer);
 
 
 
 
 
 
 
 
 
 
546
  }
547
 
548
  static function plugin_action_links($links, $file) {
@@ -720,6 +774,10 @@ class Mappress {
720
  if (stristr($content, '[mappress') !== false || stristr($content, '[mashup') !== false)
721
  return $content;
722
 
 
 
 
 
723
  // Get maps associated with post
724
  $mapids = Mappress_Map::get_list($post->ID, 'ids');
725
  if (empty($mapids))
@@ -759,7 +817,7 @@ class Mappress {
759
 
760
  // Load scripts in header
761
  if (!self::is_footer())
762
- self::load();
763
  }
764
 
765
  static function wp_head() {
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.54
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
35
  }
36
 
37
  class Mappress {
38
+ const VERSION = '2.54';
39
 
40
  static
41
  $baseurl,
63
 
64
  // Pro updater
65
  if (self::$pro)
66
+ self::$updater = new Mappress_Updater(self::$basename, 'mappress', self::VERSION, self::$options->license, self::$options->betas);
67
 
68
  add_action('admin_menu', array(__CLASS__, 'admin_menu'));
69
  add_action('init', array(__CLASS__, 'init'), 0); // Priority 0 required for widgets_init hook
117
 
118
  $editing = in_array($hook, array('edit.php', 'post.php', 'post-new.php'));
119
 
120
+ if ($editing)
121
+ self::scripts_enqueue('editor');
122
+
123
  // Settings scripts
124
  if ($hook == self::$pages[0]) {
125
+ self::scripts_enqueue('settings');
126
  if (function_exists('wp_enqueue_code_editor'))
127
  wp_enqueue_code_editor(array( 'type' => 'php' ));
128
  }
244
  $wps = wp_scripts();
245
  foreach($wps->registered as $registered) {
246
  if (stripos($registered->src, 'maps.googleapis.com') !== false && stripos($registered->handle, 'mappress') === false) {
247
+ $registered->src = null;
248
  }
249
  }
250
  }
313
  return $mashup->display();
314
  }
315
 
316
+ static function get_support_links() {
317
+ $html = "<div class='mapp-support'>";
318
+ $html .= __('Version', 'mappress-google-maps-for-wordpress') . ' ';
319
+ $html .= self::$version;
320
+ $html .= " | <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'>" . __('Help', 'mappress-google-maps-for-wordpress') . "</a>";
321
  if (!self::$pro)
322
  $html .= "<a class='button button-primary' href='https://mappresspro.com/mappress' target='_blank'>" . __('Upgrade to MapPress Pro', 'mappress-google-maps-for-wordpress') . "</a>";
323
  $html .= "</div>";
336
  *
337
  */
338
  static function init() {
 
339
  Mappress_Map::register();
340
+ Mappress_Template::register();
341
 
 
342
  if (self::$pro) {
343
  Mappress_Icons::register();
344
  Mappress_Meta::register();
345
  Mappress_Pro_Settings::register();
346
  Mappress_Query::register();
 
347
  Mappress_Widget::register();
348
  }
349
 
350
+ self::scripts_register();
351
+
352
+ // Register Gutenberg block type
353
+ if (function_exists('register_block_type')) {
354
+ register_block_type('mappress/map', array(
355
+ 'render_callback' => array(__CLASS__, 'shortcode_map'),
356
+ 'editor_script' => array('mappress-gt')
357
+ ));
358
+ }
359
+
360
  // Check if upgrade is needed
361
  $current_version = get_option('mappress_version');
362
 
419
  'kml_error' => __('Error reading KML file', 'mappress-google-maps-for-wordpress'),
420
  'layer' => __('URL for KML file', 'mappress-google-maps-for-wordpress'),
421
  'loading' => "<span class='mapp-spinner'></span>" . __('Loading', 'mappress-google-maps-for-wordpress'),
422
+ 'more' => __('%1d of %2d shown', 'mappress-google-maps-for-wordpress'),
423
  'no_geolocate' => __('Unable to get your location', 'mappress-google-maps-for-wordpress'),
424
  'no_results' => __('No results', 'mappress-google-maps-for-wordpress'),
425
  'save' => __('Save changes?', 'mappress-google-maps-for-wordpress'),
432
  'admin' => current_user_can('administrator'),
433
  'ajaxurl' => admin_url('admin-ajax.php'),
434
  'debug' => self::$debug,
435
+ 'gt' => function_exists('use_block_editor_for_post') && use_block_editor_for_post($post),
436
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
437
  'language' => self::get_language(),
438
  'mapbox' => self::get_api_keys()->mapbox,
439
+ 'mini' => 400,
440
  'nonce' => wp_create_nonce('mappress'),
441
  'postid' => ($post) ? $post->ID : null, // Note: GT => numeric, classic => string
442
  'pro' => self::$pro,
460
  'url' => 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
461
  )
462
  );
463
+ $l10n['options']['providers'] = $providers;
464
 
465
  // Baselayers
466
  $baselayers = array();
490
  }
491
 
492
  // User-defined baselayers
493
+ $l10n['options']['baseLayers'] = $baselayers;
494
  } else {
495
  // Google wizard styles
496
  $l10n['options']['styles'] = array();
503
  foreach($options as $option)
504
  $l10n['options'][$option] = self::$options->$option;
505
 
506
+ return apply_filters('mappress_options', $l10n);
507
  }
508
 
509
+ static function scripts_register() {
 
 
 
 
 
510
  $dev = self::is_dev();
511
  $footer = self::is_footer();
512
 
514
  $min = ($dev) ? "" : ".min";
515
  $js = ($dev) ? "http://localhost/$dev/wp-content/plugins/mappress-google-maps-for-wordpress/src" : self::$baseurl . '/js';
516
 
517
+ // Lefleat API
518
+ wp_register_script("mappress-leaflet", $js . "/leaflet/leaflet.js", null, '1.4.0', $footer);
519
+ wp_register_script("mappress-omnivore", $js . "/leaflet/leaflet-omnivore.min.js", null, '0.3.1', $footer);
520
+ wp_register_script("mappress-algolia-places", $js . "/algolia/placesAutocompleteDataset.min.js", null, '1.16.1', $footer);
521
+ wp_register_script("mappress-algolia-search", $js . "/algolia/algoliasearchLite.min.js", null, '3.32.0', $footer);
522
+
523
+ // Google API
524
+ $language = self::get_language();
525
+ $language = ($language) ? "&language=$language" : '';
526
+ $apiversion = ($dev) ? 'v=3.exp' : 'v=3';
527
+ $apikey = "&key=" . self::get_api_keys()->browser;
528
+ $libs = '&libraries=places,drawing';
529
+ wp_register_script("mappress-gmaps", "https://maps.googleapis.com/maps/api/js?{$apiversion}{$language}{$libs}{$apikey}", null, null, $footer);
530
+
531
+ // Settings
532
+ wp_register_script('mappress-settings', $js . "/mappress_settings$min.js", array('postbox', 'jquery', 'jquery-ui-position', 'jquery-ui-sortable'), self::$version, $footer);
533
+
534
+ // Editor
535
+ wp_register_script('mappress-editor', $js . "/mappress_editor$min.js", array('jquery', 'jquery-ui-position', 'jquery-ui-sortable'), self::$version, $footer);
536
+
537
+ //gtv
538
+ wp_register_script('mappress-gt', $js . "/mappress_gt$min.js", array('jquery', 'mappress', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), self::$version, false);
539
+
540
+ // Autocomplete
541
+ wp_register_script('mappress-algolia-autocomplete', $js . "/algolia/autocomplete.jquery.min.js", array('jquery'), '0.36.0', $footer);
542
+
543
+ // MapPress
544
+ wp_register_script('mappress', $js . "/mappress$min.js", array('underscore', 'jquery'), self::$version, $footer);
545
+ if ($dev) {
546
+ foreach(array('directions', 'geocoding', 'icons', 'infobox', 'lib', 'places', 'poi', 'widgets', 'loader') as $script)
547
+ wp_register_script("mappress-$script", $js . "/mappress_{$script}.js", null, self::$version, $footer);
548
+ }
549
 
550
+ // I18N
551
+ wp_set_script_translations( 'mappress-gt', 'mappress-google-maps-for-wordpress', self::$baseurl . '/languages' );
552
+ wp_set_script_translations( 'mappress-editor', 'mappress-google-maps-for-wordpress', self::$baseurl . '/languages' );
553
+ }
554
+
555
+ static function scripts_enqueue($type = null) {
556
+ if (self::$loaded)
557
+ return;
558
+ else
559
+ self::$loaded = true;
560
+
561
+ if (self::$options->engine == 'leaflet') {
562
+ wp_enqueue_script("mappress-leaflet");
563
+ wp_enqueue_script("mappress-omnivore");
564
+ wp_enqueue_script("mappress-algolia-places");
565
+ wp_enqueue_script("mappress-algolia-search");
566
  } else {
567
+ wp_enqueue_script("mappress-gmaps");
 
 
 
 
 
568
  }
569
 
570
+ wp_enqueue_script('mappress-algolia-autocomplete');
 
571
 
572
  if ($type == 'settings')
573
+ wp_enqueue_script('mappress-settings');
574
 
575
+ if ($type == 'editor')
576
+ wp_enqueue_script('mappress-editor');
577
 
578
  // mappress.js includes loader, so must come after editor
579
+ wp_enqueue_script('mappress');
580
 
581
+ // Dev scripts
582
+ foreach(array('directions', 'geocoding', 'icons', 'infobox', 'lib', 'places', 'poi', 'widgets', 'loader') as $script)
583
+ wp_enqueue_script("mappress-$script");
 
584
 
585
  wp_localize_script('mappress', 'mappl10n', self::l10n());
586
 
587
  // Templates
588
+ $footer = self::is_footer();
589
+ $templates = array('map-popup', 'map-loop', 'map-item');
590
+
591
+ if ($type == 'editor')
592
+ $templates = array_merge($templates, array('editor'));
593
+ else if ($type == 'settings')
594
+ $templates = array_merge($templates, array('settings'));
595
+ else if (Mappress::$pro)
596
+ $templates = array_merge($templates, array('mashup-popup', 'mashup-loop', 'mashup-item'));
597
+
598
+ foreach($templates as $template_name)
599
+ Mappress_Template::enqueue_template($template_name, $footer);
600
  }
601
 
602
  static function plugin_action_links($links, $file) {
774
  if (stristr($content, '[mappress') !== false || stristr($content, '[mashup') !== false)
775
  return $content;
776
 
777
+ // Don't auto display if the post already contains GT block
778
+ if (stristr($content, 'wp:mappress/map') !== false)
779
+ return $content;
780
+
781
  // Get maps associated with post
782
  $mapids = Mappress_Map::get_list($post->ID, 'ids');
783
  if (empty($mapids))
817
 
818
  // Load scripts in header
819
  if (!self::is_footer())
820
+ self::scripts_enqueue();
821
  }
822
 
823
  static function wp_head() {
mappress_map.php CHANGED
@@ -3,7 +3,6 @@ class Mappress_Map extends Mappress_Obj {
3
  var $alignment,
4
  $center,
5
  $editable,
6
- $filter,
7
  $height,
8
  $hideEmpty,
9
  $initialOpenDirections,
@@ -98,9 +97,9 @@ class Mappress_Map extends Mappress_Obj {
98
  }
99
 
100
  static function meta_box($post) {
101
- Mappress::load('editor');
102
- $map = new Mappress_Map(array('editable' => true, 'layout' => 'left', 'name' => 'mapp0', 'poiList' => true));
103
- require(Mappress::$basedir . '/forms/media.php');
104
  }
105
 
106
  static function find($args) {
@@ -197,7 +196,7 @@ class Mappress_Map extends Mappress_Obj {
197
  }
198
  }
199
 
200
- function save($postid) {
201
  global $wpdb;
202
  $maps_table = $wpdb->prefix . 'mappress_maps';
203
  $posts_table = $wpdb->prefix . 'mappress_posts';
@@ -222,8 +221,8 @@ class Mappress_Map extends Mappress_Obj {
222
  return false;
223
 
224
  // Update posts
225
- $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $postid, $this->mapid,
226
- $postid, $this->mapid));
227
 
228
  if ($result === false)
229
  return false;
@@ -237,13 +236,12 @@ class Mappress_Map extends Mappress_Obj {
237
 
238
  ob_start();
239
  $mapdata = (isset($_POST['map'])) ? json_decode(stripslashes($_POST['map']), true) : null;
240
- $postid = (isset($_POST['postid'])) ? $_POST['postid'] : null;
241
 
242
  if (!$mapdata)
243
  Mappress::ajax_response('Internal error, your data has not been saved!');
244
 
245
  $map = new Mappress_Map($mapdata);
246
- $mapid = $map->save($postid);
247
 
248
  if ($mapid === false)
249
  Mappress::ajax_response('Internal error, your data has not been saved!');
@@ -343,7 +341,7 @@ class Mappress_Map extends Mappress_Obj {
343
  do_action('mappress_map_display', $this);
344
 
345
  $html = Mappress_Template::get_template('map', array('map' => $this));
346
- Mappress::load();
347
  $script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
348
 
349
  // Use inline scripts for XHTML and some themes which match tags (incorrectly) in the content
@@ -380,7 +378,10 @@ class Mappress_Map extends Mappress_Obj {
380
 
381
  case 'filters' :
382
  case 'filters-toggle' :
383
- return $this->query && $this->filter;
 
 
 
384
 
385
  case 'header' :
386
  return $this->check('filters') || $this->check('search');
@@ -393,13 +394,6 @@ class Mappress_Map extends Mappress_Obj {
393
 
394
  case 'search' :
395
  return $this->editable || ($this->query && Mappress::$options->search);
396
-
397
- case 'show' :
398
- return $this->hidden;
399
-
400
- case 'view-toggles' :
401
- return $this->layout == 'left';
402
-
403
  }
404
  return true;
405
  }
@@ -410,11 +404,9 @@ class Mappress_Map extends Mappress_Obj {
410
 
411
  switch ($part) {
412
  case 'controls' :
413
- $html = "<div class='mapp-controls'></div>";
414
- break;
415
-
416
  case 'directions' :
417
  case 'filters' :
 
418
  case 'header' :
419
  case 'search' :
420
  $html = Mappress_Template::get_template("map-$part", array('map' => $this));
@@ -442,10 +434,6 @@ class Mappress_Map extends Mappress_Obj {
442
  $class .= ' mobile';
443
  if (!$this->editable)
444
  $class .= ($this->alignment) ? " mapp-align-{$this->alignment}" : '';
445
- if ($this->check('filters'))
446
- $class .= ' mapp-has-filters';
447
- if ($this->check('search'))
448
- $class .= ' mapp-has-search';
449
 
450
  $style = sprintf("width: %s;", $this->width());
451
  $html = "id='$id' class='$class' style='$style'";
@@ -456,16 +444,6 @@ class Mappress_Map extends Mappress_Obj {
456
  $html = "<div class='mapp-list'></div>";
457
  break;
458
 
459
- case 'show' :
460
- // Should be onclick...
461
- $html = sprintf("<a href='#' data-mapp-action='show'>%s</a>", __('Show map', 'mappress-google-maps-for-wordpress'));
462
- break;
463
-
464
- case 'view-toggles' :
465
- $html = sprintf("<div class='mapp-header-button' data-mapp-action='view-map'>%s</div>", __('Map', 'mappress-google-maps-for-wordpress'));
466
- $html .= sprintf("<div class='mapp-header-button' data-mapp-action='view-list'>%s</div>", __('List', 'mappress-google-maps-for-wordpress'));
467
- break;
468
-
469
  case 'wrapper-style' :
470
  $h = $this->height();
471
  // Responsive if aspect ratio present (':') otherwise use specified % or px
3
  var $alignment,
4
  $center,
5
  $editable,
 
6
  $height,
7
  $hideEmpty,
8
  $initialOpenDirections,
97
  }
98
 
99
  static function meta_box($post) {
100
+ Mappress::scripts_enqueue('editor');
101
+ $map = new Mappress_Map(array('editable' => true, 'layout' => 'left', 'name' => 'mapp0', 'poiList' => true));
102
+ require(Mappress::$basedir . '/forms/media.php');
103
  }
104
 
105
  static function find($args) {
196
  }
197
  }
198
 
199
+ function save() {
200
  global $wpdb;
201
  $maps_table = $wpdb->prefix . 'mappress_maps';
202
  $posts_table = $wpdb->prefix . 'mappress_posts';
221
  return false;
222
 
223
  // Update posts
224
+ $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
225
+ $this->postid, $this->mapid));
226
 
227
  if ($result === false)
228
  return false;
236
 
237
  ob_start();
238
  $mapdata = (isset($_POST['map'])) ? json_decode(stripslashes($_POST['map']), true) : null;
 
239
 
240
  if (!$mapdata)
241
  Mappress::ajax_response('Internal error, your data has not been saved!');
242
 
243
  $map = new Mappress_Map($mapdata);
244
+ $mapid = $map->save();
245
 
246
  if ($mapid === false)
247
  Mappress::ajax_response('Internal error, your data has not been saved!');
341
  do_action('mappress_map_display', $this);
342
 
343
  $html = Mappress_Template::get_template('map', array('map' => $this));
344
+ Mappress::scripts_enqueue();
345
  $script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
346
 
347
  // Use inline scripts for XHTML and some themes which match tags (incorrectly) in the content
378
 
379
  case 'filters' :
380
  case 'filters-toggle' :
381
+ return $this->query && Mappress::$options->filter;
382
+
383
+ case 'footer' :
384
+ return $this->check('list');
385
 
386
  case 'header' :
387
  return $this->check('filters') || $this->check('search');
394
 
395
  case 'search' :
396
  return $this->editable || ($this->query && Mappress::$options->search);
 
 
 
 
 
 
 
397
  }
398
  return true;
399
  }
404
 
405
  switch ($part) {
406
  case 'controls' :
 
 
 
407
  case 'directions' :
408
  case 'filters' :
409
+ case 'footer' :
410
  case 'header' :
411
  case 'search' :
412
  $html = Mappress_Template::get_template("map-$part", array('map' => $this));
434
  $class .= ' mobile';
435
  if (!$this->editable)
436
  $class .= ($this->alignment) ? " mapp-align-{$this->alignment}" : '';
 
 
 
 
437
 
438
  $style = sprintf("width: %s;", $this->width());
439
  $html = "id='$id' class='$class' style='$style'";
444
  $html = "<div class='mapp-list'></div>";
445
  break;
446
 
 
 
 
 
 
 
 
 
 
 
447
  case 'wrapper-style' :
448
  $h = $this->height();
449
  // Responsive if aspect ratio present (':') otherwise use specified % or px
mappress_settings.php CHANGED
@@ -26,6 +26,7 @@ class Mappress_Options extends Mappress_Obj {
26
  $language,
27
  $layout = 'left',
28
  $license,
 
29
  $mapbox,
30
  $mapboxStyles = array(),
31
  $mashupBody = 'poi',
@@ -101,6 +102,7 @@ class Mappress_Settings {
101
  $this->add_field('autodisplay', __('Automatic display', 'mappress-google-maps-for-wordpress'), 'maps');
102
  $this->add_field('alignment', __('Map alignment', 'mappress-google-maps-for-wordpress'), 'maps');
103
  $this->add_field('directions', __('Directions', 'mappress-google-maps-for-wordpress'), 'maps');
 
104
 
105
  $this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
106
  $this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
@@ -149,18 +151,10 @@ class Mappress_Settings {
149
  $input[$key] = trim($input[$key]);
150
  }
151
 
152
- // Sizes
153
  foreach( $input['sizes'] as &$size ) {
154
- // Strip 'px' from value but allow '%'. also, % min/max = 5%/100%, px min/max = 200/2048
155
- if (strpos($size['width'], '%'))
156
- $size['width'] = max(5, min(100, (int) $size['width'])) . '%';
157
- else
158
- $size['width'] = max(200, min(2048, (int) $size['width']));
159
-
160
- if (strpos($size['height'], '%'))
161
- $size['height'] = max(5, min(100, (int) $size['height'])) . '%';
162
- else
163
- $size['height'] = max(200, min(2048, (int) $size['height']));
164
  }
165
 
166
  // If NO post types selected, set value to empty array
@@ -262,6 +256,27 @@ class Mappress_Settings {
262
  echo Mappress_Controls::help('', 'https://www.mapbox.com/help/define-access-token/');
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  function set_poi_zoom($name) {
266
  $zooms = array_combine(range(1, 17), range(1,17));
267
  echo Mappress_Controls::select($name, $zooms, (int) $this->options->poiZoom);
26
  $language,
27
  $layout = 'left',
28
  $license,
29
+ // TBD $mapOptions = array('mapTypeControl' => true, 'streetViewControl' => true, 'zoomControl' => true),
30
  $mapbox,
31
  $mapboxStyles = array(),
32
  $mashupBody = 'poi',
102
  $this->add_field('autodisplay', __('Automatic display', 'mappress-google-maps-for-wordpress'), 'maps');
103
  $this->add_field('alignment', __('Map alignment', 'mappress-google-maps-for-wordpress'), 'maps');
104
  $this->add_field('directions', __('Directions', 'mappress-google-maps-for-wordpress'), 'maps');
105
+ // TBD $this->add_field('mapOptions', __('Map options'), 'maps');
106
 
107
  $this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
108
  $this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
151
  $input[$key] = trim($input[$key]);
152
  }
153
 
154
+ // Sizes - strip 'px' from value if user entered it
155
  foreach( $input['sizes'] as &$size ) {
156
+ $size['width'] = str_ireplace('px', '', $size['width']);
157
+ $size['height'] = str_ireplace('px', '', $size['height']);
 
 
 
 
 
 
 
 
158
  }
159
 
160
  // If NO post types selected, set value to empty array
256
  echo Mappress_Controls::help('', 'https://www.mapbox.com/help/define-access-token/');
257
  }
258
 
259
+ function set_map_options($name) {
260
+ $labels = array(
261
+ 'google' => array(
262
+ 'mapTypeControl' => __('Map type control', 'mappress-google-maps-for-wordpress'),
263
+ 'streetViewControl' => __("Street view control", 'mappress-google-maps-for-wordpress'),
264
+ 'zoomControl' => __('Zoom control', 'mappress-google-maps-for-wordpress')
265
+ ),
266
+ 'leaflet' => array(
267
+ 'mapTypeControl' => __('Map type control', 'mappress-google-maps-for-wordpress'),
268
+ 'zoomControl' => __('Zoom control', 'mappress-google-maps-for-wordpress')
269
+ )
270
+ );
271
+
272
+ $mapOptions = $this->options->mapOptions;
273
+
274
+ foreach($labels[$this->options->engine] as $option => $label) {
275
+ $value = (isset($mapOptions->$option)) ? $mapOptions->$option : false;
276
+ echo Mappress_Controls::checkmark($name . "[$option]", $value, $label);
277
+ }
278
+ }
279
+
280
  function set_poi_zoom($name) {
281
  $zooms = array_combine(range(1, 17), range(1,17));
282
  echo Mappress_Controls::select($name, $zooms, (int) $this->options->poiZoom);
mappress_template.php CHANGED
@@ -10,6 +10,7 @@ class Mappress_Template extends Mappress_Obj {
10
  ;
11
 
12
  static $tokens;
 
13
 
14
  function __construct($atts = null) {
15
  parent::__construct($atts);
@@ -21,6 +22,13 @@ class Mappress_Template extends Mappress_Obj {
21
  add_action('wp_ajax_mapp_tpl_delete', array(__CLASS__, 'ajax_delete'));
22
  add_filter('mappress_poi_props', array(__CLASS__, 'filter_poi_props'), 0, 3);
23
 
 
 
 
 
 
 
 
24
  self::$tokens = array(
25
  'address' => __('address', 'mappress-google-maps-for-wordpress'),
26
  'body' => __('body', 'mappress-google-maps-for-wordpress'),
@@ -83,27 +91,6 @@ class Mappress_Template extends Mappress_Obj {
83
  Mappress::ajax_response('OK', $filepath);
84
  }
85
 
86
- static function load($footer) {
87
- if ($footer) {
88
- add_action('wp_footer', array(__CLASS__, 'print_templates'), -10);
89
- add_action('admin_footer', array(__CLASS__, 'print_templates'), -10);
90
- } else {
91
- self::print_templates();
92
- }
93
- }
94
-
95
- static function print_templates() {
96
- // Parse tokens and print
97
- $names = array('map-controls', 'map-popup', 'map-loop', 'map-item');
98
- if (Mappress::$pro)
99
- $names = array_merge($names, array('mashup-popup', 'mashup-loop', 'mashup-item'));
100
-
101
- foreach($names as $name) {
102
- $template = self::get_template($name);
103
- printf("<script type='text/html' id='mapp-tmpl-$name'>%s</script>", $template);
104
- }
105
- }
106
-
107
  static function locate_template($template_name) {
108
  $template_name .= ".php";
109
  $template_file = locate_template($template_name, false);
@@ -160,5 +147,31 @@ class Mappress_Template extends Mappress_Obj {
160
  $tokens = array_unique(array_diff($tokens, self::$tokens));
161
  return $tokens;
162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  }
164
  ?>
10
  ;
11
 
12
  static $tokens;
13
+ static $queue = array();
14
 
15
  function __construct($atts = null) {
16
  parent::__construct($atts);
22
  add_action('wp_ajax_mapp_tpl_delete', array(__CLASS__, 'ajax_delete'));
23
  add_filter('mappress_poi_props', array(__CLASS__, 'filter_poi_props'), 0, 3);
24
 
25
+
26
+ // Print queued templates
27
+ add_action('wp_print_scripts', array(__CLASS__, 'print_templates'), -1);
28
+ add_action('admin_print_scripts', array(__CLASS__, 'print_templates'), -1);
29
+ add_action('wp_print_footer_scripts', array(__CLASS__, 'print_footer_templates'), -10);
30
+ add_action('admin_print_footer_scripts', array(__CLASS__, 'print_footer_templates'), -10);
31
+
32
  self::$tokens = array(
33
  'address' => __('address', 'mappress-google-maps-for-wordpress'),
34
  'body' => __('body', 'mappress-google-maps-for-wordpress'),
91
  Mappress::ajax_response('OK', $filepath);
92
  }
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  static function locate_template($template_name) {
95
  $template_name .= ".php";
96
  $template_file = locate_template($template_name, false);
147
  $tokens = array_unique(array_diff($tokens, self::$tokens));
148
  return $tokens;
149
  }
150
+
151
+ static function enqueue_template($template_name, $footer) {
152
+ if (!array_key_exists($template_name, self::$queue))
153
+ self::$queue[$template_name] = $footer;
154
+ }
155
+
156
+ static function print_footer_templates() {
157
+ foreach(self::$queue as $template_name => $footer) {
158
+ if ($footer)
159
+ self::print_template($template_name);
160
+ }
161
+ }
162
+
163
+ static function print_templates() {
164
+ foreach(self::$queue as $template_name => $footer) {
165
+ if (!$footer)
166
+ self::print_template($template_name);
167
+ }
168
+ }
169
+
170
+ static function print_template($template_name) {
171
+ if (in_array($template_name, array('editor', 'media', 'settings')))
172
+ require(self::locate_template($template_name));
173
+ else
174
+ printf("<script type='text/html' id='mapp-tmpl-$template_name'>%s</script>", self::get_template($template_name));
175
+ }
176
  }
177
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: leaflet, openstreetmap, osm, mapbox, map box, google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
  Requires at least: 4.5
6
  Tested up to: 5.4
7
- Stable tag: 2.53.9
8
 
9
  == Description ==
10
  MapPress adds beautiful, interactive Google or Leaflet maps to WordPress.
@@ -86,6 +86,15 @@ Please see the plugin documentation pages:
86
 
87
  == Changelog ==
88
 
 
 
 
 
 
 
 
 
 
89
  = 2.53.9 =
90
  * Fixed: internal updates to ajax functions with nonces
91
 
4
  Tags: leaflet, openstreetmap, osm, mapbox, map box, google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
  Requires at least: 4.5
6
  Tested up to: 5.4
7
+ Stable tag: 2.54
8
 
9
  == Description ==
10
  MapPress adds beautiful, interactive Google or Leaflet maps to WordPress.
86
 
87
  == Changelog ==
88
 
89
+ = 2.54 =
90
+ * Changed: Google map type control is hidden in frontend, visible only in editor
91
+ * Changed: scrollwheel zoom and keyboard shortcuts are now enabled by default (to match Google API defaults)
92
+ * Changed: filters 'mappress_tile_providers' and 'mappress_baselayers' replaced by filter 'mappress_options'
93
+ * Changed: map filters taxonomy can only be defined via settings, not in shortcodes
94
+ * Changed: improved handling of user location in directions form
95
+ * Changed: directions form closes when map is dragged or clicked
96
+ * Changed: internal updates to template editor, icon/color pickers, JavaScript loading
97
+
98
  = 2.53.9 =
99
  * Fixed: internal updates to ajax functions with nonces
100
 
templates/map-controls.php CHANGED
@@ -1,10 +1,12 @@
1
- <div class='mapp-menu-toggle' data-mapp-action='menu-toggle' title='<?php _e('Menu', 'mappress-google-maps-for-wordpress');?>'></div>
2
- <div class='mapp-menu'>
3
- <div class='mapp-menu-item' data-mapp-action='center'><?php _e('Center map', 'mappress-google-maps-for-wordpress');?></div>
4
- <# if (mappl10n.options.engine != 'leaflet') { #>
5
- <div class='mapp-menu-separator'></div>
6
- <div class='mapp-menu-item' data-mapp-action='layer' data-mapp-layer='traffic'><?php _e('Traffic', 'mappress-google-maps-for-wordpress');?></div>
7
- <div class='mapp-menu-item' data-mapp-action='layer' data-mapp-layer='bicycling'><?php _e('Bicycling', 'mappress-google-maps-for-wordpress');?></div>
8
- <div class='mapp-menu-item' data-mapp-action='layer' data-mapp-layer='transit'><?php _e('Transit', 'mappress-google-maps-for-wordpress');?></div>
9
- <# } #>
 
 
10
  </div>
1
+ <div class='mapp-controls'>
2
+ <div class='mapp-menu-toggle' data-mapp-action='menu-toggle' title='<?php _e('Menu', 'mappress-google-maps-for-wordpress');?>'></div>
3
+ <div class='mapp-menu'>
4
+ <div class='mapp-menu-item' data-mapp-action='center'><?php _e('Center map', 'mappress-google-maps-for-wordpress');?></div>
5
+ <?php if (Mappress::$options->engine != 'leaflet') { ?>
6
+ <div class='mapp-menu-separator'></div>
7
+ <div class='mapp-menu-item' data-mapp-action='layer' data-mapp-layer='traffic'><?php _e('Traffic', 'mappress-google-maps-for-wordpress');?></div>
8
+ <div class='mapp-menu-item' data-mapp-action='layer' data-mapp-layer='bicycling'><?php _e('Bicycling', 'mappress-google-maps-for-wordpress');?></div>
9
+ <div class='mapp-menu-item' data-mapp-action='layer' data-mapp-layer='transit'><?php _e('Transit', 'mappress-google-maps-for-wordpress');?></div>
10
+ <?php } ?>
11
+ </div>
12
  </div>
templates/map-directions.php CHANGED
@@ -1,20 +1,17 @@
1
  <div class='mapp-directions'>
2
- <span class='mapp-close' data-mapp-action='dir-cancel'></span>
3
- <?php if (Mappress::is_ssl()) : ?>
4
- <a href='#' class='mapp-myloc' data-mapp-action='dir-myloc'><?php _e('My location', 'mappress-google-maps-for-wordpress'); ?></a>
5
- <?php endif; ?>
6
- <div>
7
- <input class='mapp-dir-addr mapp-dir-saddr' tabindex='1'/>
8
- <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
9
- </div>
10
 
11
- <div>
12
- <input class='mapp-dir-addr mapp-dir-daddr' tabindex='2'/>
13
- </div>
14
 
15
- <div class='mapp-dir-toolbar'>
16
- <span class='mapp-button-submit' data-mapp-action='dir-get'><?php esc_html_e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
17
- <span class='mapp-spinner'></span>
18
- </div>
19
- <div class='mapp-dir-renderer'></div>
20
- </div>
1
  <div class='mapp-directions'>
2
+ <span class='mapp-close' data-mapp-action='dir-cancel'></span>
3
+ <div>
4
+ <input class='mapp-dir-saddr' tabindex='1' placeholder='<?php _e("My location", 'mappress-google-maps-for-wordpress');?>' />
5
+ <span data-mapp-action='dir-swap' class='mapp-dir-arrows'></span>
6
+ </div>
 
 
 
7
 
8
+ <div>
9
+ <input class='mapp-dir-daddr' tabindex='2'/>
10
+ </div>
11
 
12
+ <div class='mapp-dir-toolbar'>
13
+ <span class='mapp-button-submit' data-mapp-action='dir-get'><?php esc_html_e('Get Directions', 'mappress-google-maps-for-wordpress'); ?></span>
14
+ <span class='mapp-spinner'></span>
15
+ </div>
16
+ <div class='mapp-dir-renderer'></div>
17
+ </div>
templates/map-filters.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class='mapp-filters'>
2
  <div class='mapp-filters-list'>
3
- <?php $filter = new Mappress_Filter(array('key' => $map->filter, 'format' => null)); ?>
4
  <div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
5
  <div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
6
  <div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
1
  <div class='mapp-filters'>
2
  <div class='mapp-filters-list'>
3
+ <?php $filter = new Mappress_Filter(array('key' => Mappress::$options->filter, 'format' => null)); ?>
4
  <div class='mapp-filter mapp-<?php echo $filter->key; ?>'>
5
  <div class='mapp-filter-label'><?php echo $filter->get_label(); ?></div>
6
  <div class='mapp-filter-values'><?php echo $filter->get_html(); ?></div>
templates/map-search.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class='mapp-search'>
2
  <input class='mapp-places' type='text' placeholder='<?php _e('Search', 'mappress-google-maps-for-wordpress'); ?>'/>
3
- <?php if (Mappress::is_ssl()) : ?>
4
- <div class='mapp-geolocate' data-mapp-action='geolocate' title='<?php _e('Your Location', 'mappress-google-maps-for-wordpress');?>'></div>
5
- <?php endif; ?>
6
  </div>
1
  <div class='mapp-search'>
2
  <input class='mapp-places' type='text' placeholder='<?php _e('Search', 'mappress-google-maps-for-wordpress'); ?>'/>
3
+ <?php if (Mappress::is_ssl()) : ?>
4
+ <div class='mapp-geolocate' data-mapp-action='geolocate' title='<?php _e('Your Location', 'mappress-google-maps-for-wordpress');?>'></div>
5
+ <?php endif; ?>
6
  </div>