@teipublisher/pb-components 2.26.1-next.2 → 3.0.0-next-4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/.github/workflows/docker-cypress.yml +54 -0
  2. package/.github/workflows/main.yml +6 -4
  3. package/.github/workflows/node.js.yml +56 -21
  4. package/.github/workflows/release.js.yml +19 -17
  5. package/.releaserc.json +1 -1
  6. package/CHANGELOG.md +351 -9
  7. package/Dockerfile +78 -70
  8. package/README.md +112 -4
  9. package/css/components.css +5 -5
  10. package/css/gridjs/mermaid.min.css +1 -1
  11. package/css/leaflet/Control.Geocoder.css +1 -126
  12. package/css/leaflet/images/layers.png +0 -0
  13. package/css/tify/tify.css +6 -5
  14. package/css/tom-select/tom-select.bootstrap4.min.css +1 -1
  15. package/css/tom-select/tom-select.bootstrap5.min.css +1 -1
  16. package/css/tom-select/tom-select.default.min.css +1 -1
  17. package/css/tom-select/tom-select.default.min.css.map +1 -0
  18. package/css/tom-select/tom-select.min.css +1 -1
  19. package/cypress.config.js +84 -0
  20. package/dist/api.html +1 -1
  21. package/dist/css/design-system.css +607 -0
  22. package/dist/demo/bundle-test.html +4 -3
  23. package/dist/demo/components.css +46 -1
  24. package/dist/demo/design-system.html +710 -0
  25. package/dist/demo/dts-client.html +2 -2
  26. package/dist/demo/pb-autocomplete.html +23 -11
  27. package/dist/demo/pb-autocomplete2.html +66 -55
  28. package/dist/demo/pb-autocomplete3.html +17 -8
  29. package/dist/demo/pb-blacklab-highlight.html +28 -11
  30. package/dist/demo/pb-blacklab-results.html +3 -2
  31. package/dist/demo/pb-browse-docs.html +24 -24
  32. package/dist/demo/pb-browse-docs2.html +3 -3
  33. package/dist/demo/pb-clipboard.html +32 -28
  34. package/dist/demo/pb-code-editor.html +6 -6
  35. package/dist/demo/pb-code-highlight.html +63 -63
  36. package/dist/demo/pb-codepen.html +1 -1
  37. package/dist/demo/pb-collapse.html +1 -1
  38. package/dist/demo/pb-collapse2.html +2 -2
  39. package/dist/demo/pb-combo-box.html +135 -130
  40. package/dist/demo/pb-custom-form.html +64 -55
  41. package/dist/demo/pb-dialog.html +12 -6
  42. package/dist/demo/pb-document.html +1 -1
  43. package/dist/demo/pb-download.html +68 -59
  44. package/dist/demo/pb-drawer.html +67 -46
  45. package/dist/demo/pb-drawer2.html +65 -58
  46. package/dist/demo/pb-edit-app.html +2 -2
  47. package/dist/demo/pb-edit-xml.html +1 -1
  48. package/dist/demo/pb-facsimile-2.html +26 -11
  49. package/dist/demo/pb-facsimile-3.html +25 -10
  50. package/dist/demo/pb-facsimile-dedup-test-2.html +48 -0
  51. package/dist/demo/pb-facsimile-dedup-test.html +48 -0
  52. package/dist/demo/pb-facsimile.html +4 -4
  53. package/dist/demo/pb-formula.html +1 -1
  54. package/dist/demo/pb-grid.html +22 -8
  55. package/dist/demo/pb-highlight.html +2 -2
  56. package/dist/demo/pb-i18n-simple.html +1 -0
  57. package/dist/demo/pb-i18n.html +15 -5
  58. package/dist/demo/pb-image-strip-standalone.html +2 -2
  59. package/dist/demo/pb-image-strip-view.html +2 -2
  60. package/dist/demo/pb-leaflet-map.html +3 -3
  61. package/dist/demo/pb-leaflet-map2.html +2 -2
  62. package/dist/demo/pb-leaflet-map3.html +3 -3
  63. package/dist/demo/pb-link.html +1 -1
  64. package/dist/demo/pb-load.html +2 -6
  65. package/dist/demo/pb-login.html +1 -3
  66. package/dist/demo/pb-manage-odds.html +9 -4
  67. package/dist/demo/pb-markdown.html +1 -1
  68. package/dist/demo/pb-media-query.html +2 -2
  69. package/dist/demo/pb-mei.html +2 -2
  70. package/dist/demo/pb-mei2.html +2 -2
  71. package/dist/demo/pb-message.html +2 -3
  72. package/dist/demo/pb-odd-editor.html +54 -52
  73. package/dist/demo/pb-page-header.html +27 -0
  74. package/dist/demo/pb-popover.html +1 -1
  75. package/dist/demo/pb-print-preview.html +2 -2
  76. package/dist/demo/pb-progress.html +4 -4
  77. package/dist/demo/pb-repeat.html +32 -36
  78. package/dist/demo/pb-search.html +16 -5
  79. package/dist/demo/pb-search2.html +4 -4
  80. package/dist/demo/pb-search3.html +3 -3
  81. package/dist/demo/pb-search4.html +3 -3
  82. package/dist/demo/pb-select-feature.html +4 -4
  83. package/dist/demo/pb-select-feature2.html +4 -4
  84. package/dist/demo/pb-select-feature3.html +2 -2
  85. package/dist/demo/pb-select-i18n.html +58 -53
  86. package/dist/demo/pb-select-odd.html +1 -1
  87. package/dist/demo/pb-select.html +190 -75
  88. package/dist/demo/pb-select2.html +91 -37
  89. package/dist/demo/pb-select3.html +109 -41
  90. package/dist/demo/pb-svg.html +1 -1
  91. package/dist/demo/pb-table-grid.html +26 -15
  92. package/dist/demo/pb-tabs.html +15 -7
  93. package/dist/demo/pb-tify.html +7 -7
  94. package/dist/demo/pb-timeline.html +1 -1
  95. package/dist/demo/pb-timeline2.html +1 -1
  96. package/dist/demo/pb-toggle-feature.html +26 -23
  97. package/dist/demo/pb-toggle-feature2.html +4 -4
  98. package/dist/demo/pb-toggle-feature3.html +2 -2
  99. package/dist/demo/pb-toggle-feature4.html +56 -54
  100. package/dist/demo/pb-version.html +2 -2
  101. package/dist/demo/pb-view.html +78 -40
  102. package/dist/demo/pb-view2.html +69 -46
  103. package/dist/demo/pb-view3.html +53 -48
  104. package/dist/demo/pb-view4.html +70 -49
  105. package/dist/demo/pb-zoom.html +2 -2
  106. package/dist/{es-global-bridge-d8ce175d.js → es-global-bridge-D8ZcUcx_.js} +0 -4
  107. package/dist/focus-mixin-VCsFap6b.js +768 -0
  108. package/dist/images/icons.svg +217 -0
  109. package/dist/jinn-codemirror-DETLdm08.js +1 -0
  110. package/dist/lib/openseadragon.min.js +80 -0
  111. package/dist/lib/openseadragon.min.js.map +1 -0
  112. package/dist/pb-code-editor.js +25 -20
  113. package/dist/pb-component-docs.js +414 -3225
  114. package/dist/pb-components-bundle.js +3046 -4402
  115. package/dist/pb-dialog-tklYGWfc.js +121 -0
  116. package/dist/pb-edit-app.js +208 -107
  117. package/dist/pb-elements.json +716 -249
  118. package/dist/pb-facsimile.js +46 -0
  119. package/dist/pb-i18n-C0NDma4h.js +1 -0
  120. package/dist/pb-leaflet-map.js +23 -23
  121. package/dist/pb-mei.js +152 -134
  122. package/dist/pb-mixin-DHoWQheB.js +1 -0
  123. package/dist/pb-odd-editor.js +1671 -1231
  124. package/dist/pb-tify.js +1 -27
  125. package/dist/unsafe-html-D5VGo9Oq.js +1 -0
  126. package/dist/urls-BEONu_g4.js +1 -0
  127. package/eslint.config.mjs +92 -0
  128. package/gh-pages.js +5 -3
  129. package/i18n/common/en.json +6 -0
  130. package/i18n/common/pl.json +2 -2
  131. package/images/icons.svg +217 -0
  132. package/index.html +0 -5
  133. package/lib/leaflet-src.js.map +1 -0
  134. package/lib/leaflet.markercluster-src.js.map +1 -0
  135. package/lib/openseadragon.min.js +6 -6
  136. package/package.json +56 -81
  137. package/pb-elements.json +716 -249
  138. package/rollup.config.mjs +312 -0
  139. package/src/assets/components.css +5 -5
  140. package/src/assets/design-system.css +607 -0
  141. package/src/authority/airtable.js +20 -21
  142. package/src/authority/anton.js +129 -129
  143. package/src/authority/custom.js +70 -27
  144. package/src/authority/geonames.js +38 -32
  145. package/src/authority/gnd.js +50 -42
  146. package/src/authority/kbga.js +136 -134
  147. package/src/authority/metagrid.js +44 -46
  148. package/src/authority/reconciliation.js +66 -68
  149. package/src/authority/registry.js +4 -4
  150. package/src/docs/demo-utils.js +91 -0
  151. package/src/docs/pb-component-docs.js +287 -147
  152. package/src/docs/pb-component-view.js +380 -273
  153. package/src/docs/pb-components-list.js +115 -51
  154. package/src/docs/pb-demo-snippet.js +199 -174
  155. package/src/dts-client.js +306 -303
  156. package/src/dts-select-endpoint.js +125 -85
  157. package/src/parse-date-service.js +184 -135
  158. package/src/pb-ajax.js +175 -173
  159. package/src/pb-authority-lookup.js +198 -158
  160. package/src/pb-autocomplete.js +731 -313
  161. package/src/pb-blacklab-highlight.js +266 -260
  162. package/src/pb-blacklab-results.js +230 -225
  163. package/src/pb-browse-docs.js +601 -484
  164. package/src/pb-browse.js +68 -65
  165. package/src/pb-clipboard.js +97 -76
  166. package/src/pb-code-editor.js +111 -103
  167. package/src/pb-code-highlight.js +234 -204
  168. package/src/pb-codepen.js +81 -73
  169. package/src/pb-collapse.js +265 -152
  170. package/src/pb-combo-box.js +191 -191
  171. package/src/pb-components-bundle.js +1 -7
  172. package/src/pb-components.js +2 -6
  173. package/src/pb-custom-form.js +230 -141
  174. package/src/pb-dialog.js +99 -63
  175. package/src/pb-document.js +118 -91
  176. package/src/pb-download.js +214 -198
  177. package/src/pb-drawer.js +146 -149
  178. package/src/pb-edit-app.js +471 -240
  179. package/src/pb-edit-xml.js +101 -98
  180. package/src/pb-events.js +126 -107
  181. package/src/pb-facs-link.js +130 -101
  182. package/src/pb-facsimile.js +494 -410
  183. package/src/pb-fetch.js +389 -0
  184. package/src/pb-formula.js +152 -154
  185. package/src/pb-geolocation.js +130 -132
  186. package/src/pb-grid-action.js +59 -56
  187. package/src/pb-grid.js +388 -228
  188. package/src/pb-highlight.js +142 -142
  189. package/src/pb-hotkeys.js +40 -42
  190. package/src/pb-i18n.js +115 -127
  191. package/src/pb-icon-button.js +108 -0
  192. package/src/pb-icon.js +283 -0
  193. package/src/pb-image-strip.js +85 -79
  194. package/src/pb-lang.js +142 -57
  195. package/src/pb-leaflet-map.js +551 -483
  196. package/src/pb-link.js +132 -126
  197. package/src/pb-load.js +495 -428
  198. package/src/pb-login.js +303 -248
  199. package/src/pb-manage-odds.js +384 -338
  200. package/src/pb-map-icon.js +90 -90
  201. package/src/pb-map-layer.js +86 -86
  202. package/src/pb-markdown.js +107 -110
  203. package/src/pb-media-query.js +75 -73
  204. package/src/pb-mei.js +523 -303
  205. package/src/pb-message.js +144 -98
  206. package/src/pb-mixin.js +268 -265
  207. package/src/pb-navigation.js +83 -96
  208. package/src/pb-observable.js +39 -39
  209. package/src/pb-odd-editor.js +1209 -948
  210. package/src/pb-odd-elementspec-editor.js +375 -310
  211. package/src/pb-odd-model-editor.js +1189 -941
  212. package/src/pb-odd-parameter-editor.js +269 -170
  213. package/src/pb-odd-rendition-editor.js +184 -131
  214. package/src/pb-page.js +451 -422
  215. package/src/pb-paginate.js +260 -178
  216. package/src/pb-panel.js +217 -183
  217. package/src/pb-popover-themes.js +16 -9
  218. package/src/pb-popover.js +297 -288
  219. package/src/pb-print-preview.js +128 -128
  220. package/src/pb-progress.js +52 -52
  221. package/src/pb-repeat.js +141 -108
  222. package/src/pb-restricted.js +85 -78
  223. package/src/pb-search.js +258 -230
  224. package/src/pb-select-feature.js +210 -126
  225. package/src/pb-select-odd.js +184 -118
  226. package/src/pb-select-template.js +113 -78
  227. package/src/pb-select.js +330 -229
  228. package/src/pb-split-list.js +181 -176
  229. package/src/pb-svg.js +81 -80
  230. package/src/pb-table-column.js +55 -55
  231. package/src/pb-table-grid.js +334 -205
  232. package/src/pb-tabs.js +238 -61
  233. package/src/pb-tify.js +3331 -126
  234. package/src/pb-timeline.js +394 -255
  235. package/src/pb-toggle-feature.js +196 -188
  236. package/src/pb-upload.js +201 -176
  237. package/src/pb-version.js +22 -34
  238. package/src/pb-view-annotate.js +138 -102
  239. package/src/pb-view.js +1722 -1272
  240. package/src/pb-zoom.js +144 -46
  241. package/src/search-result-service.js +256 -223
  242. package/src/seed-element.js +14 -22
  243. package/src/settings.js +4 -4
  244. package/src/theming.js +98 -91
  245. package/src/urls.js +403 -289
  246. package/src/utils.js +53 -51
  247. package/vite.config.js +86 -0
  248. package/css/pb-styles.css +0 -51
  249. package/dist/iron-form-3b8dcaa7.js +0 -210
  250. package/dist/jinn-codemirror-da0e2d1f.js +0 -1
  251. package/dist/paper-checkbox-515a5284.js +0 -1597
  252. package/dist/paper-icon-button-b1d31571.js +0 -398
  253. package/dist/paper-listbox-a3b7175c.js +0 -1265
  254. package/dist/pb-i18n-0611135a.js +0 -1
  255. package/dist/pb-mixin-b1caa22e.js +0 -158
  256. package/dist/polymer-hack.js +0 -1
  257. package/dist/vaadin-element-mixin-6e4cee3a.js +0 -527
  258. package/lib/Control.Geocoder.min.js +0 -2
  259. package/lib/Control.Geocoder.min.js.map +0 -1
  260. package/src/assets/pb-styles.css +0 -51
  261. package/src/pb-light-dom.js +0 -40
  262. package/src/polymer-hack.js +0 -6
@@ -1,2 +0,0 @@
1
- var leafletControlGeocoder=function(t,e){function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}}),e.default=t,e}var n=o(e);function s(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function i(t,e){return n.Util.extend(e,t.geocodingQueryParams)}function r(t,e){return n.Util.extend(e,t.reverseQueryParams)}var a=0,l=/[&<>"'`]/g,c=/[&<>"'`]/,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function p(t){return u[t]}function d(t,e,o,s,i){var r="_l_geocoder_"+a++;e[i||"callback"]=r,window[r]=n.Util.bind(o,s);var l=document.createElement("script");l.type="text/javascript",l.src=t+g(e),l.id=r,document.getElementsByTagName("head")[0].appendChild(l)}function h(t,e,o){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){var t;if(200!==n.status&&304!==n.status)t="";else if("string"==typeof n.response)try{t=JSON.parse(n.response)}catch(e){t=n.response}else t=n.response;o(t)}},n.open("GET",t+g(e),!0),n.responseType="json",n.setRequestHeader("Accept","application/json"),n.send(null)}function g(t,e,o){var n=[];for(var s in t){var i=encodeURIComponent(o?s.toUpperCase():s),r=t[s];if(Array.isArray(r))for(var a=0;a<r.length;a++)n.push(i+"="+encodeURIComponent(r[a]));else n.push(i+"="+encodeURIComponent(String(r)))}return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var f=function(){function t(t){this.options={serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",apiKey:""},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{token:this.options.apiKey,SingleLine:t,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"});h(this.options.serviceUrl+"/findAddressCandidates",s,function(t){var s=[];if(t.candidates&&t.candidates.length)for(var i=0;i<=t.candidates.length-1;i++){var r=t.candidates[i],a=n.latLng(r.location.y,r.location.x),l=n.latLngBounds(n.latLng(r.extent.ymax,r.extent.xmax),n.latLng(r.extent.ymin,r.extent.xmin));s[i]={name:r.address,bbox:l,center:a}}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{location:t.lng+","+t.lat,distance:100,f:"json"});h(this.options.serviceUrl+"/reverseGeocode",i,function(t){var e=[];if(t&&!t.error){var i=n.latLng(t.location.y,t.location.x),r=n.latLngBounds(i,i);e.push({name:t.address.Match_addr,center:i,bbox:r})}o.call(s,e)})},t}(),v=function(){function t(t){this.options={serviceUrl:"https://dev.virtualearth.net/REST/v1/Locations"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{query:t,key:this.options.apiKey});d(this.options.apiKey,s,function(t){var s=[];if(t.resourceSets.length>0)for(var i=t.resourceSets[0].resources.length-1;i>=0;i--){var r=t.resourceSets[0].resources[i],a=r.bbox;s[i]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}e.call(o,s)},this,"jsonp")},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey});d(this.options.serviceUrl+t.lat+","+t.lng,i,function(t){for(var e=[],i=t.resourceSets[0].resources.length-1;i>=0;i--){var r=t.resourceSets[0].resources[i],a=r.bbox;e[i]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}o.call(s,e)},this,"jsonp")},t}(),m=function(){function t(t){this.options={serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{key:this.options.apiKey,address:t});h(this.options.serviceUrl,s,function(t){var s=[];if(t.results&&t.results.length)for(var i=0;i<=t.results.length-1;i++){var r=t.results[i],a=n.latLng(r.geometry.location),l=n.latLngBounds(n.latLng(r.geometry.viewport.northeast),n.latLng(r.geometry.viewport.southwest));s[i]={name:r.formatted_address,bbox:l,center:a,properties:r.address_components}}e.call(o,s)})},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey,latlng:t.lat+","+t.lng});h(this.options.serviceUrl,i,function(t){var e=[];if(t.results&&t.results.length)for(var i=0;i<=t.results.length-1;i++){var r=t.results[i],a=n.latLng(r.geometry.location),l=n.latLngBounds(n.latLng(r.geometry.viewport.northeast),n.latLng(r.geometry.viewport.southwest));e[i]={name:r.formatted_address,bbox:l,center:a,properties:r.address_components}}o.call(s,e)})},t}(),_=function(){function t(t){if(this.options={serviceUrl:"https://geocoder.api.here.com/6.2/",app_id:"",app_code:"",apiKey:"",maxResults:5},n.Util.setOptions(this,t),t.apiKey)throw Error("apiKey is not supported, use app_id/app_code instead!")}var e=t.prototype;return e.geocode=function(t,e,o){var n=i(this.options,{searchtext:t,gen:9,app_id:this.options.app_id,app_code:this.options.app_code,jsonattributes:1,maxresults:this.options.maxResults});this.getJSON(this.options.serviceUrl+"geocode.json",n,e,o)},e.reverse=function(t,e,o,n){var s=t.lat+","+t.lng;this.options.reverseGeocodeProxRadius&&(s+=","+this.options.reverseGeocodeProxRadius);var i=r(this.options,{prox:s,mode:"retrieveAddresses",app_id:this.options.app_id,app_code:this.options.app_code,gen:9,jsonattributes:1,maxresults:this.options.maxResults});this.getJSON(this.options.serviceUrl+"reversegeocode.json",i,o,n)},e.getJSON=function(t,e,o,s){h(t,e,function(t){var e=[];if(t.response.view&&t.response.view.length)for(var i=0;i<=t.response.view[0].result.length-1;i++){var r=t.response.view[0].result[i].location,a=n.latLng(r.displayPosition.latitude,r.displayPosition.longitude),l=n.latLngBounds(n.latLng(r.mapView.topLeft.latitude,r.mapView.topLeft.longitude),n.latLng(r.mapView.bottomRight.latitude,r.mapView.bottomRight.longitude));e[i]={name:r.address.label,properties:r.address,bbox:l,center:a}}o.call(s,e)})},t}(),b=function(){function t(t){this.options={serviceUrl:"https://geocode.search.hereapi.com/v1",apiKey:"",app_id:"",app_code:"",maxResults:10},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var n=i(this.options,{q:t,apiKey:this.options.apiKey,limit:this.options.maxResults});if(!n.at&&!n.in)throw Error("at / in parameters not found. Please define coordinates (at=latitude,longitude) or other (in) in your geocodingQueryParams.");this.getJSON(this.options.serviceUrl+"/discover",n,e,o)},e.reverse=function(t,e,o,n){var s=r(this.options,{at:t.lat+","+t.lng,limit:this.options.reverseGeocodeProxRadius,apiKey:this.options.apiKey});this.getJSON(this.options.serviceUrl+"/revgeocode",s,o,n)},e.getJSON=function(t,e,o,s){h(t,e,function(t){var e=[];if(t.items&&t.items.length)for(var i=0;i<=t.items.length-1;i++){var r,a=t.items[i],l=n.latLng(a.position.lat,a.position.lng);r=a.mapView?n.latLngBounds(n.latLng(a.mapView.south,a.mapView.west),n.latLng(a.mapView.north,a.mapView.east)):n.latLngBounds(n.latLng(a.position.lat,a.position.lng),n.latLng(a.position.lat,a.position.lng)),e[i]={name:a.address.label,properties:a.address,bbox:r,center:l}}o.call(s,e)})},t}();function y(t){var e;return(e=t.match(/^([NS])\s*(\d{1,3}(?:\.\d*)?)\W*([EW])\s*(\d{1,3}(?:\.\d*)?)$/))?n.latLng((/N/i.test(e[1])?1:-1)*+e[2],(/E/i.test(e[3])?1:-1)*+e[4]):(e=t.match(/^(\d{1,3}(?:\.\d*)?)\s*([NS])\W*(\d{1,3}(?:\.\d*)?)\s*([EW])$/))?n.latLng((/N/i.test(e[2])?1:-1)*+e[1],(/E/i.test(e[4])?1:-1)*+e[3]):(e=t.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?$/))?n.latLng((/N/i.test(e[1])?1:-1)*(+e[2]+ +e[3]/60),(/E/i.test(e[4])?1:-1)*(+e[5]+ +e[6]/60)):(e=t.match(/^(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\s*([NS])\W*(\d{1,3})°?\s*(\d{1,3}(?:\.\d*)?)?['′]?\s*([EW])$/))?n.latLng((/N/i.test(e[3])?1:-1)*(+e[1]+ +e[2]/60),(/E/i.test(e[6])?1:-1)*(+e[4]+ +e[5]/60)):(e=t.match(/^([NS])\s*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?\W*([EW])\s*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?$/))?n.latLng((/N/i.test(e[1])?1:-1)*(+e[2]+ +e[3]/60+ +e[4]/3600),(/E/i.test(e[5])?1:-1)*(+e[6]+ +e[7]/60+ +e[8]/3600)):(e=t.match(/^(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]\s*([NS])\W*(\d{1,3})°?\s*(\d{1,2})['′]?\s*(\d{1,3}(?:\.\d*)?)?["″]?\s*([EW])$/))?n.latLng((/N/i.test(e[4])?1:-1)*(+e[1]+ +e[2]/60+ +e[3]/3600),(/E/i.test(e[8])?1:-1)*(+e[5]+ +e[6]/60+ +e[7]/3600)):(e=t.match(/^\s*([+-]?\d+(?:\.\d*)?)\s*[\s,]\s*([+-]?\d+(?:\.\d*)?)\s*$/))?n.latLng(+e[1],+e[2]):void 0}var L=function(){function t(t){this.options={next:void 0,sizeInMeters:1e4},n.Util.setOptions(this,t)}return t.prototype.geocode=function(t,e,o){var n=y(t);if(n){var s=[{name:t,center:n,bbox:n.toBounds(this.options.sizeInMeters)}];e.call(o,s)}else this.options.next&&this.options.next.geocode(t,e,o)},t}(),x=function(){function t(t){this.options={serviceUrl:"https://api.mapbox.com/geocoding/v5/mapbox.places/"},n.Util.setOptions(this,t)}var e=t.prototype;return e._getProperties=function(t){for(var e={text:t.text,address:t.address},o=0;o<(t.context||[]).length;o++)e[t.context[o].id.split(".")[0]]=t.context[o].text,t.context[o].short_code&&(e.countryShortCode=t.context[o].short_code);return e},e.geocode=function(t,e,o){var s=this,r=i(this.options,{access_token:this.options.apiKey});void 0!==r.proximity&&void 0!==r.proximity.lat&&void 0!==r.proximity.lng&&(r.proximity=r.proximity.lng+","+r.proximity.lat),h(this.options.serviceUrl+encodeURIComponent(t)+".json",r,function(t){var i=[];if(t.features&&t.features.length)for(var r=0;r<=t.features.length-1;r++){var a,l=t.features[r],c=n.latLng(l.center.reverse());a=l.bbox?n.latLngBounds(n.latLng(l.bbox.slice(0,2).reverse()),n.latLng(l.bbox.slice(2,4).reverse())):n.latLngBounds(c,c),i[r]={name:l.place_name,bbox:a,center:c,properties:s._getProperties(l)}}e.call(o,i)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=this;h(this.options.serviceUrl+t.lng+","+t.lat+".json",r(this.options,{access_token:this.options.apiKey}),function(t){var e=[];if(t.features&&t.features.length)for(var r=0;r<=t.features.length-1;r++){var a,l=t.features[r],c=n.latLng(l.center.reverse());a=l.bbox?n.latLngBounds(n.latLng(l.bbox.slice(0,2).reverse()),n.latLng(l.bbox.slice(2,4).reverse())):n.latLngBounds(c,c),e[r]={name:l.place_name,bbox:a,center:c,properties:i._getProperties(l)}}o.call(s,e)})},t}(),U=function(){function t(t){this.options={serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},n.Util.setOptions(this,t),this.options.apiKey=decodeURIComponent(this.options.apiKey)}var e=t.prototype;return e._formatName=function(){return[].slice.call(arguments).filter(function(t){return!!t}).join(", ")},e.geocode=function(t,e,o){var s=i(this.options,{key:this.options.apiKey,location:t,limit:5,outFormat:"json"});h(this.options.serviceUrl+"/address",s,n.Util.bind(function(t){var s=[];if(t.results&&t.results[0].locations)for(var i=t.results[0].locations.length-1;i>=0;i--){var r=t.results[0].locations[i],a=n.latLng(r.latLng);s[i]={name:this._formatName(r.street,r.adminArea4,r.adminArea3,r.adminArea1),bbox:n.latLngBounds(a,a),center:a}}e.call(o,s)},this))},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey,location:t.lat+","+t.lng,outputFormat:"json"});h(this.options.serviceUrl+"/reverse",i,n.Util.bind(function(t){var e=[];if(t.results&&t.results[0].locations)for(var i=t.results[0].locations.length-1;i>=0;i--){var r=t.results[0].locations[i],a=n.latLng(r.latLng);e[i]={name:this._formatName(r.street,r.adminArea4,r.adminArea3,r.adminArea1),bbox:n.latLngBounds(a,a),center:a}}o.call(s,e)},this))},t}(),w=function(){function t(t){this.options={userId:void 0,apiKey:void 0,serviceUrl:"https://neutrinoapi.com/"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,address:t.split(/\s+/).join(".")});h(this.options.serviceUrl+"geocode-address",s,function(t){var s=[];if(t.locations){t.geometry=t.locations[0];var i=n.latLng(t.geometry.latitude,t.geometry.longitude),r=n.latLngBounds(i,i);s[0]={name:t.geometry.address,bbox:r,center:i}}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{apiKey:this.options.apiKey,userId:this.options.userId,latitude:t.lat,longitude:t.lng});h(this.options.serviceUrl+"geocode-reverse",i,function(e){var i=[];if(200==e.status.status&&e.found){var r=n.latLng(t.lat,t.lng),a=n.latLngBounds(r,r);i[0]={name:e.address,bbox:a,center:r}}o.call(s,i)})},t}(),C=function(){function t(t){this.options={serviceUrl:"https://nominatim.openstreetmap.org/",htmlTemplate:function(t){var e,o,n=t.address,s=[];return(n.road||n.building)&&s.push("{building} {road} {house_number}"),(n.city||n.town||n.village||n.hamlet)&&s.push('<span class="'+(s.length>0?"leaflet-control-geocoder-address-detail":"")+'">{postcode} {city} {town} {village} {hamlet}</span>'),(n.state||n.country)&&s.push('<span class="'+(s.length>0?"leaflet-control-geocoder-address-context":"")+'">{state} {country}</span>'),e=s.join("<br/>"),o=n,e.replace(/\{ *([\w_]+) *\}/g,function(t,e){var n,s=o[e];return void 0===s?s="":"function"==typeof s&&(s=s(o)),null==(n=s)?"":n?c.test(n=""+n)?n.replace(l,p):n:n+""})}},n.Util.setOptions(this,t||{})}var e=t.prototype;return e.geocode=function(t,e,o){var s=this,r=i(this.options,{q:t,limit:5,format:"json",addressdetails:1});h(this.options.serviceUrl+"search",r,function(t){for(var i=[],r=t.length-1;r>=0;r--){for(var a=t[r].boundingbox,l=0;l<4;l++)a[l]=+a[l];i[r]={icon:t[r].icon,name:t[r].display_name,html:s.options.htmlTemplate?s.options.htmlTemplate(t[r]):void 0,bbox:n.latLngBounds([a[0],a[2]],[a[1],a[3]]),center:n.latLng(t[r].lat,t[r].lon),properties:t[r]}}e.call(o,i)})},e.reverse=function(t,e,o,s){var i=this,a=r(this.options,{lat:t.lat,lon:t.lng,zoom:Math.round(Math.log(e/256)/Math.log(2)),addressdetails:1,format:"json"});h(this.options.serviceUrl+"reverse",a,function(t){var e=[];if(t&&t.lat&&t.lon){var r=n.latLng(t.lat,t.lon),a=n.latLngBounds(r,r);e.push({name:t.display_name,html:i.options.htmlTemplate?i.options.htmlTemplate(t):void 0,center:r,bbox:a,properties:t})}o.call(s,e)})},t}(),E=function(){function t(t){n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){try{var s=this.options.OpenLocationCode.decode(t),i={name:t,center:n.latLng(s.latitudeCenter,s.longitudeCenter),bbox:n.latLngBounds(n.latLng(s.latitudeLo,s.longitudeLo),n.latLng(s.latitudeHi,s.longitudeHi))};e.call(o,[i])}catch(t){console.warn(t),e.call(o,[])}},e.reverse=function(t,e,o,s){try{var i={name:this.options.OpenLocationCode.encode(t.lat,t.lng,this.options.codeLength),center:n.latLng(t.lat,t.lng),bbox:n.latLngBounds(n.latLng(t.lat,t.lng),n.latLng(t.lat,t.lng))};o.call(s,[i])}catch(t){console.warn(t),o.call(s,[])}},t}(),k=function(){function t(t){this.options={serviceUrl:"https://api.opencagedata.com/geocode/v1/json"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{key:this.options.apiKey,q:t});h(this.options.serviceUrl,s,function(t){var s=[];if(t.results&&t.results.length)for(var i=0;i<t.results.length;i++){var r,a=t.results[i],l=n.latLng(a.geometry);r=a.annotations&&a.annotations.bounds?n.latLngBounds(n.latLng(a.annotations.bounds.northeast),n.latLng(a.annotations.bounds.southwest)):n.latLngBounds(l,l),s.push({name:a.formatted,bbox:r,center:l})}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{key:this.options.apiKey,q:[t.lat,t.lng].join(",")});h(this.options.serviceUrl,i,function(t){var e=[];if(t.results&&t.results.length)for(var i=0;i<t.results.length;i++){var r,a=t.results[i],l=n.latLng(a.geometry);r=a.annotations&&a.annotations.bounds?n.latLngBounds(n.latLng(a.annotations.bounds.northeast),n.latLng(a.annotations.bounds.southwest)):n.latLngBounds(l,l),e.push({name:a.formatted,bbox:r,center:l})}o.call(s,e)})},t}(),D=function(){function t(t){this.options={serviceUrl:"https://api.geocode.earth/v1"},this._lastSuggest=0,n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var n=this,s=i(this.options,{api_key:this.options.apiKey,text:t});h(this.options.serviceUrl+"/search",s,function(t){e.call(o,n._parseResults(t,"bbox"))})},e.suggest=function(t,e,o){var n=this,s=i(this.options,{api_key:this.options.apiKey,text:t});h(this.options.serviceUrl+"/autocomplete",s,function(t){t.geocoding.timestamp>n._lastSuggest&&(n._lastSuggest=t.geocoding.timestamp,e.call(o,n._parseResults(t,"bbox")))})},e.reverse=function(t,e,o,n){var s=this,i=r(this.options,{api_key:this.options.apiKey,"point.lat":t.lat,"point.lon":t.lng});h(this.options.serviceUrl+"/reverse",i,function(t){o.call(n,s._parseResults(t,"bounds"))})},e._parseResults=function(t,e){var o=[];return n.geoJSON(t,{pointToLayer:function(t,e){return n.circleMarker(e)},onEachFeature:function(t,s){var i,r,a={};s.getBounds?r=(i=s.getBounds()).getCenter():s.feature.bbox?(r=s.getLatLng(),i=n.latLngBounds(n.GeoJSON.coordsToLatLng(s.feature.bbox.slice(0,2)),n.GeoJSON.coordsToLatLng(s.feature.bbox.slice(2,4)))):(r=s.getLatLng(),i=n.latLngBounds(r,r)),a.name=s.feature.properties.label,a.center=r,a[e]=i,a.properties=s.feature.properties,o.push(a)}}),o},t}();function B(t){return new D(t)}var R=D,S=B,O=D,K=B,T=function(t){function e(e){return t.call(this,n.Util.extend({serviceUrl:"https://api.openrouteservice.org/geocode"},e))||this}return s(e,t),e}(D),j=function(){function t(t){this.options={serviceUrl:"https://photon.komoot.io/api/",reverseUrl:"https://photon.komoot.io/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){var s=i(this.options,{q:t});h(this.options.serviceUrl,s,n.Util.bind(function(t){e.call(o,this._decodeFeatures(t))},this))},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){var i=r(this.options,{lat:t.lat,lon:t.lng});h(this.options.reverseUrl,i,n.Util.bind(function(t){o.call(s,this._decodeFeatures(t))},this))},e._decodeFeatures=function(t){var e=[];if(t&&t.features)for(var o=0;o<t.features.length;o++){var s=t.features[o],i=s.geometry.coordinates,r=n.latLng(i[1],i[0]),a=s.properties.extent,l=a?n.latLngBounds([a[1],a[0]],[a[3],a[2]]):n.latLngBounds(r,r);e.push({name:this._decodeFeatureName(s),html:this.options.htmlTemplate?this.options.htmlTemplate(s):void 0,center:r,bbox:l,properties:s.properties})}return e},e._decodeFeatureName=function(t){return(this.options.nameProperties||[]).map(function(e){return t.properties[e]}).filter(function(t){return!!t}).join(", ")},t}(),N=function(){function t(t){this.options={serviceUrl:"https://api.what3words.com/v2/"},n.Util.setOptions(this,t)}var e=t.prototype;return e.geocode=function(t,e,o){h(this.options.serviceUrl+"forward",i(this.options,{key:this.options.apiKey,addr:t.split(/\s+/).join(".")}),function(t){var s=[];if(t.geometry){var i=n.latLng(t.geometry.lat,t.geometry.lng),r=n.latLngBounds(i,i);s[0]={name:t.words,bbox:r,center:i}}e.call(o,s)})},e.suggest=function(t,e,o){return this.geocode(t,e,o)},e.reverse=function(t,e,o,s){h(this.options.serviceUrl+"reverse",r(this.options,{key:this.options.apiKey,coords:[t.lat,t.lng].join(",")}),function(t){var e=[];if(200==t.status.status){var i=n.latLng(t.geometry.lat,t.geometry.lng),r=n.latLngBounds(i,i);e[0]={name:t.words,bbox:r,center:i}}o.call(s,e)})},t}(),M={__proto__:null,geocodingParams:i,reverseParams:r,ArcGis:f,arcgis:function(t){return new f(t)},Bing:v,bing:function(t){return new v(t)},Google:m,google:function(t){return new m(t)},HERE:_,HEREv2:b,here:function(t){return t.apiKey?new b(t):new _(t)},parseLatLng:y,LatLng:L,latLng:function(t){return new L(t)},Mapbox:x,mapbox:function(t){return new x(t)},MapQuest:U,mapQuest:function(t){return new U(t)},Neutrino:w,neutrino:function(t){return new w(t)},Nominatim:C,nominatim:function(t){return new C(t)},OpenLocationCode:E,openLocationCode:function(t){return new E(t)},OpenCage:k,opencage:function(t){return new k(t)},Pelias:D,pelias:B,GeocodeEarth:R,geocodeEarth:S,Mapzen:O,mapzen:K,Openrouteservice:T,openrouteservice:function(t){return new T(t)},Photon:j,photon:function(t){return new j(t)},What3Words:N,what3words:function(t){return new N(t)}},P=function(){};n.Util.extend(P.prototype,n.Control.prototype),n.Util.extend(P.prototype,n.Evented.prototype);var G=function(t){function e(e){var o;return(o=t.call(this,e)||this).options={showUniqueResult:!0,showResultIcons:!1,collapsed:!0,expand:"touch",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",iconLabel:"Initiate a new search",query:"",queryMinLength:1,suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},o._requestCount=0,n.Util.setOptions(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o),e),o.options.geocoder||(o.options.geocoder=new C),o}s(e,t);var o=e.prototype;return o.addThrobberClass=function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")},o.removeThrobberClass=function(){n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")},o.onAdd=function(t){var e=this,o="leaflet-control-geocoder",s=n.DomUtil.create("div",o+" leaflet-bar"),i=n.DomUtil.create("button",o+"-icon",s),r=this._form=n.DomUtil.create("div",o+"-form",s);this._map=t,this._container=s,i.innerHTML="&nbsp;",i.type="button",i.setAttribute("aria-label",this.options.iconLabel);var a=this._input=n.DomUtil.create("input","",r);return a.type="text",a.value=this.options.query,a.placeholder=this.options.placeholder,n.DomEvent.disableClickPropagation(a),this._errorElement=n.DomUtil.create("div",o+"-form-no-error",s),this._errorElement.innerHTML=this.options.errorMessage,this._alts=n.DomUtil.create("ul",o+"-alternatives leaflet-control-geocoder-alternatives-minimized",s),n.DomEvent.disableClickPropagation(this._alts),n.DomEvent.addListener(a,"keydown",this._keydown,this),this.options.geocoder.suggest&&n.DomEvent.addListener(a,"input",this._change,this),n.DomEvent.addListener(a,"blur",function(){e.options.collapsed&&!e._preventBlurCollapse&&e._collapse(),e._preventBlurCollapse=!1}),this.options.collapsed?"click"===this.options.expand?n.DomEvent.addListener(s,"click",function(t){0===t.button&&2!==t.detail&&e._toggle()}):"touch"===this.options.expand?n.DomEvent.addListener(s,n.Browser.touch?"touchstart mousedown":"mousedown",function(t){e._toggle(),t.preventDefault(),t.stopPropagation()},this):(n.DomEvent.addListener(s,"mouseover",this._expand,this),n.DomEvent.addListener(s,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(this._expand(),n.DomEvent.addListener(s,n.Browser.touch?"touchstart":"click",function(){return e._geocode()})),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",this.addThrobberClass,this),this.on("finishgeocode",this.removeThrobberClass,this),this.on("startsuggest",this.addThrobberClass,this),this.on("finishsuggest",this.removeThrobberClass,this),n.DomEvent.disableClickPropagation(s),s},o.setQuery=function(t){return this._input.value=t,this},o._geocodeResult=function(t,e){if(!e&&this.options.showUniqueResult&&1===t.length)this._geocodeResultSelected(t[0]);else if(t.length>0){this._alts.innerHTML="",this._results=t,n.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),n.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-open");for(var o=0;o<t.length;o++)this._alts.appendChild(this._createAlt(t[o],o))}else n.DomUtil.addClass(this._container,"leaflet-control-geocoder-options-error"),n.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error")},o.markGeocode=function(t){var e=t.geocode;return this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new n.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this},o._geocode=function(t){var e=this,o=this._input.value;if(t||!(o.length<this.options.queryMinLength)){var n=++this._requestCount,s=function(s){n===e._requestCount&&(e.fire(t?"finishsuggest":"finishgeocode",{input:o,results:s}),e._geocodeResult(s,t))};this._lastGeocode=o,t||this._clearResults(),this.fire(t?"startsuggest":"startgeocode",{input:o}),t?this.options.geocoder.suggest(o,s):this.options.geocoder.geocode(o,s)}},o._geocodeResultSelected=function(t){this.fire("markgeocode",{geocode:t})},o._toggle=function(){n.DomUtil.hasClass(this._container,"leaflet-control-geocoder-expanded")?this._collapse():this._expand()},o._expand=function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")},o._collapse=function(){n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-expanded"),n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error"),this._input.blur(),this.fire("collapse")},o._clearResults=function(){n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-open"),n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-options-error")},o._createAlt=function(t,e){var o=this,s=n.DomUtil.create("li",""),i=n.DomUtil.create("a","",s),r=this.options.showResultIcons&&t.icon?n.DomUtil.create("img","",i):null,a=t.html?void 0:document.createTextNode(t.name);return r&&(r.src=t.icon),s.setAttribute("data-result-index",String(e)),t.html?i.innerHTML=i.innerHTML+t.html:a&&i.appendChild(a),n.DomEvent.addListener(s,"mousedown touchstart",function(e){o._preventBlurCollapse=!0,n.DomEvent.stop(e),o._geocodeResultSelected(t),n.DomEvent.on(s,"click touchend",function(){o.options.collapsed?o._collapse():o._clearResults()})},this),s},o._keydown=function(t){var e=this,o=function(t){e._selection&&(n.DomUtil.removeClass(e._selection,"leaflet-control-geocoder-selected"),e._selection=e._selection[t>0?"nextSibling":"previousSibling"]),e._selection||(e._selection=e._alts[t>0?"firstChild":"lastChild"]),e._selection&&n.DomUtil.addClass(e._selection,"leaflet-control-geocoder-selected")};switch(t.keyCode){case 27:this.options.collapsed?this._collapse():this._clearResults();break;case 38:o(-1);break;case 40:o(1);break;case 13:if(this._selection){var s=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[s]),this._clearResults()}else this._geocode();break;default:return}n.DomEvent.preventDefault(t)},o._change=function(){var t=this,e=this._input.value;e!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),e.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(function(){return t._geocode(!0)},this.options.suggestTimeout):this._clearResults())},e}(P);function q(t){return new G(t)}return n.Util.extend(G,M),n.Util.extend(n.Control,{Geocoder:G,geocoder:q}),t.Geocoder=G,t.default=G,t.geocoder=q,t.geocoders=M,t}({},L);
2
- //# sourceMappingURL=Control.Geocoder.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Control.Geocoder.min.js","sources":["../src/geocoders/api.ts","../src/util.ts","../src/geocoders/arcgis.ts","../src/geocoders/bing.ts","../src/geocoders/google.ts","../src/geocoders/here.ts","../src/geocoders/latlng.ts","../src/geocoders/mapbox.ts","../src/geocoders/mapquest.ts","../src/geocoders/neutrino.ts","../src/geocoders/nominatim.ts","../src/geocoders/open-location-code.ts","../src/geocoders/opencage.ts","../src/geocoders/pelias.ts","../src/geocoders/photon.ts","../src/geocoders/what3words.ts","../src/control.ts","../src/index.ts"],"sourcesContent":["import * as L from 'leaflet';\n\n/**\n * An object that represents a result from a geocoding query\n */\nexport interface GeocodingResult {\n /**\n * Name of found location\n */\n name: string;\n /**\n * The bounds of the location\n */\n bbox: L.LatLngBounds;\n /**\n * The center coordinate of the location\n */\n center: L.LatLng;\n /**\n * URL for icon representing result; optional\n */\n icon?: string;\n /**\n * HTML formatted representation of the name\n */\n html?: string;\n /**\n * Additional properties returned by the geocoder\n */\n properties?: any;\n}\n\n/**\n * A callback function used in {@link IGeocoder.geocode} and {@link IGeocoder.suggest} and {@link IGeocoder.reverse}\n */\nexport type GeocodingCallback = (result: GeocodingResult[]) => void;\n\n/**\n * An interface implemented to respond to geocoding queries\n */\nexport interface IGeocoder {\n /**\n * Performs a geocoding query and returns the results to the callback in the provided context\n * @param query the query\n * @param cb the callback function\n * @param context the `this` context in the callback\n */\n geocode(query: string, cb: GeocodingCallback, context?: any): void;\n /**\n * Performs a geocoding query suggestion (this happens while typing) and returns the results to the callback in the provided context\n * @param query the query\n * @param cb the callback function\n * @param context the `this` context in the callback\n */\n suggest?(query: string, cb: GeocodingCallback, context?: any): void;\n /**\n * Performs a reverse geocoding query and returns the results to the callback in the provided context\n * @param location the coordinate to reverse geocode\n * @param scale the map scale possibly used for reverse geocoding\n * @param cb the callback function\n * @param context the `this` context in the callback\n */\n reverse?(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void;\n}\n\nexport interface GeocoderOptions {\n /**\n * URL of the service\n */\n serviceUrl: string;\n /**\n * Additional URL parameters (strings) that will be added to geocoding requests\n */\n geocodingQueryParams?: Record<string, unknown>;\n /**\n * Additional URL parameters (strings) that will be added to reverse geocoding requests\n */\n reverseQueryParams?: Record<string, unknown>;\n /**\n * API key to use this service\n */\n apiKey?: string;\n}\n\n/**\n * @internal\n */\nexport function geocodingParams(\n options: GeocoderOptions,\n params: Record<string, unknown>\n): Record<string, unknown> {\n return L.Util.extend(params, options.geocodingQueryParams);\n}\n\n/**\n * @internal\n */\nexport function reverseParams(\n options: GeocoderOptions,\n params: Record<string, unknown>\n): Record<string, unknown> {\n return L.Util.extend(params, options.reverseQueryParams);\n}\n","import * as L from 'leaflet';\n/**\n * @internal\n */\nlet lastCallbackId = 0;\n\n// Adapted from handlebars.js\n// https://github.com/wycats/handlebars.js/\n/**\n * @internal\n */\nconst badChars = /[&<>\"'`]/g;\n/**\n * @internal\n */\nconst possible = /[&<>\"'`]/;\n/**\n * @internal\n */\nconst escape: Record<string, string> = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#x27;',\n '`': '&#x60;'\n};\n\n/**\n * @internal\n */\nfunction escapeChar(chr: string) {\n return escape[chr];\n}\n\n/**\n * @internal\n */\nexport function htmlEscape(string?: string): string {\n if (string == null) {\n return '';\n } else if (!string) {\n return string + '';\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = '' + string;\n\n if (!possible.test(string)) {\n return string;\n }\n return string.replace(badChars, escapeChar);\n}\n\n/**\n * @internal\n */\nexport function jsonp(\n url: string,\n params: Record<string, any>,\n callback: (message: any) => void,\n context: any,\n jsonpParam?: string\n) {\n const callbackId = '_l_geocoder_' + lastCallbackId++;\n params[jsonpParam || 'callback'] = callbackId;\n (window as any)[callbackId] = L.Util.bind(callback, context);\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url + getParamString(params);\n script.id = callbackId;\n document.getElementsByTagName('head')[0].appendChild(script);\n}\n\n/**\n * @internal\n */\nexport function getJSON(\n url: string,\n params: Record<string, unknown>,\n callback: (message: any) => void\n): void {\n const xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.readyState !== 4) {\n return;\n }\n let message;\n if (xmlHttp.status !== 200 && xmlHttp.status !== 304) {\n message = '';\n } else if (typeof xmlHttp.response === 'string') {\n // IE doesn't parse JSON responses even with responseType: 'json'.\n try {\n message = JSON.parse(xmlHttp.response);\n } catch (e) {\n // Not a JSON response\n message = xmlHttp.response;\n }\n } else {\n message = xmlHttp.response;\n }\n callback(message);\n };\n xmlHttp.open('GET', url + getParamString(params), true);\n xmlHttp.responseType = 'json';\n xmlHttp.setRequestHeader('Accept', 'application/json');\n xmlHttp.send(null);\n}\n\n/**\n * @internal\n */\nexport function template(str: string, data: Record<string, any>): string {\n return str.replace(/\\{ *([\\w_]+) *\\}/g, (str, key) => {\n let value = data[key];\n if (value === undefined) {\n value = '';\n } else if (typeof value === 'function') {\n value = value(data);\n }\n return htmlEscape(value);\n });\n}\n\n/**\n * @internal\n */\nexport function getParamString(\n obj: Record<string, unknown | unknown[]>,\n existingUrl?: string,\n uppercase?: boolean\n): string {\n const params = [];\n for (const i in obj) {\n const key = encodeURIComponent(uppercase ? i.toUpperCase() : i);\n const value = obj[i];\n if (!Array.isArray(value)) {\n params.push(key + '=' + encodeURIComponent(String(value)));\n } else {\n for (let j = 0; j < value.length; j++) {\n params.push(key + '=' + encodeURIComponent(value[j]));\n }\n }\n }\n return (!existingUrl || existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface ArcGisOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [ArcGIS geocoder](https://developers.arcgis.com/features/geocoding/)\n */\nexport class ArcGis implements IGeocoder {\n options: ArcGisOptions = {\n serviceUrl: 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer',\n apiKey: ''\n };\n\n constructor(options?: Partial<ArcGisOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n token: this.options.apiKey,\n SingleLine: query,\n outFields: 'Addr_Type',\n forStorage: false,\n maxLocations: 10,\n f: 'json'\n });\n\n getJSON(this.options.serviceUrl + '/findAddressCandidates', params, data => {\n const results: GeocodingResult[] = [];\n if (data.candidates && data.candidates.length) {\n for (let i = 0; i <= data.candidates.length - 1; i++) {\n const loc = data.candidates[i];\n const latLng = L.latLng(loc.location.y, loc.location.x);\n const latLngBounds = L.latLngBounds(\n L.latLng(loc.extent.ymax, loc.extent.xmax),\n L.latLng(loc.extent.ymin, loc.extent.xmin)\n );\n results[i] = {\n name: loc.address,\n bbox: latLngBounds,\n center: latLng\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n location: location.lng + ',' + location.lat,\n distance: 100,\n f: 'json'\n });\n getJSON(this.options.serviceUrl + '/reverseGeocode', params, data => {\n const result: GeocodingResult[] = [];\n if (data && !data.error) {\n const center = L.latLng(data.location.y, data.location.x);\n const bbox = L.latLngBounds(center, center);\n result.push({\n name: data.address.Match_addr,\n center: center,\n bbox: bbox\n });\n }\n\n cb.call(context, result);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link ArcGis}\n * @param options the options\n */\nexport function arcgis(options?: Partial<ArcGisOptions>) {\n return new ArcGis(options);\n}\n","import * as L from 'leaflet';\nimport { jsonp } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface BingOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [Bing Locations API](https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/)\n */\nexport class Bing implements IGeocoder {\n options: BingOptions = {\n serviceUrl: 'https://dev.virtualearth.net/REST/v1/Locations'\n };\n\n constructor(options?: Partial<BingOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n query: query,\n key: this.options.apiKey\n });\n jsonp(\n this.options.apiKey,\n params,\n data => {\n const results: GeocodingResult[] = [];\n if (data.resourceSets.length > 0) {\n for (let i = data.resourceSets[0].resources.length - 1; i >= 0; i--) {\n const resource = data.resourceSets[0].resources[i],\n bbox = resource.bbox;\n results[i] = {\n name: resource.name,\n bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]),\n center: L.latLng(resource.point.coordinates)\n };\n }\n }\n cb.call(context, results);\n },\n this,\n 'jsonp'\n );\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey\n });\n jsonp(\n this.options.serviceUrl + location.lat + ',' + location.lng,\n params,\n data => {\n const results: GeocodingResult[] = [];\n for (let i = data.resourceSets[0].resources.length - 1; i >= 0; i--) {\n const resource = data.resourceSets[0].resources[i],\n bbox = resource.bbox;\n results[i] = {\n name: resource.name,\n bbox: L.latLngBounds([bbox[0], bbox[1]], [bbox[2], bbox[3]]),\n center: L.latLng(resource.point.coordinates)\n };\n }\n cb.call(context, results);\n },\n this,\n 'jsonp'\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Bing}\n * @param options the options\n */\nexport function bing(options?: Partial<BingOptions>) {\n return new Bing(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\n/**\n * Implementation of the [Google Geocoding API](https://developers.google.com/maps/documentation/geocoding/)\n */\nexport interface GoogleOptions extends GeocoderOptions {}\n\nexport class Google implements IGeocoder {\n options: GoogleOptions = {\n serviceUrl: 'https://maps.googleapis.com/maps/api/geocode/json'\n };\n\n constructor(options?: Partial<GoogleOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n key: this.options.apiKey,\n address: query\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i <= data.results.length - 1; i++) {\n const loc = data.results[i];\n const latLng = L.latLng(loc.geometry.location);\n const latLngBounds = L.latLngBounds(\n L.latLng(loc.geometry.viewport.northeast),\n L.latLng(loc.geometry.viewport.southwest)\n );\n results[i] = {\n name: loc.formatted_address,\n bbox: latLngBounds,\n center: latLng,\n properties: loc.address_components\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey,\n latlng: location.lat + ',' + location.lng\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i <= data.results.length - 1; i++) {\n const loc = data.results[i];\n const center = L.latLng(loc.geometry.location);\n const bbox = L.latLngBounds(\n L.latLng(loc.geometry.viewport.northeast),\n L.latLng(loc.geometry.viewport.southwest)\n );\n results[i] = {\n name: loc.formatted_address,\n bbox: bbox,\n center: center,\n properties: loc.address_components\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Google}\n * @param options the options\n */\nexport function google(options?: Partial<GoogleOptions>) {\n return new Google(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface HereOptions extends GeocoderOptions {\n /**\n * Use `apiKey` and the new `HEREv2` geocoder\n * @deprecated\n */\n app_id: string;\n /**\n * Use `apiKey` and the new `HEREv2` geocoder\n * @deprecated\n */\n app_code: string;\n reverseGeocodeProxRadius?: any;\n apiKey: string;\n maxResults: number;\n}\n\n/**\n * Implementation of the [HERE Geocoder API](https://developer.here.com/documentation/geocoder/topics/introduction.html)\n */\nexport class HERE implements IGeocoder {\n options: HereOptions = {\n serviceUrl: 'https://geocoder.api.here.com/6.2/',\n app_id: '',\n app_code: '',\n apiKey: '',\n maxResults: 5\n };\n\n constructor(options?: Partial<HereOptions>) {\n L.Util.setOptions(this, options);\n if (options.apiKey) throw Error('apiKey is not supported, use app_id/app_code instead!');\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n searchtext: query,\n gen: 9,\n app_id: this.options.app_id,\n app_code: this.options.app_code,\n jsonattributes: 1,\n maxresults: this.options.maxResults\n });\n this.getJSON(this.options.serviceUrl + 'geocode.json', params, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n let prox = location.lat + ',' + location.lng;\n if (this.options.reverseGeocodeProxRadius) {\n prox += ',' + this.options.reverseGeocodeProxRadius;\n }\n const params = reverseParams(this.options, {\n prox,\n mode: 'retrieveAddresses',\n app_id: this.options.app_id,\n app_code: this.options.app_code,\n gen: 9,\n jsonattributes: 1,\n maxresults: this.options.maxResults\n });\n this.getJSON(this.options.serviceUrl + 'reversegeocode.json', params, cb, context);\n }\n\n getJSON(url: string, params: any, cb: GeocodingCallback, context?: any) {\n getJSON(url, params, data => {\n const results: GeocodingResult[] = [];\n\n if (data.response.view && data.response.view.length) {\n for (let i = 0; i <= data.response.view[0].result.length - 1; i++) {\n const loc = data.response.view[0].result[i].location;\n const center = L.latLng(loc.displayPosition.latitude, loc.displayPosition.longitude);\n const bbox = L.latLngBounds(\n L.latLng(loc.mapView.topLeft.latitude, loc.mapView.topLeft.longitude),\n L.latLng(loc.mapView.bottomRight.latitude, loc.mapView.bottomRight.longitude)\n );\n results[i] = {\n name: loc.address.label,\n properties: loc.address,\n bbox: bbox,\n center: center\n };\n }\n }\n cb.call(context, results);\n });\n }\n}\n\n/**\n * Implementation of the new [HERE Geocoder API](https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html)\n */\nexport class HEREv2 implements IGeocoder {\n options: HereOptions = {\n serviceUrl: 'https://geocode.search.hereapi.com/v1',\n apiKey: '',\n app_id: '',\n app_code: '',\n maxResults: 10\n };\n\n constructor(options?: Partial<HereOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n q: query,\n apiKey: this.options.apiKey,\n limit: this.options.maxResults\n });\n\n if (!params.at && !params.in) {\n throw Error(\n 'at / in parameters not found. Please define coordinates (at=latitude,longitude) or other (in) in your geocodingQueryParams.'\n );\n }\n\n this.getJSON(this.options.serviceUrl + '/discover', params, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n at: location.lat + ',' + location.lng,\n limit: this.options.reverseGeocodeProxRadius,\n apiKey: this.options.apiKey\n });\n this.getJSON(this.options.serviceUrl + '/revgeocode', params, cb, context);\n }\n\n getJSON(url: string, params: any, cb: GeocodingCallback, context?: any) {\n getJSON(url, params, data => {\n const results: GeocodingResult[] = [];\n\n if (data.items && data.items.length) {\n for (let i = 0; i <= data.items.length - 1; i++) {\n const item = data.items[i];\n const latLng = L.latLng(item.position.lat, item.position.lng);\n let bbox: L.LatLngBounds;\n if (item.mapView) {\n bbox = L.latLngBounds(\n L.latLng(item.mapView.south, item.mapView.west),\n L.latLng(item.mapView.north, item.mapView.east)\n );\n } else {\n // Using only position when not provided\n bbox = L.latLngBounds(\n L.latLng(item.position.lat, item.position.lng),\n L.latLng(item.position.lat, item.position.lng)\n );\n }\n results[i] = {\n name: item.address.label,\n properties: item.address,\n bbox: bbox,\n center: latLng\n };\n }\n }\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link HERE}\n * @param options the options\n */\nexport function here(options?: Partial<HereOptions>) {\n if (options.apiKey) {\n return new HEREv2(options);\n } else {\n return new HERE(options);\n }\n}\n","import * as L from 'leaflet';\nimport { IGeocoder, GeocodingCallback, GeocodingResult } from './api';\n\nexport interface LatLngOptions {\n /**\n * The next geocoder to use for non-supported queries\n */\n next?: IGeocoder;\n /**\n * The size in meters used for passing to `LatLng.toBounds`\n */\n sizeInMeters: number;\n}\n\n/**\n * Parses basic latitude/longitude strings such as `'50.06773 14.37742'`, `'N50.06773 W14.37742'`, `'S 50° 04.064 E 014° 22.645'`, or `'S 50° 4′ 03.828″, W 14° 22′ 38.712″'`\n * @param query the latitude/longitude string to parse\n * @returns the parsed latitude/longitude\n */\nexport function parseLatLng(query: string): L.LatLng | undefined {\n let match;\n // regex from https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/geocoder_controller.rb\n if ((match = query.match(/^([NS])\\s*(\\d{1,3}(?:\\.\\d*)?)\\W*([EW])\\s*(\\d{1,3}(?:\\.\\d*)?)$/))) {\n // [NSEW] decimal degrees\n return L.latLng(\n (/N/i.test(match[1]) ? 1 : -1) * +match[2],\n (/E/i.test(match[3]) ? 1 : -1) * +match[4]\n );\n } else if (\n (match = query.match(/^(\\d{1,3}(?:\\.\\d*)?)\\s*([NS])\\W*(\\d{1,3}(?:\\.\\d*)?)\\s*([EW])$/))\n ) {\n // decimal degrees [NSEW]\n return L.latLng(\n (/N/i.test(match[2]) ? 1 : -1) * +match[1],\n (/E/i.test(match[4]) ? 1 : -1) * +match[3]\n );\n } else if (\n (match = query.match(\n /^([NS])\\s*(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?\\W*([EW])\\s*(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?$/\n ))\n ) {\n // [NSEW] degrees, decimal minutes\n return L.latLng(\n (/N/i.test(match[1]) ? 1 : -1) * (+match[2] + +match[3] / 60),\n (/E/i.test(match[4]) ? 1 : -1) * (+match[5] + +match[6] / 60)\n );\n } else if (\n (match = query.match(\n /^(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?\\s*([NS])\\W*(\\d{1,3})°?\\s*(\\d{1,3}(?:\\.\\d*)?)?['′]?\\s*([EW])$/\n ))\n ) {\n // degrees, decimal minutes [NSEW]\n return L.latLng(\n (/N/i.test(match[3]) ? 1 : -1) * (+match[1] + +match[2] / 60),\n (/E/i.test(match[6]) ? 1 : -1) * (+match[4] + +match[5] / 60)\n );\n } else if (\n (match = query.match(\n /^([NS])\\s*(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]?\\W*([EW])\\s*(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]?$/\n ))\n ) {\n // [NSEW] degrees, minutes, decimal seconds\n return L.latLng(\n (/N/i.test(match[1]) ? 1 : -1) * (+match[2] + +match[3] / 60 + +match[4] / 3600),\n (/E/i.test(match[5]) ? 1 : -1) * (+match[6] + +match[7] / 60 + +match[8] / 3600)\n );\n } else if (\n (match = query.match(\n /^(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]\\s*([NS])\\W*(\\d{1,3})°?\\s*(\\d{1,2})['′]?\\s*(\\d{1,3}(?:\\.\\d*)?)?[\"″]?\\s*([EW])$/\n ))\n ) {\n // degrees, minutes, decimal seconds [NSEW]\n return L.latLng(\n (/N/i.test(match[4]) ? 1 : -1) * (+match[1] + +match[2] / 60 + +match[3] / 3600),\n (/E/i.test(match[8]) ? 1 : -1) * (+match[5] + +match[6] / 60 + +match[7] / 3600)\n );\n } else if ((match = query.match(/^\\s*([+-]?\\d+(?:\\.\\d*)?)\\s*[\\s,]\\s*([+-]?\\d+(?:\\.\\d*)?)\\s*$/))) {\n return L.latLng(+match[1], +match[2]);\n }\n}\n\n/**\n * Parses basic latitude/longitude strings such as `'50.06773 14.37742'`, `'N50.06773 W14.37742'`, `'S 50° 04.064 E 014° 22.645'`, or `'S 50° 4′ 03.828″, W 14° 22′ 38.712″'`\n */\nexport class LatLng implements IGeocoder {\n options: LatLngOptions = {\n next: undefined,\n sizeInMeters: 10000\n };\n\n constructor(options?: Partial<LatLngOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any) {\n const center = parseLatLng(query);\n if (center) {\n const results: GeocodingResult[] = [\n {\n name: query,\n center: center,\n bbox: center.toBounds(this.options.sizeInMeters)\n }\n ];\n cb.call(context, results);\n } else if (this.options.next) {\n this.options.next.geocode(query, cb, context);\n }\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link LatLng}\n * @param options the options\n */\nexport function latLng(options?: Partial<LatLngOptions>) {\n return new LatLng(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface MapboxOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [Mapbox Geocoding](https://www.mapbox.com/api-documentation/#geocoding)\n */\nexport class Mapbox implements IGeocoder {\n options: MapboxOptions = {\n serviceUrl: 'https://api.mapbox.com/geocoding/v5/mapbox.places/'\n };\n\n constructor(options?: Partial<MapboxOptions>) {\n L.Util.setOptions(this, options);\n }\n\n _getProperties(loc) {\n const properties = {\n text: loc.text,\n address: loc.address\n };\n\n for (let j = 0; j < (loc.context || []).length; j++) {\n const id = loc.context[j].id.split('.')[0];\n properties[id] = loc.context[j].text;\n\n // Get country code when available\n if (loc.context[j].short_code) {\n properties['countryShortCode'] = loc.context[j].short_code;\n }\n }\n return properties;\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params: any = geocodingParams(this.options, {\n access_token: this.options.apiKey\n });\n if (\n params.proximity !== undefined &&\n params.proximity.lat !== undefined &&\n params.proximity.lng !== undefined\n ) {\n params.proximity = params.proximity.lng + ',' + params.proximity.lat;\n }\n getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', params, data => {\n const results: GeocodingResult[] = [];\n if (data.features && data.features.length) {\n for (let i = 0; i <= data.features.length - 1; i++) {\n const loc = data.features[i];\n const center = L.latLng(loc.center.reverse());\n let bbox: L.LatLngBounds;\n if (loc.bbox) {\n bbox = L.latLngBounds(\n L.latLng(loc.bbox.slice(0, 2).reverse()),\n L.latLng(loc.bbox.slice(2, 4).reverse())\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n\n results[i] = {\n name: loc.place_name,\n bbox: bbox,\n center: center,\n properties: this._getProperties(loc)\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const url = this.options.serviceUrl + location.lng + ',' + location.lat + '.json';\n const param = reverseParams(this.options, {\n access_token: this.options.apiKey\n });\n getJSON(url, param, data => {\n const results: GeocodingResult[] = [];\n if (data.features && data.features.length) {\n for (let i = 0; i <= data.features.length - 1; i++) {\n const loc = data.features[i];\n const center = L.latLng(loc.center.reverse());\n let bbox: L.LatLngBounds;\n if (loc.bbox) {\n bbox = L.latLngBounds(\n L.latLng(loc.bbox.slice(0, 2).reverse()),\n L.latLng(loc.bbox.slice(2, 4).reverse())\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n results[i] = {\n name: loc.place_name,\n bbox: bbox,\n center: center,\n properties: this._getProperties(loc)\n };\n }\n }\n\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Mapbox}\n * @param options the options\n */\nexport function mapbox(options?: Partial<MapboxOptions>) {\n return new Mapbox(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface MapQuestOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [MapQuest Geocoding API](http://developer.mapquest.com/web/products/dev-services/geocoding-ws)\n */\nexport class MapQuest implements IGeocoder {\n options: MapQuestOptions = {\n serviceUrl: 'https://www.mapquestapi.com/geocoding/v1'\n };\n\n constructor(options?: Partial<MapQuestOptions>) {\n L.Util.setOptions(this, options);\n // MapQuest seems to provide URI encoded API keys,\n // so to avoid encoding them twice, we decode them here\n this.options.apiKey = decodeURIComponent(this.options.apiKey);\n }\n\n _formatName(...parts: string[]) {\n return parts.filter(s => !!s).join(', ');\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n key: this.options.apiKey,\n location: query,\n limit: 5,\n outFormat: 'json'\n });\n getJSON(\n this.options.serviceUrl + '/address',\n params,\n L.Util.bind(function(data) {\n const results: GeocodingResult[] = [];\n if (data.results && data.results[0].locations) {\n for (let i = data.results[0].locations.length - 1; i >= 0; i--) {\n const loc = data.results[0].locations[i];\n const center = L.latLng(loc.latLng);\n results[i] = {\n name: this._formatName(loc.street, loc.adminArea4, loc.adminArea3, loc.adminArea1),\n bbox: L.latLngBounds(center, center),\n center: center\n };\n }\n }\n\n cb.call(context, results);\n }, this)\n );\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey,\n location: location.lat + ',' + location.lng,\n outputFormat: 'json'\n });\n getJSON(\n this.options.serviceUrl + '/reverse',\n params,\n L.Util.bind(function(data) {\n const results: GeocodingResult[] = [];\n if (data.results && data.results[0].locations) {\n for (let i = data.results[0].locations.length - 1; i >= 0; i--) {\n const loc = data.results[0].locations[i];\n const center = L.latLng(loc.latLng);\n results[i] = {\n name: this._formatName(loc.street, loc.adminArea4, loc.adminArea3, loc.adminArea1),\n bbox: L.latLngBounds(center, center),\n center: center\n };\n }\n }\n\n cb.call(context, results);\n }, this)\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link MapQuest}\n * @param options the options\n */\nexport function mapQuest(options?: Partial<MapQuestOptions>) {\n return new MapQuest(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface NeutrinoOptions extends GeocoderOptions {\n userId: string;\n}\n\n/**\n * Implementation of the [Neutrino API](https://www.neutrinoapi.com/api/geocode-address/)\n */\nexport class Neutrino implements IGeocoder {\n options: NeutrinoOptions = {\n userId: undefined,\n apiKey: undefined,\n serviceUrl: 'https://neutrinoapi.com/'\n };\n\n constructor(options?: Partial<NeutrinoOptions>) {\n L.Util.setOptions(this, options);\n }\n\n // https://www.neutrinoapi.com/api/geocode-address/\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n apiKey: this.options.apiKey,\n userId: this.options.userId,\n //get three words and make a dot based string\n address: query.split(/\\s+/).join('.')\n });\n getJSON(this.options.serviceUrl + 'geocode-address', params, data => {\n const results: GeocodingResult[] = [];\n if (data.locations) {\n data.geometry = data.locations[0];\n const center = L.latLng(data.geometry['latitude'], data.geometry['longitude']);\n const bbox = L.latLngBounds(center, center);\n results[0] = {\n name: data.geometry.address,\n bbox: bbox,\n center: center\n };\n }\n\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n // https://www.neutrinoapi.com/api/geocode-reverse/\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n apiKey: this.options.apiKey,\n userId: this.options.userId,\n latitude: location.lat,\n longitude: location.lng\n });\n getJSON(this.options.serviceUrl + 'geocode-reverse', params, data => {\n const results: GeocodingResult[] = [];\n if (data.status.status == 200 && data.found) {\n const center = L.latLng(location.lat, location.lng);\n const bbox = L.latLngBounds(center, center);\n results[0] = {\n name: data.address,\n bbox: bbox,\n center: center\n };\n }\n cb.call(context, results);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Neutrino}\n * @param options the options\n */\nexport function neutrino(options?: Partial<NeutrinoOptions>) {\n return new Neutrino(options);\n}\n","import * as L from 'leaflet';\nimport { template, getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface NominatimResult {\n place_id: number;\n licence: string;\n osm_type: string;\n osm_id: number;\n boundingbox: string[];\n lat: string;\n lon: string;\n display_name: string;\n class: string;\n type: string;\n importance: number;\n icon?: string;\n address: NominatimAddress;\n}\n\nexport interface NominatimAddress {\n building?: string;\n city_district?: string;\n city?: string;\n country_code?: string;\n country?: string;\n county?: string;\n hamlet?: string;\n house_number?: string;\n neighbourhood?: string;\n postcode?: string;\n road?: string;\n state_district?: string;\n state?: string;\n suburb?: string;\n village?: string;\n}\n\nexport interface NominatimOptions extends GeocoderOptions {\n /**\n * Additional URL parameters (strings) that will be added to geocoding requests; can be used to restrict results to a specific country for example, by providing the [`countrycodes`](https://wiki.openstreetmap.org/wiki/Nominatim#Parameters) parameter to Nominatim\n */\n geocodingQueryParams?: Record<string, unknown>;\n /**\n * A function that takes an GeocodingResult as argument and returns an HTML formatted string that represents the result. Default function breaks up address in parts from most to least specific, in attempt to increase readability compared to Nominatim's naming\n */\n htmlTemplate: (r: NominatimResult) => string;\n}\n\n/**\n * Implementation of the [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim) geocoder.\n *\n * This is the default geocoding service used by the control, unless otherwise specified in the options.\n *\n * Unless using your own Nominatim installation, please refer to the [Nominatim usage policy](https://operations.osmfoundation.org/policies/nominatim/).\n */\nexport class Nominatim implements IGeocoder {\n options: NominatimOptions = {\n serviceUrl: 'https://nominatim.openstreetmap.org/',\n htmlTemplate: function(r: NominatimResult) {\n const address = r.address;\n let className: string;\n const parts = [];\n if (address.road || address.building) {\n parts.push('{building} {road} {house_number}');\n }\n\n if (address.city || (address as any).town || address.village || address.hamlet) {\n className = parts.length > 0 ? 'leaflet-control-geocoder-address-detail' : '';\n parts.push(\n '<span class=\"' + className + '\">{postcode} {city} {town} {village} {hamlet}</span>'\n );\n }\n\n if (address.state || address.country) {\n className = parts.length > 0 ? 'leaflet-control-geocoder-address-context' : '';\n parts.push('<span class=\"' + className + '\">{state} {country}</span>');\n }\n\n return template(parts.join('<br/>'), address);\n }\n };\n\n constructor(options?: Partial<NominatimOptions>) {\n L.Util.setOptions(this, options || {});\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any) {\n const params = geocodingParams(this.options, {\n q: query,\n limit: 5,\n format: 'json',\n addressdetails: 1\n });\n getJSON(this.options.serviceUrl + 'search', params, data => {\n const results: GeocodingResult[] = [];\n for (let i = data.length - 1; i >= 0; i--) {\n const bbox = data[i].boundingbox;\n for (let j = 0; j < 4; j++) bbox[j] = +bbox[j];\n results[i] = {\n icon: data[i].icon,\n name: data[i].display_name,\n html: this.options.htmlTemplate ? this.options.htmlTemplate(data[i]) : undefined,\n bbox: L.latLngBounds([bbox[0], bbox[2]], [bbox[1], bbox[3]]),\n center: L.latLng(data[i].lat, data[i].lon),\n properties: data[i]\n };\n }\n cb.call(context, results);\n });\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any) {\n const params = reverseParams(this.options, {\n lat: location.lat,\n lon: location.lng,\n zoom: Math.round(Math.log(scale / 256) / Math.log(2)),\n addressdetails: 1,\n format: 'json'\n });\n getJSON(this.options.serviceUrl + 'reverse', params, data => {\n const result: GeocodingResult[] = [];\n if (data && data.lat && data.lon) {\n const center = L.latLng(data.lat, data.lon);\n const bbox = L.latLngBounds(center, center);\n result.push({\n name: data.display_name,\n html: this.options.htmlTemplate ? this.options.htmlTemplate(data) : undefined,\n center: center,\n bbox: bbox,\n properties: data\n });\n }\n cb.call(context, result);\n });\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Nominatim}\n * @param options the options\n */\nexport function nominatim(options?: Partial<NominatimOptions>) {\n return new Nominatim(options);\n}\n","import * as L from 'leaflet';\nimport { IGeocoder, GeocodingCallback, GeocodingResult } from './api';\n\nexport interface OpenLocationCodeOptions {\n OpenLocationCode: OpenLocationCodeApi;\n codeLength?: number;\n}\n\nexport interface OpenLocationCodeApi {\n encode(latitude: number, longitude: number, codeLength?: number): string;\n decode(code: string): CodeArea;\n}\n\nexport interface CodeArea {\n latitudeLo: number;\n longitudeLo: number;\n latitudeHi: number;\n longitudeHi: number;\n latitudeCenter: number;\n longitudeCenter: number;\n codeLength: number;\n}\n\n/**\n * Implementation of the [Plus codes](https://plus.codes/) (formerly OpenLocationCode) (requires [open-location-code](https://www.npmjs.com/package/open-location-code))\n */\nexport class OpenLocationCode implements IGeocoder {\n options: OpenLocationCodeOptions;\n constructor(options?: Partial<OpenLocationCodeOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any) {\n try {\n const decoded = this.options.OpenLocationCode.decode(query);\n const result: GeocodingResult = {\n name: query,\n center: L.latLng(decoded.latitudeCenter, decoded.longitudeCenter),\n bbox: L.latLngBounds(\n L.latLng(decoded.latitudeLo, decoded.longitudeLo),\n L.latLng(decoded.latitudeHi, decoded.longitudeHi)\n )\n };\n cb.call(context, [result]);\n } catch (e) {\n console.warn(e); // eslint-disable-line no-console\n cb.call(context, []);\n }\n }\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any) {\n try {\n const code = this.options.OpenLocationCode.encode(\n location.lat,\n location.lng,\n this.options.codeLength\n );\n const result = {\n name: code,\n center: L.latLng(location.lat, location.lng),\n bbox: L.latLngBounds(\n L.latLng(location.lat, location.lng),\n L.latLng(location.lat, location.lng)\n )\n };\n cb.call(context, [result]);\n } catch (e) {\n console.warn(e); // eslint-disable-line no-console\n cb.call(context, []);\n }\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link OpenLocationCode}\n * @param options the options\n */\nexport function openLocationCode(options?: Partial<OpenLocationCodeOptions>) {\n return new OpenLocationCode(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface OpenCageOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [OpenCage Data API](https://opencagedata.com/)\n */\nexport class OpenCage implements IGeocoder {\n options: OpenCageOptions = {\n serviceUrl: 'https://api.opencagedata.com/geocode/v1/json'\n };\n\n constructor(options?: Partial<OpenCageOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n key: this.options.apiKey,\n q: query\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i < data.results.length; i++) {\n const loc = data.results[i];\n const center = L.latLng(loc.geometry);\n let bbox: L.LatLngBounds;\n if (loc.annotations && loc.annotations.bounds) {\n bbox = L.latLngBounds(\n L.latLng(loc.annotations.bounds.northeast),\n L.latLng(loc.annotations.bounds.southwest)\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n results.push({\n name: loc.formatted,\n bbox: bbox,\n center: center\n });\n }\n }\n cb.call(context, results);\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n key: this.options.apiKey,\n q: [location.lat, location.lng].join(',')\n });\n getJSON(this.options.serviceUrl, params, data => {\n const results: GeocodingResult[] = [];\n if (data.results && data.results.length) {\n for (let i = 0; i < data.results.length; i++) {\n const loc = data.results[i];\n const center = L.latLng(loc.geometry);\n let bbox: L.LatLngBounds;\n if (loc.annotations && loc.annotations.bounds) {\n bbox = L.latLngBounds(\n L.latLng(loc.annotations.bounds.northeast),\n L.latLng(loc.annotations.bounds.southwest)\n );\n } else {\n bbox = L.latLngBounds(center, center);\n }\n results.push({\n name: loc.formatted,\n bbox: bbox,\n center: center\n });\n }\n }\n cb.call(context, results);\n });\n }\n}\n\nexport function opencage(options?: Partial<OpenCageOptions>) {\n return new OpenCage(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface PeliasOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the [Pelias](https://pelias.io/), [geocode.earth](https://geocode.earth/) geocoder (formerly Mapzen Search)\n */\nexport class Pelias implements IGeocoder {\n options: PeliasOptions = {\n serviceUrl: 'https://api.geocode.earth/v1'\n };\n\n private _lastSuggest = 0;\n\n constructor(options?: Partial<PeliasOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n api_key: this.options.apiKey,\n text: query\n });\n getJSON(this.options.serviceUrl + '/search', params, data => {\n cb.call(context, this._parseResults(data, 'bbox'));\n });\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, {\n api_key: this.options.apiKey,\n text: query\n });\n getJSON(this.options.serviceUrl + '/autocomplete', params, data => {\n if (data.geocoding.timestamp > this._lastSuggest) {\n this._lastSuggest = data.geocoding.timestamp;\n cb.call(context, this._parseResults(data, 'bbox'));\n }\n });\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n api_key: this.options.apiKey,\n 'point.lat': location.lat,\n 'point.lon': location.lng\n });\n getJSON(this.options.serviceUrl + '/reverse', params, data => {\n cb.call(context, this._parseResults(data, 'bounds'));\n });\n }\n\n _parseResults(data, bboxname) {\n const results: GeocodingResult[] = [];\n L.geoJSON(data, {\n pointToLayer: function(feature, latlng) {\n return L.circleMarker(latlng);\n },\n onEachFeature: function(feature, layer: any) {\n const result = {} as GeocodingResult;\n let bbox;\n let center;\n\n if (layer.getBounds) {\n bbox = layer.getBounds();\n center = bbox.getCenter();\n } else if (layer.feature.bbox) {\n center = layer.getLatLng();\n bbox = L.latLngBounds(\n L.GeoJSON.coordsToLatLng(layer.feature.bbox.slice(0, 2)),\n L.GeoJSON.coordsToLatLng(layer.feature.bbox.slice(2, 4))\n );\n } else {\n center = layer.getLatLng();\n bbox = L.latLngBounds(center, center);\n }\n\n result.name = layer.feature.properties.label;\n result.center = center;\n result[bboxname] = bbox;\n result.properties = layer.feature.properties;\n results.push(result);\n }\n });\n return results;\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Pelias}\n * @param options the options\n */\nexport function pelias(options?: Partial<PeliasOptions>) {\n return new Pelias(options);\n}\n\nexport const GeocodeEarth = Pelias;\nexport const geocodeEarth = pelias;\n\n/**\n * r.i.p.\n * @deprecated\n */\nexport const Mapzen = Pelias;\n/**\n * r.i.p.\n * @deprecated\n */\nexport const mapzen = pelias;\n\n/**\n * Implementation of the [Openrouteservice](https://openrouteservice.org/dev/#/api-docs/geocode) geocoder\n */\nexport class Openrouteservice extends Pelias {\n constructor(options?: Partial<PeliasOptions>) {\n super(\n L.Util.extend(\n {\n serviceUrl: 'https://api.openrouteservice.org/geocode'\n },\n options\n )\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Openrouteservice}\n * @param options the options\n */\nexport function openrouteservice(options?: Partial<PeliasOptions>) {\n return new Openrouteservice(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface PhotonOptions extends GeocoderOptions {\n reverseUrl: string;\n nameProperties: string[];\n htmlTemplate?: (r: any) => string;\n}\n\n/**\n * Implementation of the [Photon](http://photon.komoot.de/) geocoder\n */\nexport class Photon implements IGeocoder {\n options: PhotonOptions = {\n serviceUrl: 'https://photon.komoot.io/api/',\n reverseUrl: 'https://photon.komoot.io/reverse/',\n nameProperties: ['name', 'street', 'suburb', 'hamlet', 'town', 'city', 'state', 'country']\n };\n\n constructor(options?: Partial<PhotonOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n const params = geocodingParams(this.options, { q: query });\n getJSON(\n this.options.serviceUrl,\n params,\n L.Util.bind(function(data) {\n cb.call(context, this._decodeFeatures(data));\n }, this)\n );\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(latLng: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n const params = reverseParams(this.options, {\n lat: latLng.lat,\n lon: latLng.lng\n });\n getJSON(\n this.options.reverseUrl,\n params,\n L.Util.bind(function(data) {\n cb.call(context, this._decodeFeatures(data));\n }, this)\n );\n }\n\n _decodeFeatures(data: GeoJSON.FeatureCollection<GeoJSON.Point>) {\n const results: GeocodingResult[] = [];\n\n if (data && data.features) {\n for (let i = 0; i < data.features.length; i++) {\n const f = data.features[i];\n const c = f.geometry.coordinates;\n const center = L.latLng(c[1], c[0]);\n const extent = f.properties.extent;\n\n const bbox = extent\n ? L.latLngBounds([extent[1], extent[0]], [extent[3], extent[2]])\n : L.latLngBounds(center, center);\n\n results.push({\n name: this._decodeFeatureName(f),\n html: this.options.htmlTemplate ? this.options.htmlTemplate(f) : undefined,\n center: center,\n bbox: bbox,\n properties: f.properties\n });\n }\n }\n\n return results;\n }\n\n _decodeFeatureName(f: GeoJSON.Feature) {\n return (this.options.nameProperties || [])\n .map(p => {\n return f.properties[p];\n })\n .filter(v => {\n return !!v;\n })\n .join(', ');\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link Photon}\n * @param options the options\n */\nexport function photon(options?: Partial<PhotonOptions>) {\n return new Photon(options);\n}\n","import * as L from 'leaflet';\nimport { getJSON } from '../util';\nimport {\n IGeocoder,\n GeocoderOptions,\n GeocodingCallback,\n geocodingParams,\n GeocodingResult,\n reverseParams\n} from './api';\n\nexport interface What3WordsOptions extends GeocoderOptions {}\n\n/**\n * Implementation of the What3Words service\n */\nexport class What3Words implements IGeocoder {\n options: What3WordsOptions = {\n serviceUrl: 'https://api.what3words.com/v2/'\n };\n\n constructor(options: Partial<What3WordsOptions>) {\n L.Util.setOptions(this, options);\n }\n\n geocode(query: string, cb: GeocodingCallback, context?: any): void {\n //get three words and make a dot based string\n getJSON(\n this.options.serviceUrl + 'forward',\n geocodingParams(this.options, {\n key: this.options.apiKey,\n addr: query.split(/\\s+/).join('.')\n }),\n data => {\n const results: GeocodingResult[] = [];\n if (data.geometry) {\n const latLng = L.latLng(data.geometry['lat'], data.geometry['lng']);\n const latLngBounds = L.latLngBounds(latLng, latLng);\n results[0] = {\n name: data.words,\n bbox: latLngBounds,\n center: latLng\n };\n }\n\n cb.call(context, results);\n }\n );\n }\n\n suggest(query: string, cb: GeocodingCallback, context?: any): void {\n return this.geocode(query, cb, context);\n }\n\n reverse(location: L.LatLngLiteral, scale: number, cb: GeocodingCallback, context?: any): void {\n getJSON(\n this.options.serviceUrl + 'reverse',\n reverseParams(this.options, {\n key: this.options.apiKey,\n coords: [location.lat, location.lng].join(',')\n }),\n data => {\n const results: GeocodingResult[] = [];\n if (data.status.status == 200) {\n const center = L.latLng(data.geometry['lat'], data.geometry['lng']);\n const bbox = L.latLngBounds(center, center);\n results[0] = {\n name: data.words,\n bbox: bbox,\n center: center\n };\n }\n cb.call(context, results);\n }\n );\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link What3Words}\n * @param options the options\n */\nexport function what3words(options: Partial<What3WordsOptions>) {\n return new What3Words(options);\n}\n","import * as L from 'leaflet';\nimport { Nominatim } from './geocoders/index';\nimport { IGeocoder, GeocodingResult } from './geocoders/api';\n\nexport interface GeocoderControlOptions extends L.ControlOptions {\n /**\n * Collapse control unless hovered/clicked\n */\n collapsed: boolean;\n /**\n * How to expand a collapsed control: `touch` or `click` or `hover`\n */\n expand: 'touch' | 'click' | 'hover';\n /**\n * Placeholder text for text input\n */\n placeholder: string;\n /**\n * Message when no result found / geocoding error occurs\n */\n errorMessage: string;\n /**\n * Accessibility label for the search icon used by screen readers\n */\n iconLabel: string;\n /**\n * Object to perform the actual geocoding queries\n */\n geocoder?: IGeocoder;\n /**\n * Immediately show the unique result without prompting for alternatives\n */\n showUniqueResult: boolean;\n /**\n * Show icons for geocoding results (if available); supported by Nominatim\n */\n showResultIcons: boolean;\n /**\n * Minimum number characters before suggest functionality is used (if available from geocoder)\n */\n suggestMinLength: number;\n /**\n * Number of milliseconds after typing stopped before suggest functionality is used (if available from geocoder)\n */\n suggestTimeout: number;\n /**\n * Initial query string for text input\n */\n query: string;\n /**\n * Minimum number of characters in search text before performing a query\n */\n queryMinLength: number;\n /**\n * Whether to mark a geocoding result on the map by default\n */\n defaultMarkGeocode: boolean;\n}\n\n/**\n * Event is fired when selecting a geocode result.\n * By default, the control will center the map on it and place a marker at its location.\n * To remove the control's default handler for marking a result, set {@link GeocoderControlOptions.defaultMarkGeocode} to `false`.\n */\nexport type MarkGeocodeEvent = { geocode: GeocodingResult };\nexport type MarkGeocodeEventHandlerFn = (event: MarkGeocodeEvent) => void;\n\n/**\n * Event is fired before invoking {@link IGeocoder.geocode} (or {@link IGeocoder.suggest}).\n * The event data contains the query string as `input`.\n */\nexport type StartGeocodeEvent = { input: string };\nexport type StartGeocodeEventHandlerFn = (event: StartGeocodeEvent) => void;\n\n/**\n * Event is fired before after receiving results from {@link IGeocoder.geocode} (or {@link IGeocoder.suggest}).\n * The event data contains the query string as `input` and the geocoding `results`.\n */\nexport type FinishGeocodeEvent = { input: string; results: GeocodingResult[] };\nexport type FinishGeocodeEventHandlerFn = (event: FinishGeocodeEvent) => void;\n\ndeclare module 'leaflet' {\n interface Evented {\n on(type: 'markgeocode', fn: MarkGeocodeEventHandlerFn, context?: any): this;\n on(type: 'startgeocode', fn: StartGeocodeEventHandlerFn, context?: any): this;\n on(type: 'startsuggest', fn: StartGeocodeEventHandlerFn, context?: any): this;\n on(type: 'finishsuggest', fn: FinishGeocodeEventHandlerFn, context?: any): this;\n on(type: 'finishgeocode', fn: FinishGeocodeEventHandlerFn, context?: any): this;\n }\n}\n\n/**\n * Leaflet mixins https://leafletjs.com/reference-1.7.1.html#class-includes\n * for TypeScript https://www.typescriptlang.org/docs/handbook/mixins.html\n * @internal\n */\nclass EventedControl {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n constructor(...args: any[]) {\n // empty\n }\n}\n\n/**\n * @internal\n */\ninterface EventedControl extends L.Control, L.Evented {}\nL.Util.extend(EventedControl.prototype, L.Control.prototype);\nL.Util.extend(EventedControl.prototype, L.Evented.prototype);\n\n/**\n * This is the geocoder control. It works like any other [Leaflet control](https://leafletjs.com/reference.html#control), and is added to the map.\n */\nexport class GeocoderControl extends EventedControl {\n options: GeocoderControlOptions = {\n showUniqueResult: true,\n showResultIcons: false,\n collapsed: true,\n expand: 'touch',\n position: 'topright',\n placeholder: 'Search...',\n errorMessage: 'Nothing found.',\n iconLabel: 'Initiate a new search',\n query: '',\n queryMinLength: 1,\n suggestMinLength: 3,\n suggestTimeout: 250,\n defaultMarkGeocode: true\n };\n\n private _alts: HTMLUListElement;\n private _container: HTMLDivElement;\n private _errorElement: HTMLDivElement;\n private _form: HTMLDivElement;\n private _geocodeMarker: L.Marker;\n private _input: HTMLInputElement;\n private _lastGeocode: string;\n private _map: L.Map;\n private _preventBlurCollapse: boolean;\n private _requestCount = 0;\n private _results: any;\n private _selection: any;\n private _suggestTimeout: any;\n\n /**\n * Instantiates a geocoder control (to be invoked using `new`)\n * @param options the options\n */\n constructor(options?: Partial<GeocoderControlOptions>) {\n super(options);\n L.Util.setOptions(this, options);\n if (!this.options.geocoder) {\n this.options.geocoder = new Nominatim();\n }\n }\n\n addThrobberClass() {\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-throbber');\n }\n\n removeThrobberClass() {\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-throbber');\n }\n\n /**\n * Returns the container DOM element for the control and add listeners on relevant map events.\n * @param map the map instance\n * @see https://leafletjs.com/reference.html#control-onadd\n */\n onAdd(map: L.Map) {\n const className = 'leaflet-control-geocoder';\n const container = L.DomUtil.create('div', className + ' leaflet-bar') as HTMLDivElement;\n const icon = L.DomUtil.create('button', className + '-icon', container) as HTMLButtonElement;\n const form = (this._form = L.DomUtil.create(\n 'div',\n className + '-form',\n container\n ) as HTMLDivElement);\n\n this._map = map;\n this._container = container;\n\n icon.innerHTML = '&nbsp;';\n icon.type = 'button';\n icon.setAttribute('aria-label', this.options.iconLabel);\n\n const input = (this._input = L.DomUtil.create('input', '', form) as HTMLInputElement);\n input.type = 'text';\n input.value = this.options.query;\n input.placeholder = this.options.placeholder;\n L.DomEvent.disableClickPropagation(input);\n\n this._errorElement = L.DomUtil.create(\n 'div',\n className + '-form-no-error',\n container\n ) as HTMLDivElement;\n this._errorElement.innerHTML = this.options.errorMessage;\n\n this._alts = L.DomUtil.create(\n 'ul',\n className + '-alternatives leaflet-control-geocoder-alternatives-minimized',\n container\n ) as HTMLUListElement;\n L.DomEvent.disableClickPropagation(this._alts);\n\n L.DomEvent.addListener(input, 'keydown', this._keydown, this);\n if (this.options.geocoder.suggest) {\n L.DomEvent.addListener(input, 'input', this._change, this);\n }\n L.DomEvent.addListener(input, 'blur', () => {\n if (this.options.collapsed && !this._preventBlurCollapse) {\n this._collapse();\n }\n this._preventBlurCollapse = false;\n });\n\n if (this.options.collapsed) {\n if (this.options.expand === 'click') {\n L.DomEvent.addListener(container, 'click', (e: Event) => {\n if ((e as MouseEvent).button === 0 && (e as MouseEvent).detail !== 2) {\n this._toggle();\n }\n });\n } else if (this.options.expand === 'touch') {\n L.DomEvent.addListener(\n container,\n L.Browser.touch ? 'touchstart mousedown' : 'mousedown',\n (e: Event) => {\n this._toggle();\n e.preventDefault(); // mobile: clicking focuses the icon, so UI expands and immediately collapses\n e.stopPropagation();\n },\n this\n );\n } else {\n L.DomEvent.addListener(container, 'mouseover', this._expand, this);\n L.DomEvent.addListener(container, 'mouseout', this._collapse, this);\n this._map.on('movestart', this._collapse, this);\n }\n } else {\n this._expand();\n if (L.Browser.touch) {\n L.DomEvent.addListener(container, 'touchstart', () => this._geocode());\n } else {\n L.DomEvent.addListener(container, 'click', () => this._geocode());\n }\n }\n\n if (this.options.defaultMarkGeocode) {\n this.on('markgeocode', this.markGeocode, this);\n }\n\n this.on('startgeocode', this.addThrobberClass, this);\n this.on('finishgeocode', this.removeThrobberClass, this);\n this.on('startsuggest', this.addThrobberClass, this);\n this.on('finishsuggest', this.removeThrobberClass, this);\n\n L.DomEvent.disableClickPropagation(container);\n\n return container;\n }\n\n /**\n * Sets the query string on the text input\n * @param string the query string\n */\n setQuery(string: string): this {\n this._input.value = string;\n return this;\n }\n\n private _geocodeResult(results: GeocodingResult[], suggest: boolean) {\n if (!suggest && this.options.showUniqueResult && results.length === 1) {\n this._geocodeResultSelected(results[0]);\n } else if (results.length > 0) {\n this._alts.innerHTML = '';\n this._results = results;\n L.DomUtil.removeClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized');\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-options-open');\n for (let i = 0; i < results.length; i++) {\n this._alts.appendChild(this._createAlt(results[i], i));\n }\n } else {\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-options-error');\n L.DomUtil.addClass(this._errorElement, 'leaflet-control-geocoder-error');\n }\n }\n\n /**\n * Marks a geocoding result on the map\n * @param result the geocoding result\n */\n markGeocode(event: MarkGeocodeEvent) {\n const result = event.geocode;\n\n this._map.fitBounds(result.bbox);\n\n if (this._geocodeMarker) {\n this._map.removeLayer(this._geocodeMarker);\n }\n\n this._geocodeMarker = new L.Marker(result.center)\n .bindPopup(result.html || result.name)\n .addTo(this._map)\n .openPopup();\n\n return this;\n }\n\n private _geocode(suggest?: boolean) {\n const value = this._input.value;\n if (!suggest && value.length < this.options.queryMinLength) {\n return;\n }\n\n const requestCount = ++this._requestCount;\n const cb = (results: GeocodingResult[]) => {\n if (requestCount === this._requestCount) {\n const event: FinishGeocodeEvent = { input: value, results };\n this.fire(suggest ? 'finishsuggest' : 'finishgeocode', event);\n this._geocodeResult(results, suggest);\n }\n };\n\n this._lastGeocode = value;\n if (!suggest) {\n this._clearResults();\n }\n\n const event: StartGeocodeEvent = { input: value };\n this.fire(suggest ? 'startsuggest' : 'startgeocode', event);\n if (suggest) {\n this.options.geocoder.suggest(value, cb);\n } else {\n this.options.geocoder.geocode(value, cb);\n }\n }\n\n private _geocodeResultSelected(geocode: GeocodingResult) {\n const event: MarkGeocodeEvent = { geocode };\n this.fire('markgeocode', event);\n }\n\n private _toggle() {\n if (L.DomUtil.hasClass(this._container, 'leaflet-control-geocoder-expanded')) {\n this._collapse();\n } else {\n this._expand();\n }\n }\n\n private _expand() {\n L.DomUtil.addClass(this._container, 'leaflet-control-geocoder-expanded');\n this._input.select();\n this.fire('expand');\n }\n\n private _collapse() {\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-expanded');\n L.DomUtil.addClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized');\n L.DomUtil.removeClass(this._errorElement, 'leaflet-control-geocoder-error');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-open');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-error');\n this._input.blur(); // mobile: keyboard shouldn't stay expanded\n this.fire('collapse');\n }\n\n private _clearResults() {\n L.DomUtil.addClass(this._alts, 'leaflet-control-geocoder-alternatives-minimized');\n this._selection = null;\n L.DomUtil.removeClass(this._errorElement, 'leaflet-control-geocoder-error');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-open');\n L.DomUtil.removeClass(this._container, 'leaflet-control-geocoder-options-error');\n }\n\n private _createAlt(result: GeocodingResult, index: number) {\n const li = L.DomUtil.create('li', ''),\n a = L.DomUtil.create('a', '', li),\n icon =\n this.options.showResultIcons && result.icon\n ? (L.DomUtil.create('img', '', a) as HTMLImageElement)\n : null,\n text = result.html ? undefined : document.createTextNode(result.name),\n mouseDownHandler = (e: Event) => {\n // In some browsers, a click will fire on the map if the control is\n // collapsed directly after mousedown. To work around this, we\n // wait until the click is completed, and _then_ collapse the\n // control. Messy, but this is the workaround I could come up with\n // for #142.\n this._preventBlurCollapse = true;\n L.DomEvent.stop(e);\n this._geocodeResultSelected(result);\n L.DomEvent.on(li, 'click touchend', () => {\n if (this.options.collapsed) {\n this._collapse();\n } else {\n this._clearResults();\n }\n });\n };\n\n if (icon) {\n icon.src = result.icon;\n }\n\n li.setAttribute('data-result-index', String(index));\n\n if (result.html) {\n a.innerHTML = a.innerHTML + result.html;\n } else if (text) {\n a.appendChild(text);\n }\n\n // Use mousedown and not click, since click will fire _after_ blur,\n // causing the control to have collapsed and removed the items\n // before the click can fire.\n L.DomEvent.addListener(li, 'mousedown touchstart', mouseDownHandler, this);\n\n return li;\n }\n\n private _keydown(e: KeyboardEvent) {\n const select = (dir: number) => {\n if (this._selection) {\n L.DomUtil.removeClass(this._selection, 'leaflet-control-geocoder-selected');\n this._selection = this._selection[dir > 0 ? 'nextSibling' : 'previousSibling'];\n }\n if (!this._selection) {\n this._selection = this._alts[dir > 0 ? 'firstChild' : 'lastChild'];\n }\n\n if (this._selection) {\n L.DomUtil.addClass(this._selection, 'leaflet-control-geocoder-selected');\n }\n };\n\n switch (e.keyCode) {\n // Escape\n case 27:\n if (this.options.collapsed) {\n this._collapse();\n } else {\n this._clearResults();\n }\n break;\n // Up\n case 38:\n select(-1);\n break;\n // Up\n case 40:\n select(1);\n break;\n // Enter\n case 13:\n if (this._selection) {\n const index = parseInt(this._selection.getAttribute('data-result-index'), 10);\n this._geocodeResultSelected(this._results[index]);\n this._clearResults();\n } else {\n this._geocode();\n }\n break;\n default:\n return;\n }\n\n L.DomEvent.preventDefault(e);\n }\n\n private _change() {\n const v = this._input.value;\n if (v !== this._lastGeocode) {\n clearTimeout(this._suggestTimeout);\n if (v.length >= this.options.suggestMinLength) {\n this._suggestTimeout = setTimeout(() => this._geocode(true), this.options.suggestTimeout);\n } else {\n this._clearResults();\n }\n }\n }\n}\n\n/**\n * [Class factory method](https://leafletjs.com/reference.html#class-class-factories) for {@link GeocoderControl}\n * @param options the options\n */\nexport function geocoder(options?: Partial<GeocoderControlOptions>) {\n return new GeocoderControl(options);\n}\n","/* @preserve\n * Leaflet Control Geocoder\n * https://github.com/perliedman/leaflet-control-geocoder\n *\n * Copyright (c) 2012 sa3m (https://github.com/sa3m)\n * Copyright (c) 2018 Per Liedman\n * All rights reserved.\n */\nimport * as L from 'leaflet';\nimport { GeocoderControl as Geocoder, geocoder } from './control';\nimport * as geocoders from './geocoders/index';\n\nL.Util.extend(Geocoder, geocoders);\nexport default Geocoder;\nexport { Geocoder, geocoder, geocoders };\n\nL.Util.extend(L.Control, {\n Geocoder: Geocoder,\n geocoder: geocoder\n});\n"],"names":["geocodingParams","options","params","L","Util","extend","geocodingQueryParams","reverseParams","reverseQueryParams","lastCallbackId","badChars","possible","escape","&","<",">","\"","'","`","escapeChar","chr","jsonp","url","callback","context","jsonpParam","callbackId","window","bind","script","document","createElement","type","src","getParamString","id","getElementsByTagName","appendChild","getJSON","xmlHttp","XMLHttpRequest","onreadystatechange","readyState","message","status","response","JSON","parse","e","open","responseType","setRequestHeader","send","obj","existingUrl","uppercase","i","key","encodeURIComponent","toUpperCase","value","Array","isArray","j","length","push","String","indexOf","join","ArcGis","this","serviceUrl","apiKey","setOptions","geocode","query","cb","token","SingleLine","outFields","forStorage","maxLocations","f","data","results","candidates","loc","latLng","location","y","x","latLngBounds","extent","ymax","xmax","ymin","xmin","name","address","bbox","center","call","suggest","reverse","scale","lng","lat","distance","result","error","Match_addr","Bing","resourceSets","resources","resource","point","coordinates","Google","geometry","viewport","northeast","southwest","formatted_address","properties","address_components","latlng","HERE","app_id","app_code","maxResults","Error","searchtext","gen","jsonattributes","maxresults","prox","reverseGeocodeProxRadius","mode","view","displayPosition","latitude","longitude","mapView","topLeft","bottomRight","label","HEREv2","q","limit","at","items","item","position","south","west","north","east","parseLatLng","match","test","LatLng","next","undefined","sizeInMeters","toBounds","Mapbox","_getProperties","text","split","short_code","access_token","proximity","features","slice","place_name","_this","_this2","MapQuest","decodeURIComponent","_formatName","filter","s","outFormat","locations","street","adminArea4","adminArea3","adminArea1","outputFormat","Neutrino","userId","found","Nominatim","htmlTemplate","r","str","parts","road","building","city","town","village","hamlet","state","country","replace","string","format","addressdetails","boundingbox","icon","display_name","html","lon","zoom","Math","round","log","OpenLocationCode","decoded","decode","latitudeCenter","longitudeCenter","latitudeLo","longitudeLo","latitudeHi","longitudeHi","console","warn","encode","codeLength","OpenCage","annotations","bounds","formatted","Pelias","api_key","_parseResults","geocoding","timestamp","_lastSuggest","point.lat","point.lon","_this3","bboxname","geoJSON","pointToLayer","feature","circleMarker","onEachFeature","layer","getBounds","getCenter","getLatLng","GeoJSON","coordsToLatLng","pelias","GeocodeEarth","geocodeEarth","Mapzen","mapzen","Openrouteservice","Photon","reverseUrl","nameProperties","_decodeFeatures","c","_decodeFeatureName","map","p","v","What3Words","addr","words","coords","EventedControl","prototype","Control","Evented","GeocoderControl","showUniqueResult","showResultIcons","collapsed","expand","placeholder","errorMessage","iconLabel","queryMinLength","suggestMinLength","suggestTimeout","defaultMarkGeocode","geocoder","addThrobberClass","DomUtil","addClass","_container","removeThrobberClass","removeClass","onAdd","className","container","create","form","_form","_map","innerHTML","setAttribute","input","_input","DomEvent","disableClickPropagation","_errorElement","_alts","addListener","_keydown","_change","_preventBlurCollapse","_collapse","button","detail","_toggle","Browser","touch","preventDefault","stopPropagation","_expand","on","_geocode","markGeocode","setQuery","_geocodeResult","_geocodeResultSelected","_results","_createAlt","event","fitBounds","_geocodeMarker","removeLayer","Marker","bindPopup","addTo","openPopup","requestCount","_requestCount","fire","_lastGeocode","_clearResults","hasClass","select","blur","_selection","index","li","a","createTextNode","_this4","stop","dir","_this5","keyCode","parseInt","getAttribute","clearTimeout","_suggestTimeout","setTimeout","_this6","Geocoder","geocoders"],"mappings":"0aAuFgBA,EACdC,EACAC,GAEA,OAAOC,EAAEC,KAAKC,OAAOH,EAAQD,EAAQK,+BAMvBC,EACdN,EACAC,GAEA,OAAOC,EAAEC,KAAKC,OAAOH,EAAQD,EAAQO,oBCjGvC,IAAIC,EAAiB,EAOfC,EAAW,YAIXC,EAAW,WAIXC,EAAiC,CACrCC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAMP,SAASC,EAAWC,GAClB,OAAOR,EAAOQ,YA2BAC,EACdC,EACApB,EACAqB,EACAC,EACAC,GAEA,IAAMC,EAAa,eAAiBjB,IACpCP,EAAOuB,GAAc,YAAcC,EAClCC,OAAeD,GAAcvB,EAAEC,KAA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,iBACd7F,EAAE9M,QAAUM,KAAKrE,QAAQ+R,iBAC3B1N,KAAKqS,gBAAkBC,WAAW,kBAAMC,EAAKtC,UAAS,IAAOjQ,KAAKrE,QAAQgS,gBAE1E3N,KAAKoR,qBA7WwBvE,YAuXrBgB,EAASlS,GACvB,WAAWsR,EAAgBtR,YC7d3BG,KAAKC,OAAOyW,EAAUC,GAIxB5W,EAAEC,KAAKC,OAAOF,EAAEkR,QAAS,CACvByF,SAAUA,EACV3E,SAAUA"}
@@ -1,51 +0,0 @@
1
- :root {
2
- --pb-dialog-box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
3
- --pb-dialog-backdrop-color: rgba(0, 0, 0, 0.4);
4
- --pb-dialog-padding-horizontal: 1em;
5
- --pb-dialog-padding-vertical: 1em;
6
- --pb-dialog-border-color: #eee;
7
- --pb-dialog-min-width: 300px;
8
- }
9
-
10
- pb-dialog dialog {
11
- min-width: var(--pb-dialog-min-width);
12
- max-width: 100vw;
13
- max-height: 90vh;
14
- border-radius: 6px;
15
- box-shadow: var(--pb-dialog-box-shadow);
16
- border: none;
17
- padding: 0;
18
- }
19
-
20
- pb-dialog dialog::backdrop {
21
- background: var(--pb-dialog-backdrop-color);
22
- }
23
-
24
- pb-dialog>dialog>article>* {
25
- padding-left: var(--pb-dialog-padding-horizontal);
26
- padding-right: var(--pb-dialog-padding-horizontal);
27
- }
28
-
29
- pb-dialog>dialog>article>header {
30
- border-bottom: 1px solid var(--pb-dialog-border-color);
31
- display: flex;
32
- margin-bottom: var(--pb-dialog-padding-vertical);
33
- justify-content: space-between;
34
- align-items: center;
35
- }
36
-
37
- pb-dialog>dialog>article>footer {
38
- display: flex;
39
- justify-content: flex-end;
40
- gap: 0.5rem;
41
- padding-top: var(--pb-dialog-padding-vertical);
42
- padding-bottom: var(--pb-dialog-padding-vertical);
43
- border-top: 1px solid var(--pb-dialog-border-color);
44
- }
45
-
46
- pb-dialog [rel="prev"] {
47
- background: none;
48
- border: none;
49
- font-size: 1.2em;
50
- cursor: pointer;
51
- }
@@ -1,40 +0,0 @@
1
- export const pbLightDom = (superclass) => class PbLightDom extends superclass {
2
-
3
- createRenderRoot() {
4
- // Render in light DOM
5
- return this;
6
- }
7
-
8
- connectedCallback() {
9
- super.connectedCallback();
10
- this._content = document.createElement('div');
11
- this._content.innerHTML = this.innerHTML;
12
- console.log(this._content);
13
- }
14
-
15
- /**
16
- * When the class is used without shadow DOM, use this method to find elements which should be
17
- * rendered in the slot.
18
- *
19
- * @param {string|undefined|null} slotName - name of the slot to fill, if its a named slot
20
- * @returns {Array<Node>} an array of cloned nodes
21
- */
22
- fillSlot(slotName = null, fallback = null) {
23
- if (!slotName) {
24
- const slots = this._content.querySelectorAll(':scope > :not([slot])');
25
- return Array.from(slots).map(node => {
26
- const clone = node.cloneNode(true);
27
- /** @type {Element} */ (clone).removeAttribute('slot');
28
- return clone;
29
- });
30
- } else {
31
- const slot = this._content.querySelector(`:scope > [slot="${slotName}"]`);
32
- if (slot) {
33
- const clone = slot.cloneNode(true);
34
- /** @type {Element} */ (clone).removeAttribute('slot');
35
- return [clone];
36
- }
37
- return fallback || [];
38
- }
39
- }
40
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * Disable automatic loading of Roboto from Google fonts
3
- */
4
- window.polymerSkipLoadingFontRoboto = true;
5
-
6
- export {};