defra_ruby_map 0.2.2 → 0.2.3

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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/defra-ruby-map/map_init.js +7 -14
  3. data/app/controllers/defra_ruby_map/proxy_controller.rb +13 -2
  4. data/lib/defra_ruby_map/version.rb +1 -1
  5. data/vendor/assets/javascripts/defra-interactive-map/im-core.js +1 -1
  6. data/vendor/assets/javascripts/defra-interactive-map/im-core.js.LICENSE.txt +0 -30
  7. data/vendor/assets/javascripts/defra-interactive-map/index.js +1 -1
  8. data/vendor/assets/javascripts/defra-interactive-map/index.js.LICENSE.txt +0 -20
  9. data/vendor/assets/javascripts/interact-plugin/im-interact-plugin.js +1 -1
  10. data/vendor/assets/javascripts/interact-plugin/index.js +1 -1
  11. data/vendor/assets/javascripts/map-styles-plugin/im-map-styles-plugin.js +1 -1
  12. data/vendor/assets/javascripts/map-styles-plugin/index.js +1 -1
  13. data/vendor/assets/javascripts/maplibre-provider/im-maplibre-framework.js +1 -1
  14. data/vendor/assets/javascripts/maplibre-provider/im-maplibre-framework.js.LICENSE.txt +3 -3
  15. data/vendor/assets/javascripts/maplibre-provider/im-maplibre-provider.js +1 -1
  16. data/vendor/assets/javascripts/maplibre-provider/im-maplibre-worker.js +2 -0
  17. data/vendor/assets/javascripts/maplibre-provider/im-maplibre-worker.js.LICENSE.txt +4 -0
  18. data/vendor/assets/javascripts/maplibre-provider/index.js +1 -1
  19. data/vendor/assets/javascripts/proj4js/proj4.js +1 -1
  20. data/vendor/assets/javascripts/scale-bar-plugin/im-scale-bar-plugin.js +1 -1
  21. data/vendor/assets/javascripts/scale-bar-plugin/index.js +1 -1
  22. data/vendor/assets/javascripts/search-plugin/im-search-plugin.js +1 -1
  23. data/vendor/assets/javascripts/search-plugin/index.js +1 -1
  24. data/vendor/assets/stylesheets/defra-interactive-map/interactive-map.css +1 -1
  25. data/vendor/assets/stylesheets/defra-interactive-map/map-styles-plugin.css +1 -1
  26. data/vendor/assets/stylesheets/defra-interactive-map/scale-bar-plugin.css +1 -31
  27. data/vendor/assets/stylesheets/defra-interactive-map/search-plugin.css +1 -1
  28. metadata +3 -1
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[996],{405(r,t,a){a.r(t),a.d(t,{manifest:()=>b});var e=a(738);function n(r,t){(null==t||t>r.length)&&(t=r.length);for(var a=0,e=Array(t);a<t;a++)e[a]=r[a];return e}var l={small:1,medium:1.5,large:2},i={metric:[{threshold:1,abbr:"m",abbrPlural:"m",unit:"metre",unitPlural:"metres",factor:1},{threshold:1e3,abbr:"km",abbrPlural:"km",unit:"kilometre",unitPlural:"kilometres",factor:.001}],imperial:[{threshold:1609.344,abbr:"mi",abbrPlural:"mi",unit:"mile",unitPlural:"miles",factor:1/1609.344},{threshold:.9144,abbr:"yd",abbrPlural:"yds",unit:"yard",unitPlural:"yards",factor:1/.9144},{threshold:.3048,abbr:"ft",abbrPlural:"ft",unit:"foot",unitPlural:"feet",factor:1/.3048}]},o=function(r){var t=Math.pow(10,Math.floor(Math.log10(r))),a=r/t;return(a>=10?10:a>=5?5:a>=3?3:a>=2?2:1)*t},u=a(287),b={controls:[{id:"scaleBar",label:"Scale bar",mobile:{slot:"right-bottom"},tablet:{slot:"right-bottom"},desktop:{slot:"right-bottom"},render:function(r){var t=r.mapState,a=r.pluginConfig,b=t.resolution,s=t.mapSize,c=(0,e.useRef)(null),f=(0,e.useMemo)(function(){return b?function(r,t,a,e){var u,b=r/l[e],s=120*b,c=i[a],f=function(r,t){var a="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!a){if(Array.isArray(r)||(a=function(r,t){if(r){if("string"==typeof r)return n(r,t);var a={}.toString.call(r).slice(8,-1);return"Object"===a&&r.constructor&&(a=r.constructor.name),"Map"===a||"Set"===a?Array.from(r):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(r,t):void 0}}(r))||t&&r&&"number"==typeof r.length){a&&(r=a);var e=0,l=function(){};return{s:l,n:function(){return e>=r.length?{done:!0}:{done:!1,value:r[e++]}},e:function(r){throw r},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){a=a.call(r)},n:function(){var r=a.next();return o=r.done,r},e:function(r){u=!0,i=r},f:function(){try{o||null==a.return||a.return()}finally{if(u)throw i}}}}(c);try{for(f.s();!(u=f.n()).done;){var h=u.value,d=h.abbr,m=h.abbrPlural,y=h.unit,p=h.unitPlural,v=h.factor,g=o(s*v);if(g>=1&&g<1e3){var P=g/v/b;if(P<=120)return{label:g,abbr:g>1?m:d,width:P,unit:g>1?p:y}}}}catch(r){f.e(r)}finally{f.f()}var w=c[c.length-1],k=s*w.factor,S=o(k),j=S>1?w.abbrPlural:w.abbr,x=S>1?w.abbrPlural:w.abbr;return{label:S,abbr:j,width:S/w.factor/b,unit:x}}(b/1,0,a.units,s):{width:0,label:"",abbr:"",unit:""}},[b,s,a.units]);return(0,u.jsx)("div",{className:"im-c-scale-bar",ref:c,style:{width:"".concat(f.width,"px")},children:(0,u.jsxs)("span",{className:"im-c-scale-bar__label",children:[(0,u.jsx)("span",{className:"im-u-visually-hidden",children:"Scale bar: "}),f.label,(0,u.jsx)("span",{"aria-hidden":"true",children:f.abbr}),(0,u.jsx)("span",{className:"im-u-visually-hidden",children:f.unit})]})})}}]}}}]);
1
+ "use strict";(Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap||[]).push([[996],{437:function(r,t,e){e.r(t),e.d(t,{manifest:function(){return b}});var a=e(738);function n(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,a=Array(t);e<t;e++)a[e]=r[e];return a}var l={small:1,medium:1.5,large:2},i={metric:[{threshold:1,abbr:"m",abbrPlural:"m",unit:"metre",unitPlural:"metres",factor:1},{threshold:1e3,abbr:"km",abbrPlural:"km",unit:"kilometre",unitPlural:"kilometres",factor:.001}],imperial:[{threshold:1609.344,abbr:"mi",abbrPlural:"mi",unit:"mile",unitPlural:"miles",factor:1/1609.344},{threshold:.9144,abbr:"yd",abbrPlural:"yds",unit:"yard",unitPlural:"yards",factor:1/.9144},{threshold:.3048,abbr:"ft",abbrPlural:"ft",unit:"foot",unitPlural:"feet",factor:1/.3048}]},o=function(r){var t=Math.pow(10,Math.floor(Math.log10(r))),e=r/t;return(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)*t},u=e(287),b={controls:[{id:"scaleBar",label:"Scale bar",mobile:{slot:"right-bottom"},tablet:{slot:"right-bottom"},desktop:{slot:"right-bottom"},render:function(r){var t=r.mapState,e=r.pluginConfig,b=t.resolution,s=t.mapSize,f=(0,a.useRef)(null),c=(0,a.useMemo)(function(){return b?function(r,t,e,a){var u,b=r/l[a],s=120*b,f=i[e],c=function(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=function(r,t){if(r){if("string"==typeof r)return n(r,t);var e={}.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(r,t):void 0}}(r))||t&&r&&"number"==typeof r.length){e&&(r=e);var a=0,l=function(){};return{s:l,n:function(){return a>=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(r){throw r},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return o=r.done,r},e:function(r){u=!0,i=r},f:function(){try{o||null==e.return||e.return()}finally{if(u)throw i}}}}(f);try{for(c.s();!(u=c.n()).done;){var d=u.value,h=d.abbr,m=d.abbrPlural,y=d.unit,p=d.unitPlural,v=d.factor,g=o(s*v);if(g>=1&&g<1e3){var P=g/v/b;if(P<=120)return{label:g,abbr:g>1?m:h,width:P,unit:g>1?p:y}}}}catch(r){c.e(r)}finally{c.f()}var w=f[f.length-1],j=s*w.factor,k=o(j),S=k>1?w.abbrPlural:w.abbr,x=k>1?w.abbrPlural:w.abbr;return{label:k,abbr:S,width:k/w.factor/b,unit:x}}(b/1,0,e.units,s):{width:0,label:"",abbr:"",unit:""}},[b,s,e.units]);return(0,u.jsx)("div",{className:"im-c-scale-bar",ref:f,style:{width:"".concat(c.width,"px")},children:(0,u.jsxs)("span",{className:"im-c-scale-bar__label",children:[(0,u.jsx)("span",{className:"im-u-visually-hidden",children:"Scale bar: "}),c.label,(0,u.jsx)("span",{"aria-hidden":"true",children:c.abbr}),(0,u.jsx)("span",{className:"im-u-visually-hidden",children:c.unit})]})})}}]}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.scaleBarPlugin=t())}(this,()=>(()=>{"use strict";var e,t,r={738(e){e.exports=preactCompat},287(e){e.exports=preactJsxRuntime}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>"im-scale-bar-plugin.js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="defra.scaleBarPlugin:",o.l=(r,n,i,a)=>{if(e[r])e[r].push(n);else{var u,c;if(void 0!==i)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var s=f[p];if(s.getAttribute("src")==r||s.getAttribute("data-webpack")==t+i){u=s;break}}u||(c=!0,(u=document.createElement("script")).charset="utf-8",o.nc&&u.setAttribute("nonce",o.nc),u.setAttribute("data-webpack",t+i),u.src=r),e[r]=[n];var l=(t,n)=>{u.onerror=u.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach(e=>e(n)),t)return t(n)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=l.bind(null,u.onerror),u.onload=l.bind(null,u.onload),c&&document.head.appendChild(u)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=i);var a=o.p+o.u(t),u=new Error;o.l(a,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",u.name="ChunkLoadError",u.type=i,u.request=a,n[1](u)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[a,u,c]=r,f=0;if(a.some(t=>0!==e[t])){for(n in u)o.o(u,n)&&(o.m[n]=u[n]);c&&c(o)}for(t&&t(r);f<a.length;f++)i=a[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i={};function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof f?n:f,p=Object.create(a.prototype);return u(p,"_invoke",function(r,n,o){var i,a,u,f=0,p=o||[],s=!1,l={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,a=0,u=e,l.n=r,c}};function d(r,n){for(a=r,u=n,t=0;!s&&f&&!o&&t<p.length;t++){var o,i=p[t],d=l.p,v=i[2];r>3?(o=v===n)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(a=0,l.v=n,l.n=i[1]):d<v&&(o=r<3||i[0]>n||n>v)&&(i[4]=r,i[5]=n,l.n=v,a=0))}if(o||r>1)return c;throw s=!0,n}return function(o,p,v){if(f>1)throw TypeError("Generator is already running");for(s&&1===p&&d(p,v),a=p,u=v;(t=a<2?e:u)||!s;){i||(a?a<3?(a>1&&(l.n=-1),d(a,u)):l.n=u:l.v=u);try{if(f=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(s=l.n<0)?u:r.call(n,l))!==c)break}catch(t){i=e,a=1,u=t}finally{f=1}}return{value:t,done:s}}}(r,o,i),!0),p}var c={};function f(){}function p(){}function s(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(u(t={},n,function(){return this}),t),d=s.prototype=f.prototype=Object.create(l);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,u(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=s,u(d,"constructor",s),u(s,"constructor",p),p.displayName="GeneratorFunction",u(s,o,"GeneratorFunction"),u(d),u(d,o,"Generator"),u(d,n,function(){return this}),u(d,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:v}})()}function u(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,r,n){function i(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},u(e,t,r,n)}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.manifest,i=r.units;return{id:"scaleBar",manifest:n,units:void 0===i?"metric":i,load:(e=a().m(function e(){var t;return a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(996).then(o.bind(o,405));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)})},function(){return t.apply(this,arguments)})}}return o.d(i,{default:()=>f}),i.default})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.scaleBarPlugin=t())}(Object("undefined"!=typeof self?self:this),function(){return function(){"use strict";var e,t,r={738:function(e){e.exports=preactCompat},287:function(e){e.exports=preactJsxRuntime}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce(function(t,r){return o.f[r](e,t),t},[]))},o.u=function(e){return"im-scale-bar-plugin.js"},o.miniCssF=function(e){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="defra.scaleBarPlugin:",o.l=function(r,n,i,u){if(e[r])e[r].push(n);else{var a,c;if(void 0!==i)for(var f=document.getElementsByTagName("script"),s=0;s<f.length;s++){var l=f[s];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+i){a=l;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",t+i),a.src=r),e[r]=[n];var p=function(t,n){a.onerror=a.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}(),function(){var e={57:0};o.f.j=function(t,r){var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(function(r,o){n=e[t]=[r,o]});r.push(n[2]=i);var u=o.p+o.u(t),a=new Error;o.l(u,function(r){if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+u+")",a.name="ChunkLoadError",a.type=i,a.request=u,n[1](a)}},"chunk-"+t,t)}};var t=function(t,r){var n,i,u=r[0],a=r[1],c=r[2],f=0;if(u.some(function(t){return 0!==e[t]})){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);c&&c(o)}for(t&&t(r);f<u.length;f++)i=u[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var i={};function u(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof f?n:f,s=Object.create(u.prototype);return a(s,"_invoke",function(r,n,o){var i,u,a,f=0,s=o||[],l=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,u=0,a=e,p.n=r,c}};function d(r,n){for(u=r,a=n,t=0;!l&&f&&!o&&t<s.length;t++){var o,i=s[t],d=p.p,v=i[2];r>3?(o=v===n)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(u=0,p.v=n,p.n=i[1]):d<v&&(o=r<3||i[0]>n||n>v)&&(i[4]=r,i[5]=n,p.n=v,u=0))}if(o||r>1)return c;throw l=!0,n}return function(o,s,v){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&d(s,v),u=s,a=v;(t=u<2?e:a)||!l;){i||(u?u<3?(u>1&&(p.n=-1),d(u,a)):p.n=a:p.v=a);try{if(f=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(l=p.n<0)?a:r.call(n,p))!==c)break}catch(t){i=e,u=1,a=t}finally{f=1}}return{value:t,done:l}}}(r,o,i),!0),s}var c={};function f(){}function s(){}function l(){}t=Object.getPrototypeOf;var p=[][n]?t(t([][n]())):(a(t={},n,function(){return this}),t),d=l.prototype=f.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,a(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=l,a(d,"constructor",l),a(l,"constructor",s),s.displayName="GeneratorFunction",a(l,o,"GeneratorFunction"),a(d),a(d,o,"Generator"),a(d,n,function(){return this}),a(d,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:v}})()}function a(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,r,n){function i(t,r){a(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},a(e,t,r,n)}function c(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function f(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.manifest,i=r.units;return{id:"scaleBar",manifest:n,units:void 0===i?"metric":i,load:(e=u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(996).then(o.bind(o,437));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function u(e){c(i,n,o,u,a,"next",e)}function a(e){c(i,n,o,u,a,"throw",e)}u(void 0)})},function(){return t.apply(this,arguments)})}}return o.d(i,{default:function(){return f}}),i.default}()});
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see im-search-plugin.js.LICENSE.txt */
2
- "use strict";(this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[]).push([[254],[,(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(e),r.d(e,{manifest:()=>Tt});var s={TOGGLE_EXPANDED:function(t,e){return i(i({},t),{},{isExpanded:e,areSuggestionsVisible:e,hasFetchedSuggestions:!1,hasSearchError:!1})},SET_KEYBOARD_FOCUS_WITHIN:function(t,e){return i(i({},t),{},{hasKeyboardFocusWithin:e,areSuggestionsVisible:!0})},INPUT_BLUR:function(t,e){return i(i({},t),{},{hasKeyboardFocusWithin:!1,areSuggestionsVisible:t.areSuggestionsVisible&&"keyboard"!==e,selectedIndex:-1})},SET_VALUE:function(t,e){return i(i({},t),{},{value:e})},UPDATE_SUGGESTIONS:function(t,e){return i(i({},t),{},{suggestions:e.results,hasFetchedSuggestions:!0,hasSearchError:e.hasError})},SHOW_SUGGESTIONS:function(t){return i(i({},t),{},{areSuggestionsVisible:!0,hasFetchedSuggestions:!1,hasSearchError:!1})},HIDE_SUGGESTIONS:function(t){return i(i({},t),{},{areSuggestionsVisible:!1,hasFetchedSuggestions:!1,hasSearchError:!1})},SET_SELECTED:function(t,e){return i(i({},t),{},{selectedIndex:e,areSuggestionsVisible:e>=0})}},u=r(738),c=r(287),l=function(t){var e=t.id,r=t.pluginState,n=t.handleSuggestionClick;return(0,c.jsx)("ul",{id:"".concat(e,"-search-suggestions"),role:"listbox","aria-labelledby":"".concat(e,"-search"),className:"im-c-search-suggestions",style:r.areSuggestionsVisible&&r.suggestions.length?void 0:{display:"none"},children:r.suggestions.map(function(t,o){return(0,c.jsx)("li",{id:"".concat(e,"-search-suggestion-").concat(o),className:"im-c-search-suggestions__item",role:"option","aria-selected":r.selectedIndex===o,"aria-setsize":r.suggestions.length,"aria-posinset":o+1,onClick:function(){return n(t)},children:(0,c.jsx)("span",{className:"im-c-search-suggestions__label",dangerouslySetInnerHTML:{__html:t.marked}})},t.id)})})};function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t,e,r){return(e=function(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var h=function(t,e,r){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({display:t.expanded||e.isExpanded?"flex":void 0},"mobile"!==r.breakpoint&&(null==t?void 0:t.width)&&{width:t.width})},y=function(t){var e=t.id,r=t.pluginState,n=t.pluginConfig,o=t.appState,i=t.inputRef,a=t.events,s=t.services,f=t.children,p=r.areSuggestionsVisible,d=r.hasFetchedSuggestions,y=r.hasSearchError,m=r.suggestions,b=void 0===m?[]:m,g=n.noResultsMessage,v=n.searchErrorMessage;(0,u.useEffect)(function(){p&&d&&s.announce(function(t,e,r,n){if(e)return r;if(0===t)return n;var o=1===t?"result":"results";return"".concat(t," ").concat(o," available")}(b.length,y,v,g))},[b,d]);var w=["im-c-search-form",n.expanded&&"im-c-search-form--default-expanded","im-c-panel"].filter(Boolean).join(" "),S=p&&d&&(y||!b.length);return(0,c.jsxs)("form",{id:"".concat(e,"-search-form"),role:"search",className:w,style:h(n,r,o),"aria-controls":"".concat(e,"-viewport"),onSubmit:function(t){return a.handleSubmit(t,o,r)},children:[(0,c.jsx)("button",{type:"submit",style:{display:"none"},"aria-hidden":"true",tabIndex:-1,children:"Submit"}),(0,c.jsxs)("div",{className:"im-c-search__input-container".concat(r.hasKeyboardFocusWithin?" im-c-search__input-container--keyboard-focus-within":""),children:[(0,c.jsx)("label",{htmlFor:"".concat(e,"-search"),className:"im-u-visually-hidden",children:n.placeholder}),(0,c.jsx)("input",{id:"".concat(e,"-search"),className:"im-c-search__input",type:"search",role:"combobox","aria-expanded":r.suggestionsVisible,"aria-controls":"".concat(e,"-search-suggestions"),"aria-activedescendant":r.selectedIndex>=0?"".concat(e,"-search-suggestion-").concat(r.selectedIndex):void 0,"aria-describedby":r.value?void 0:"".concat(e,"-search-hint"),"aria-autocomplete":"list",autoComplete:"off",placeholder:n.placeholder,name:"".concat(e,"-search"),spellCheck:!1,enterKeyHint:"search",value:r.value,onClick:a.handleInputClick,onChange:a.handleInputChange,onFocus:function(){return a.handleInputFocus(o.interfaceType)},onBlur:function(){return a.handleInputBlur(o.interfaceType)},onKeyDown:function(t){return a.handleInputKeyDown(t,r)},ref:i}),(0,c.jsx)("span",{id:"".concat(e,"-search-hint"),className:"im-c-search__hint",children:"When search results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."}),f]}),S&&(0,c.jsx)("div",{className:"im-c-search__status","aria-hidden":"true",children:y?v:g}),(0,c.jsx)(l,{id:e,appState:o,pluginState:r,handleSuggestionClick:function(t){return a.handleSuggestionClick(t,o)}})]})},m=function(t){var e=t.defaultExpanded,r=t.onClick,n=t.closeIcon;return(0,c.jsx)("button",{"aria-label":"Close search",className:"im-c-map-button im-c-search-close-button",type:"button",onClick:r,style:e?{display:"none"}:void 0,children:n&&(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:n}})})},b=function(t){var e=t.defaultExpanded,r=t.submitIcon;return(0,c.jsx)("button",{"aria-label":"Search",className:"im-c-map-button im-c-search-submit-button",type:"submit",style:e?void 0:{display:"none"},children:r&&(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:r}})})};let g=" ";class v{static get separator(){return g}static set separator(t){g=t}static parse(t){if(!isNaN(parseFloat(t))&&isFinite(t))return Number(t);const e=String(t).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==e[e.length-1]&&e.splice(e.length-1),""==e)return NaN;let r=null;switch(e.length){case 3:r=e[0]/1+e[1]/60+e[2]/3600;break;case 2:r=e[0]/1+e[1]/60;break;case 1:r=e[0];break;default:return NaN}return/^-|[WS]$/i.test(t.trim())&&(r=-r),Number(r)}static toDms(t,e="d",r=void 0){if(isNaN(t))return null;if("string"==typeof t&&""==t.trim())return null;if("boolean"==typeof t)return null;if(t==1/0)return null;if(null==t)return null;if(void 0===r)switch(e){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:e="d",r=4}t=Math.abs(t);let n=null,o=null,i=null,a=null;switch(e){default:case"d":case"deg":o=t.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),n=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),i=(60*t%60).toFixed(r),60==i&&(i=(0).toFixed(r),o++),o=("000"+o).slice(-3),i<10&&(i="0"+i),n=o+"°"+v.separator+i+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),i=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),i++),60==i&&(i=0,o++),o=("000"+o).slice(-3),i=("00"+i).slice(-2),a<10&&(a="0"+a),n=o+"°"+v.separator+i+"′"+v.separator+a+"″"}return n}static toLat(t,e,r){const n=v.toDms(v.wrap90(t),e,r);return null===n?"–":n.slice(1)+v.separator+(t<0?"S":"N")}static toLon(t,e,r){const n=v.toDms(v.wrap180(t),e,r);return null===n?"–":n+v.separator+(t<0?"W":"E")}static toBrng(t,e,r){const n=v.toDms(v.wrap360(t),e,r);return null===n?"–":n.replace("360","0")}static fromLocale(t){const e=123456.789.toLocaleString(),r={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(t){const e=123456.789.toLocaleString(),r={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(t,e=3){if(![1,2,3].includes(Number(e)))throw new RangeError(`invalid precision ‘${e}’`);t=v.wrap360(t);const r=4*2**(e-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*r/360)%r*16/r]}static wrap90(t){if(-90<=t&&t<=90)return t;const e=t;return 1*Math.abs(((e-90)%360+360)%360-180)-90}static wrap180(t){if(-180<=t&&t<=180)return t;const e=360;return((360*t/e-180)%e+e)%e-180}static wrap360(t){if(0<=t&&t<360)return t;const e=360;return(360*t/e%e+e)%e}}Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};const w=v;class S{constructor(t,e,r){if(isNaN(t)||isNaN(e)||isNaN(r))throw new TypeError(`invalid vector [${t},${e},${r}]`);this.x=Number(t),this.y=Number(e),this.z=Number(r)}get length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}plus(t){if(!(t instanceof S))throw new TypeError("v is not Vector3d object");return new S(this.x+t.x,this.y+t.y,this.z+t.z)}minus(t){if(!(t instanceof S))throw new TypeError("v is not Vector3d object");return new S(this.x-t.x,this.y-t.y,this.z-t.z)}times(t){if(isNaN(t))throw new TypeError(`invalid scalar value ‘${t}’`);return new S(this.x*t,this.y*t,this.z*t)}dividedBy(t){if(isNaN(t))throw new TypeError(`invalid scalar value ‘${t}’`);return new S(this.x/t,this.y/t,this.z/t)}dot(t){if(!(t instanceof S))throw new TypeError("v is not Vector3d object");return this.x*t.x+this.y*t.y+this.z*t.z}cross(t){if(!(t instanceof S))throw new TypeError("v is not Vector3d object");const e=this.y*t.z-this.z*t.y,r=this.z*t.x-this.x*t.z,n=this.x*t.y-this.y*t.x;return new S(e,r,n)}negate(){return new S(-this.x,-this.y,-this.z)}unit(){const t=this.length;if(1==t)return this;if(0==t)return this;const e=this.x/t,r=this.y/t,n=this.z/t;return new S(e,r,n)}angleTo(t,e=void 0){if(!(t instanceof S))throw new TypeError("v is not Vector3d object");if(!(e instanceof S||null==e))throw new TypeError("n is not Vector3d object");const r=null==e||this.cross(t).dot(e)>=0?1:-1,n=this.cross(t).length*r,o=this.dot(t);return Math.atan2(n,o)}rotateAround(t,e){if(!(t instanceof S))throw new TypeError("axis is not Vector3d object");const r=e.toRadians(),n=this.unit(),o=t.unit(),i=Math.sin(r),a=Math.cos(r),s=1-a,u=o.x,c=o.y,l=o.z,f=[[s*u*u+a,s*u*c-i*l,s*u*l+i*c],[s*u*c+i*l,s*c*c+a,s*c*l-i*u],[s*u*l-i*c,s*c*l+i*u,s*l*l+a]],p=[f[0][0]*n.x+f[0][1]*n.y+f[0][2]*n.z,f[1][0]*n.x+f[1][1]*n.y+f[1][2]*n.z,f[2][0]*n.x+f[2][1]*n.y+f[2][2]*n.z];return new S(p[0],p[1],p[2])}toString(t=3){return`[${this.x.toFixed(t)},${this.y.toFixed(t)},${this.z.toFixed(t)}]`}}Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};const E=S,O={WGS84:{a:6378137,b:6356752.314245,f:1/298.257223563}},N={WGS84:{ellipsoid:O.WGS84}};Object.freeze(O.WGS84),Object.freeze(N.WGS84);class T{constructor(t,e,r=0){if(isNaN(t)||null==t)throw new TypeError(`invalid lat ‘${t}’`);if(isNaN(e)||null==e)throw new TypeError(`invalid lon ‘${e}’`);if(isNaN(r)||null==r)throw new TypeError(`invalid height ‘${r}’`);this._lat=w.wrap90(Number(t)),this._lon=w.wrap180(Number(e)),this._height=Number(r)}get lat(){return this._lat}get latitude(){return this._lat}set lat(t){if(this._lat=isNaN(t)?w.wrap90(w.parse(t)):w.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid lat ‘${t}’`)}set latitude(t){if(this._lat=isNaN(t)?w.wrap90(w.parse(t)):w.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid latitude ‘${t}’`)}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(t){if(this._lon=isNaN(t)?w.wrap180(w.parse(t)):w.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lon ‘${t}’`)}set lng(t){if(this._lon=isNaN(t)?w.wrap180(w.parse(t)):w.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lng ‘${t}’`)}set longitude(t){if(this._lon=isNaN(t)?w.wrap180(w.parse(t)):w.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid longitude ‘${t}’`)}get height(){return this._height}set height(t){if(this._height=Number(t),isNaN(this._height))throw new TypeError(`invalid height ‘${t}’`)}get datum(){return this._datum}set datum(t){this._datum=t}static get ellipsoids(){return O}static get datums(){return N}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");let e,r,n;if("object"==typeof t[0]&&(1==t.length||!isNaN(parseFloat(t[1])))){const o=t[0];if("Point"==o.type&&Array.isArray(o.coordinates)?([r,e,n]=o.coordinates,n=n||0):(null!=o.latitude&&(e=o.latitude),null!=o.lat&&(e=o.lat),null!=o.longitude&&(r=o.longitude),null!=o.lng&&(r=o.lng),null!=o.lon&&(r=o.lon),null!=o.height&&(n=o.height),e=w.wrap90(w.parse(e)),r=w.wrap180(w.parse(r))),null!=t[1]&&(n=t[1]),isNaN(e)||isNaN(r))throw new TypeError(`invalid point ‘${JSON.stringify(t[0])}’`)}if("string"==typeof t[0]&&2==t[0].split(",").length&&([e,r]=t[0].split(","),e=w.wrap90(w.parse(e)),r=w.wrap180(w.parse(r)),n=t[1]||0,isNaN(e)||isNaN(r)))throw new TypeError(`invalid point ‘${t[0]}’`);if(null==e&&null==r&&([e,r]=t,e=w.wrap90(w.parse(e)),r=w.wrap180(w.parse(r)),n=t[2]||0,isNaN(e)||isNaN(r)))throw new TypeError(`invalid point ‘${t.toString()}’`);return new this(e,r,n)}toCartesian(){const t=this.datum?this.datum.ellipsoid:this.referenceFrame?this.referenceFrame.ellipsoid:O.WGS84,e=this.lat.toRadians(),r=this.lon.toRadians(),n=this.height,{a:o,f:i}=t,a=Math.sin(e),s=Math.cos(e),u=Math.sin(r),c=Math.cos(r),l=2*i-i*i,f=o/Math.sqrt(1-l*a*a);return new j((f+n)*s*c,(f+n)*s*u,(f*(1-l)+n)*a)}equals(t){if(!(t instanceof T))throw new TypeError(`invalid point ‘${t}’`);return!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON||Math.abs(this.height-t.height)>Number.EPSILON||this.datum!=t.datum||this.referenceFrame!=t.referenceFrame||this.epoch!=t.epoch)}toString(t="d",e=void 0,r=null){if(!["d","dm","dms","n"].includes(t))throw new RangeError(`invalid format ‘${t}’`);const n=(this.height>=0?" +":" ")+this.height.toFixed(r)+"m";return"n"==t?(null==e&&(e=4),`${this.lat.toFixed(e)}, ${this.lon.toFixed(e)}${null==r?"":n}`):`${w.toLat(this.lat,t,e)}, ${w.toLon(this.lon,t,e)}${null==r?"":n}`}}class j extends E{constructor(t,e,r){super(t,e,r)}toLatLon(t=O.WGS84){if(!t||!t.a)throw new TypeError(`invalid ellipsoid ‘${t}’`);const{x:e,y:r,z:n}=this,{a:o,b:i,f:a}=t,s=2*a-a*a,u=s/(1-s),c=Math.sqrt(e*e+r*r),l=i*n/(o*c)*(1+u*i/Math.sqrt(c*c+n*n)),f=l/Math.sqrt(1+l*l),p=f/l,d=isNaN(p)?0:Math.atan2(n+u*i*f*f*f,c-s*o*p*p*p),h=Math.atan2(r,e),y=Math.sin(d),m=c*Math.cos(d)+n*y-o*o/(o/Math.sqrt(1-s*y*y));return new T(d.toDegrees(),h.toDegrees(),m)}toString(t=0){return`[${this.x.toFixed(t)},${this.y.toFixed(t)},${this.z.toFixed(t)}]`}}const _={WGS84:{a:6378137,b:6356752.314245,f:1/298.257223563},Airy1830:{a:6377563.396,b:6356256.909,f:1/299.3249646},AiryModified:{a:6377340.189,b:6356034.448,f:1/299.3249646},Bessel1841:{a:6377397.155,b:6356078.962818,f:1/299.1528128},Clarke1866:{a:6378206.4,b:6356583.8,f:1/294.978698214},Clarke1880IGN:{a:6378249.2,b:6356515,f:1/293.466021294},GRS80:{a:6378137,b:6356752.31414,f:1/298.257222101},Intl1924:{a:6378388,b:6356911.946,f:1/297},WGS72:{a:6378135,b:6356750.5,f:1/298.26}},P={ED50:{ellipsoid:_.Intl1924,transform:[89.5,93.8,123.1,-1.2,0,0,.156]},ETRS89:{ellipsoid:_.GRS80,transform:[0,0,0,0,0,0,0]},Irl1975:{ellipsoid:_.AiryModified,transform:[-482.53,130.596,-564.557,-8.15,1.042,.214,.631]},NAD27:{ellipsoid:_.Clarke1866,transform:[8,-160,-176,0,0,0,0]},NAD83:{ellipsoid:_.GRS80,transform:[.9956,-1.9103,-.5215,-62e-5,.025915,.009426,.011599]},NTF:{ellipsoid:_.Clarke1880IGN,transform:[168,60,-320,0,0,0,0]},OSGB36:{ellipsoid:_.Airy1830,transform:[-446.448,125.157,-542.06,20.4894,-.1502,-.247,-.8421]},Potsdam:{ellipsoid:_.Bessel1841,transform:[-582,-105,-414,-8.3,1.04,.35,-3.08]},TokyoJapan:{ellipsoid:_.Bessel1841,transform:[148,-507,-685,0,0,0,0]},WGS72:{ellipsoid:_.WGS72,transform:[0,0,-4.5,-.22,0,0,.554]},WGS84:{ellipsoid:_.WGS84,transform:[0,0,0,0,0,0,0]}};Object.keys(_).forEach(t=>Object.freeze(_[t])),Object.keys(P).forEach(t=>{Object.freeze(P[t]),Object.freeze(P[t].transform)});class x extends T{constructor(t,e,r=0,n=P.WGS84){if(!n||null==n.ellipsoid)throw new TypeError(`unrecognised datum ‘${n}’`);super(t,e,r),this._datum=n}get datum(){return this._datum}static get ellipsoids(){return _}static get datums(){return P}static parse(...t){let e=P.WGS84;if((4==t.length||3==t.length&&"object"==typeof t[2])&&(e=t.pop()),!e||null==e.ellipsoid)throw new TypeError(`unrecognised datum ‘${e}’`);const r=super.parse(...t);return r._datum=e,r}convertDatum(t){if(!t||null==t.ellipsoid)throw new TypeError(`unrecognised datum ‘${t}’`);return this.toCartesian().convertDatum(t).toLatLon()}toCartesian(){const t=super.toCartesian();return new G(t.x,t.y,t.z,this.datum)}}class G extends j{constructor(t,e,r,n=void 0){if(n&&null==n.ellipsoid)throw new TypeError(`unrecognised datum ‘${n}’`);super(t,e,r),n&&(this._datum=n)}get datum(){return this._datum}set datum(t){if(!t||null==t.ellipsoid)throw new TypeError(`unrecognised datum ‘${t}’`);this._datum=t}toLatLon(t=void 0){t&&(console.info("datum parameter to Cartesian_Datum.toLatLon is deprecated: set datum before calling toLatLon()"),this.datum=t);const e=this.datum||P.WGS84;if(!e||null==e.ellipsoid)throw new TypeError(`unrecognised datum ‘${e}’`);const r=super.toLatLon(e.ellipsoid);return new x(r.lat,r.lon,r.height,this.datum)}convertDatum(t){if(!t||null==t.ellipsoid)throw new TypeError(`unrecognised datum ‘${t}’`);if(!this.datum)throw new TypeError("cartesian coordinate has no datum");let e=null,r=null;null!=this.datum&&this.datum!=P.WGS84||(e=this,r=t.transform),t==P.WGS84&&(e=this,r=this.datum.transform.map(t=>-t)),null==r&&(e=this.convertDatum(P.WGS84),r=t.transform);const n=e.applyTransform(r);return n.datum=t,n}applyTransform(t){const{x:e,y:r,z:n}=this,o=t[0],i=t[1],a=t[2],s=t[3]/1e6+1,u=(t[4]/3600).toRadians(),c=(t[5]/3600).toRadians(),l=(t[6]/3600).toRadians();return new G(o+e*s-r*l+n*c,i+e*l+r*s-n*u,a-e*c+r*u+n*s)}}const k={trueOrigin:{lat:49,lon:-2},falseOrigin:{easting:-4e5,northing:1e5},scaleFactor:.9996012717,ellipsoid:x.ellipsoids.Airy1830};class D{constructor(t,e){if(this.easting=Number(t),this.northing=Number(e),isNaN(t)||this.easting<0||this.easting>7e5)throw new RangeError(`invalid easting ‘${t}’`);if(isNaN(e)||this.northing<0||this.northing>13e5)throw new RangeError(`invalid northing ‘${e}’`)}toLatLon(t=x.datums.WGS84){const{easting:e,northing:r}=this,{a:n,b:o}=k.ellipsoid,i=k.trueOrigin.lat.toRadians(),a=k.trueOrigin.lon.toRadians(),s=-k.falseOrigin.easting,u=-k.falseOrigin.northing,c=k.scaleFactor,l=1-o*o/(n*n),f=(n-o)/(n+o),p=f*f,d=f*f*f;let h=i,y=0;do{h=(r-u-y)/(n*c)+h,y=o*c*((1+f+5/4*p+5/4*d)*(h-i)-(3*f+3*f*f+21/8*d)*Math.sin(h-i)*Math.cos(h+i)+(15/8*p+15/8*d)*Math.sin(2*(h-i))*Math.cos(2*(h+i))-35/24*d*Math.sin(3*(h-i))*Math.cos(3*(h+i)))}while(Math.abs(r-u-y)>=1e-5);const m=Math.cos(h),b=Math.sin(h),g=n*c/Math.sqrt(1-l*b*b),v=n*c*(1-l)/Math.pow(1-l*b*b,1.5),w=g/v-1,S=Math.tan(h),E=S*S,O=E*E,N=1/m,T=g*g*g,j=T*g*g,_=e-s,P=_*_,G=P*_,D=P*P,R=G*P;h=h-S/(2*v*g)*P+S/(24*v*T)*(5+3*E+w-9*E*w)*D-S/(720*v*j)*(61+90*E+45*O)*(D*P);const A=a+N/g*_-N/(6*T)*(g/v+2*E)*G+N/(120*j)*(5+28*E+24*O)*R-N/(j*g*g*5040)*(61+662*E+1320*O+O*E*720)*(R*P);let I=new M(h.toDegrees(),A.toDegrees(),0,x.datums.OSGB36);return t!=x.datums.OSGB36&&(I=I.convertDatum(t),I=new M(I.lat,I.lon,I.height,I.datum)),I}static parse(t){let e=(t=String(t).trim()).match(/^(\d+),\s*(\d+)$/);if(e)return new D(e[1],e[2]);if(e=t.match(/^[HNST][ABCDEFGHJKLMNOPQRSTUVWXYZ]\s*[0-9]+\s*[0-9]+$/i),!e)throw new Error(`invalid grid reference ‘${t}’`);let r=t.toUpperCase().charCodeAt(0)-"A".charCodeAt(0),n=t.toUpperCase().charCodeAt(1)-"A".charCodeAt(0);r>7&&r--,n>7&&n--;const o=(r-2)%5*5+n%5,i=19-5*Math.floor(r/5)-Math.floor(n/5);let a=t.slice(2).trim().split(/\s+/);if(1==a.length&&(a=[a[0].slice(0,a[0].length/2),a[0].slice(a[0].length/2)]),a[0].length!=a[1].length)throw new Error(`invalid grid reference ‘${t}’`);a[0]=a[0].padEnd(5,"0"),a[1]=a[1].padEnd(5,"0");const s=o+a[0],u=i+a[1];return new D(s,u)}toString(t=10){if(![0,2,4,6,8,10,12,14,16].includes(Number(t)))throw new RangeError(`invalid precision ‘${t}’`);let{easting:e,northing:r}=this;if(0==t){const t={useGrouping:!1,minimumIntegerDigits:6,maximumFractionDigits:3};return`${e.toLocaleString("en",t)},${r.toLocaleString("en",t)}`}const n=Math.floor(e/1e5),o=Math.floor(r/1e5);let i=19-o-(19-o)%5+Math.floor((n+10)/5),a=5*(19-o)%25+n%5;i>7&&i++,a>7&&a++;const s=String.fromCharCode(i+"A".charCodeAt(0),a+"A".charCodeAt(0));return e=Math.floor(e%1e5/Math.pow(10,5-t/2)),r=Math.floor(r%1e5/Math.pow(10,5-t/2)),e=e.toString().padStart(t/2,"0"),r=r.toString().padStart(t/2,"0"),`${s} ${e} ${r}`}}class M extends x{toOsGrid(){const t=this.datum==x.datums.OSGB36?this:this.convertDatum(x.datums.OSGB36),e=t.lat.toRadians(),r=t.lon.toRadians(),{a:n,b:o}=k.ellipsoid,i=k.trueOrigin.lat.toRadians(),a=k.trueOrigin.lon.toRadians(),s=-k.falseOrigin.easting,u=-k.falseOrigin.northing,c=k.scaleFactor,l=1-o*o/(n*n),f=(n-o)/(n+o),p=f*f,d=f*f*f,h=Math.cos(e),y=Math.sin(e),m=n*c/Math.sqrt(1-l*y*y),b=n*c*(1-l)/Math.pow(1-l*y*y,1.5),g=m/b-1,v=o*c*((1+f+5/4*p+5/4*d)*(e-i)-(3*f+3*f*f+21/8*d)*Math.sin(e-i)*Math.cos(e+i)+(15/8*p+15/8*d)*Math.sin(2*(e-i))*Math.cos(2*(e+i))-35/24*d*Math.sin(3*(e-i))*Math.cos(3*(e+i))),w=h*h*h,S=w*h*h,E=Math.tan(e)*Math.tan(e),O=E*E,N=r-a,T=N*N,j=T*N,_=j*N,P=_*N;let G=v+u+m/2*y*h*T+m/24*y*w*(5-E+9*g)*_+m/720*y*S*(61-58*E+O)*(P*N),M=s+m*h*N+m/6*w*(m/b-E)*j+m/120*S*(5-18*E+O+14*g-58*E*g)*P;G=Number(G.toFixed(3)),M=Number(M.toFixed(3));try{return new D(M,G)}catch(e){throw new Error(`${e.message} from (${t.lat.toFixed(6)},${t.lon.toFixed(6)}).toOsGrid()`)}}convertDatum(t){const e=super.convertDatum(t);return new M(e.lat,e.lon,e.height,e.datum)}}function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}var A;function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach(function(e){L(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function L(t,e,r){return(e=function(t){var e=function(t){if("object"!=R(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==R(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var F=500,$=function(t){var e=t.GAZETTEER_ENTRY,r="eng"===e.NAME2_LANG?e.NAME2:e.NAME1;return t.GAZETTEER_ENTRY.NAME1=r,t.GAZETTEER_ENTRY.NAME1_LANG="eng",t},W=function(t,e){var r,n,o,i,a=e.MBR_XMIN,s=e.MBR_YMIN,u=e.MBR_XMAX,c=e.MBR_YMAX,l=e.GEOMETRY_X,f=e.GEOMETRY_Y;if(null==a?(r=l-F,n=f-F,o=l+F,i=f+F):(r=a,n=s,o=u,i=c),"EPSG:27700"===t)return[r,n,o,i];if("EPSG:4326"===t){var p=new D(r,n).toLatLon(),d=new D(o,i).toLatLon();return[p.lon,p.lat,d.lon,d.lat].map(function(t){return Math.round(1e6*t)/1e6})}throw new Error("Unsupported CRS: ".concat(t))},U=function(t,e){var r=e.GEOMETRY_X,n=e.GEOMETRY_Y;if("EPSG:27700"===t)return[r,n];if("EPSG:4326"===t){var o=new D(r,n).toLatLon();return[Math.round(1e6*o.lon)/1e6,Math.round(1e6*o.lat)/1e6]}throw new Error("Unsupported CRS: ".concat(t))};function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function z(t){return function(t){if(Array.isArray(t))return q(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Y(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Y(t,e){if(t){if("string"==typeof t)return q(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(t,e):void 0}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function H(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return Z(c,"_invoke",function(r,n,o){var i,s,u,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,s=0,u=t,p.n=r,a}};function d(r,n){for(s=r,u=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],d=p.p,h=i[2];r>3?(o=h===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=p.n<0)?u:r.call(n,p))!==a)break}catch(e){i=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(Z(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Z(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,Z(f,"constructor",c),Z(c,"constructor",u),u.displayName="GeneratorFunction",Z(c,o,"GeneratorFunction"),Z(f),Z(f,o,"Generator"),Z(f,n,function(){return this}),Z(f,"toString",function(){return"[object Generator]"}),(H=function(){return{w:i,m:p}})()}function Z(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Z=function(t,e,r,n){function i(e,r){Z(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},Z(t,e,r,n)}function K(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function X(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){K(i,n,o,a,s,"next",t)}function s(t){K(i,n,o,a,s,"throw",t)}a(void 0)})}}var J=function(t){return t.replaceAll(/[^a-zA-Z0-9\s\-.,]/g,"").trim()},Q=function(t){var e=t.url,r=t.options;return new Request(e,r)},tt=function(){var t=X(H().m(function t(e,r,n){var o,i,a,s;return H().w(function(t){for(;;)switch(t.n){case 0:if(i={url:null===(o=e.urlTemplate)||void 0===o?void 0:o.replace("{query}",encodeURIComponent(r)),options:{method:"GET"}},!e.buildRequest){t.n=1;break}return a=e.buildRequest(r,function(){return i}),t.a(2,a instanceof Request?a:Q(a));case 1:if(!n){t.n=3;break}return s=Q,t.n=2,n(i,r);case 2:return t.a(2,s(t.v));case 3:return t.a(2,Q(i))}},t)}));return function(e,r,n){return t.apply(this,arguments)}}(),et=function(){var t=X(H().m(function t(e,r,n){var o,i,a;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,fetch(r);case 1:if((o=t.v).ok){t.n=2;break}return console.error("Fetch error for ".concat(e.label||"dataset",": ").concat(o.status)),t.a(2,{error:!0});case 2:return t.n=3,o.json();case 3:return i=t.v,t.a(2,e.parseResults(i,n));case 4:return t.p=4,a=t.v,console.error("Network error for ".concat(e.label||"dataset",":"),a),t.a(2,{error:!0})}},t,null,[[0,4]])}));return function(e,r,n){return t.apply(this,arguments)}}(),rt=function(){var t=X(H().m(function t(e,r,n,o){var i,a,s,u,c,l,f,p,d,h;return H().w(function(t){for(;;)switch(t.p=t.n){case 0:i=J(e),a=r.filter(function(t){var r=!t.includeRegex||t.includeRegex.test(e),n=!!t.excludeRegex&&t.excludeRegex.test(i);return r&&!n}),s=[],u=!1,c=V(a),t.p=1,c.s();case 2:if((l=c.n()).done){t.n=6;break}return f=l.value,t.n=3,tt(f,i,o);case 3:return p=t.v,t.n=4,et(f,p,i);case 4:if(null!=(d=t.v)&&d.error?u=!0:null!=d&&d.length&&(s=[].concat(z(s),z(d))),!f.exclusive||!s.length){t.n=5;break}return t.a(3,6);case 5:t.n=2;break;case 6:t.n=8;break;case 7:t.p=7,h=t.v,c.e(h);case 8:return t.p=8,c.f(),t.f(8);case 9:return n({type:"UPDATE_SUGGESTIONS",payload:{results:s,hasError:u}}),t.a(2,{results:s,sanitisedValue:i})}},t,null,[[1,7,8,9]])}));return function(e,r,n,o){return t.apply(this,arguments)}}();function nt(t){var e=t.mapProvider,r=t.bounds,n=t.point,o=t.markers,i=t.showMarker,a=t.markerOptions;e.fitToBounds(r),i&&o.add("search",n,a)}var ot=r(604);function it(t){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},it(t)}function at(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return st(c,"_invoke",function(r,n,o){var i,s,u,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,s=0,u=t,p.n=r,a}};function d(r,n){for(s=r,u=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],d=p.p,h=i[2];r>3?(o=h===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=p.n<0)?u:r.call(n,p))!==a)break}catch(e){i=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(st(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,st(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,st(f,"constructor",c),st(c,"constructor",u),u.displayName="GeneratorFunction",st(c,o,"GeneratorFunction"),st(f),st(f,o,"Generator"),st(f,n,function(){return this}),st(f,"toString",function(){return"[object Generator]"}),(at=function(){return{w:i,m:p}})()}function st(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}st=function(t,e,r,n){function i(e,r){st(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},st(t,e,r,n)}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach(function(e){lt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function lt(t,e,r){return(e=function(t){var e=function(t){if("object"!=it(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=it(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==it(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ft(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}var pt=function(t){var e=t.dispatch,r=t.services,n=t.viewportRef,o=t.mapProvider,i=t.markers,a=t.datasets,s=t.transformRequest,u=t.showMarker,c=t.markerOptions,l="";return{handleCloseClick:function(t,n){var o,a,s;e({type:"TOGGLE_EXPANDED",payload:!1}),e({type:"UPDATE_SUGGESTIONS",payload:{results:[],hasError:!1}}),e({type:"SET_VALUE",payload:""}),o=null==n?void 0:n.buttonRefs,a=0,s=function(){var t=function(t){var e;return(null==t||null===(e=t.current)||void 0===e?void 0:e.search)||document.querySelector(".im-c-map-button--search")}(o);t&&(t.focus(),document.activeElement===t)||a<30&&(a+=1,requestAnimationFrame(s))},requestAnimationFrame(s),i.remove("search"),r.eventBus.emit("search:clear"),r.eventBus.emit("search:close")},handleSubmit:function(t,f,p){return(d=at().m(function d(){var h,y,m,b,g,v,w,S,E,O,N,T;return at().w(function(d){for(;;)switch(d.n){case 0:if(t.preventDefault(),h=p.suggestions,y=p.selectedIndex,m=p.value,b=null==m?void 0:m.trim(),e({type:"SET_SELECTED",payload:-1}),e({type:"HIDE_SUGGESTIONS"}),!(y>=0)){d.n=1;break}return v=h[y],e({type:"SET_VALUE",payload:v.text}),null===(g=n.current)||void 0===g||g.focus(),nt({mapProvider:o,bounds:v.bounds,point:v.point,markers:i,showMarker:u,markerOptions:c}),r.eventBus.emit("search:match",ct({query:v.text},v)),d.a(2);case 1:if(!((null==b?void 0:b.length)<ot.z.minSearchLength)){d.n=2;break}return d.a(2);case 2:if(w=h,h.length&&b===l){d.n=4;break}return d.n=3,rt(b,a,e,s);case 3:S=d.v,E=S.results,O=S.sanitisedValue,w=E,l=O;case 4:w.length&&(null===(N=n.current)||void 0===N||N.focus(),"mobile"===f.breakpoint&&(e({type:"TOGGLE_EXPANDED",payload:!1}),r.eventBus.emit("search:close")),T=w[0],nt({mapProvider:o,bounds:T.bounds,point:T.point,markers:i,showMarker:u,markerOptions:c}),r.eventBus.emit("search:match",ct({query:m},T)));case 5:return d.a(2)}},d)}),function(){var t=this,e=arguments;return new Promise(function(r,n){var o=d.apply(t,e);function i(t){ft(o,r,n,i,a,"next",t)}function a(t){ft(o,r,n,i,a,"throw",t)}i(void 0)})})();var d}}};function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}function ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function yt(t,e,r){return(e=function(t){var e=function(t){if("object"!=dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?bt(Object(r),!0).forEach(function(e){vt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function vt(t,e,r){return(e=function(t){var e=function(t){if("object"!=mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wt(t){var e,r,n,o=t.dispatch,i=t.searchContainerRef,a=(e=function(e){return rt(e,t.datasets,o,t.transformRequest)},r=null,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){e.apply(void 0,n)},350)},n.cancel=function(){r&&(clearTimeout(r),r=null)},n),s=pt(t),u=function(t){var e=t.dispatch,r=t.debouncedFetchSuggestions;return{handleInputClick:function(){e({type:"SHOW_SUGGESTIONS"})},handleInputFocus:function(t){e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:"keyboard"===t})},handleInputBlur:function(t){e({type:"INPUT_BLUR",payload:t})},handleInputChange:function(t){var n=t.target.value;if(e({type:"SET_VALUE",payload:n}),n.length<ot.z.minSearchLength)return r.cancel(),e({type:"UPDATE_SUGGESTIONS",payload:{results:[],hasError:!1}}),void e({type:"HIDE_SUGGESTIONS"});e({type:"SHOW_SUGGESTIONS"}),r(n)}}}(gt(gt({},t),{},{debouncedFetchSuggestions:a})),c=function(t){var e=t.dispatch,r=t.services,n=t.mapProvider,o=t.markers,i=t.showMarker,a=t.markerOptions,s=t.viewportRef,u=function(t,e){var r;return e>=0?"".concat(null===(r=t[e])||void 0===r?void 0:r.text,". ").concat(e+1," of ").concat(t.length," is highlighted"):"".concat(t.length," suggestions available")};return{handleSuggestionClick:function(t,u){var c;e({type:"SET_VALUE",payload:t.text}),e({type:"HIDE_SUGGESTIONS"}),e({type:"SET_SELECTED",payload:-1}),"mobile"===u.breakpoint&&(e({type:"TOGGLE_EXPANDED",payload:!1}),r.eventBus.emit("search:close")),null===(c=s.current)||void 0===c||c.focus(),nt({mapProvider:n,bounds:t.bounds,point:t.point,markers:o,showMarker:i,markerOptions:a}),r.eventBus.emit("search:match",function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(r),!0).forEach(function(e){yt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({query:t.text},t))},handleInputKeyDown:function(t,n){var o=n.suggestions,i=n.selectedIndex;switch(t.key){case"ArrowDown":if(null==o||!o.length)return;if(t.preventDefault(),i<o.length-1){var a=i+1;r.announce(u(o,a)),e({type:"SET_SELECTED",payload:a}),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:!1})}break;case"ArrowUp":if(null==o||!o.length)return;t.preventDefault();var s=i>0?i-1:-1;r.announce(u(o,s)),e({type:"SET_SELECTED",payload:s}),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:s<0});break;case"Escape":t.preventDefault(),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:!0}),e({type:"HIDE_SUGGESTIONS"}),e({type:"SET_SELECTED",payload:-1})}}}}(t);return gt(gt(gt(gt({},s),u),c),{},{handleOutside:function(e){i.current.contains(e.target)||(o({type:"TOGGLE_EXPANDED",payload:!1}),t.services.eventBus.emit("search:close"))}})}function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}var Et=["marker"];function Ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Nt(t,e,r){return(e=function(t){var e=function(t){if("object"!=St(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==St(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Tt={reducer:{initialState:{isExpanded:!1,hasKeyboardFocusWithin:!1,value:"",suggestions:[],areSuggestionsVisible:!1,hasFetchedSuggestions:!1,hasSearchError:!1,selectedIndex:-1},actions:s},buttons:[{id:"search",label:"Search",iconId:"search",ariaControls:function(t){var e=t.appConfig;return"".concat(e.id,"-search-form")},excludeWhen:function(t){var e=t.pluginConfig;return Boolean(e.expanded)},keepFocus:!0,onClick:function(t,e){var r=e.pluginState,n=e.services;r.dispatch({type:"TOGGLE_EXPANDED",payload:!0}),n.eventBus.emit("search:open")},mobile:{slot:"top-right",showLabel:!1},tablet:{slot:"top-left",showLabel:!1},desktop:{slot:"top-left",showLabel:!1}}],controls:[{id:"search",mobile:{slot:"header"},tablet:{slot:"top-left"},desktop:{slot:"top-left"},render:function(t){var e=t.appConfig,r=t.iconRegistry,n=t.pluginState,o=t.pluginConfig,i=t.appState,a=t.mapState,s=t.services,l=t.mapProvider,f=e.id,p=i.interfaceType,d=o.expanded,h=o.customDatasets,g=o.osNamesURL,v=o.regions,w=o.maxSuggestions,S=n.dispatch,E=n.isExpanded,O=n.areSuggestionsVisible,N=n.suggestions,T=r.close,j=r.search,_=(0,u.useRef)(null),P=(0,u.useRef)(null),x=i.layoutRefs.viewportRef,G=function(t){var e,r=t.customDatasets,n=void 0===r?[]:r,o=t.osNamesURL,i=t.crs,a=t.regions,s=void 0===a?["england","scotland","wales"]:a,u=t.maxSuggestions;return o?[].concat([{name:"osNames",urlTemplate:o,parseResults:function(t,e){return function(t,e,r,n){var o,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:8;if(!t||t.error||0===(null===(o=t.header)||void 0===o?void 0:o.totalresults))return[];var a=t.results;return a=function(t,e){var r=e.toLowerCase().replace(/,/g,"").split(" ");return t.map($).filter(function(t){return r.some(function(r){return t.GAZETTEER_ENTRY.NAME1.toLowerCase().includes(r)||(n=(n=e).replace(/\s/g,""),/^(([A-Z]{1,2}\d[A-Z\d]?|ASCN|STHL|TDCU|BBND|[BFS]IQQ|PCRN|TKCA) ?\d[A-Z]{2}|BFPO ?\d{1,4}|(KY\d|MSR|VG|AI)[ -]?\d{4}|[A-Z]{2} ?\d{2}|GE ?CX|GIR ?0A{2}|SAN ?TA1)$/i.test(n));var n})})}(a,e),a=function(t,e){return t.filter(function(t){var r,n=null==t||null===(r=t.GAZETTEER_ENTRY)||void 0===r||null===(r=r.COUNTRY)||void 0===r?void 0:r.toLowerCase();return n&&e.includes(n)})}(a=function(t){return Array.from(new Map(t.map(function(t){return[t.GAZETTEER_ENTRY.ID,t]})).values())}(a),r),(a=a.slice(0,i)).map(function(t){return C(C({id:t.GAZETTEER_ENTRY.ID,bounds:W(n,t.GAZETTEER_ENTRY),point:U(n,t.GAZETTEER_ENTRY)},function(t,e){var r,n,o,i,a,s,u=e.NAME1,c=e.COUNTY_UNITARY,l=e.DISTRICT_BOROUGH,f=e.POSTCODE_DISTRICT,p=e.LOCAL_TYPE,d="".concat(["City","Postcode"].includes(p)?"":f+", ").concat("City"===p?"":c||l),h="".concat(u).concat(d?", "+d:"");return{text:h,marked:(r=h,n=t,a=n.replace(/\s+/g,"").split("").join(String.raw(A||(o=["s*"],(i=["\\s*"])||(i=o.slice(0)),A=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(i)}}))))),s=new RegExp("(".concat(a,")"),"i"),r.replace(s,"<mark>$1</mark>"))}}(e,t.GAZETTEER_ENTRY)),{},{type:"os-names"})})}(t,e,s,i,u)},includeRegex:/[a-zA-Z0-9]/,excludeRegex:/^(?:[a-z]{2}\s*(?:\d{3}\s*\d{3}|\d{4}\s*\d{4}|\d{5}\s*\d{5})|\d+\s*,?\s*\d+)$/i}],function(t){if(Array.isArray(t))return B(t)}(e=n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):n}({customDatasets:h,osNamesURL:g,regions:v,maxSuggestions:w,crs:l.crs}),k=(0,u.useRef)(null);if(!k.current){var D=o.marker,M=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(o,Et);k.current=wt(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(r),!0).forEach(function(e){Nt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({dispatch:S,datasets:G,services:s,mapProvider:l,viewportRef:x,searchContainerRef:_,markers:a.markers,markerOptions:D},M))}var R=k.current,I=E||!!(d&&O&&N.length);(0,u.useEffect)(function(){var t;E&&(null===(t=P.current)||void 0===t||t.focus())},[E]),(0,u.useLayoutEffect)(function(){if(i.dispatch({type:"TOGGLE_HAS_EXCLUSIVE_CONTROL",payload:E}),I)return x.current.style.pointerEvents="none",document.addEventListener("focusin",R.handleOutside),document.addEventListener("pointerdown",R.handleOutside),function(){x.current.style.pointerEvents="auto",document.removeEventListener("focusin",R.handleOutside),document.removeEventListener("pointerdown",R.handleOutside)}},[E,p,O,N]);var L=d||E;return(0,c.jsx)("div",{className:"im-c-search".concat(L?"":" im-c-search--collapsed"),ref:_,children:(0,c.jsxs)(y,{id:f,pluginState:n,pluginConfig:o,appState:i,inputRef:P,events:R,services:s,children:[(0,c.jsx)(m,{defaultExpanded:d,onClick:function(t){return R.handleCloseClick(t,i)},closeIcon:T}),(0,c.jsx)(b,{defaultExpanded:d,submitIcon:j})]})})}}],icons:[{id:"search",svgContent:'<path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle>'}]}}]]);
2
+ "use strict";(Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap||[]).push([[254],{523:function(t,e,r){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(e),r.d(e,{manifest:function(){return Mt}});var s={TOGGLE_EXPANDED:function(t,e){return i(i({},t),{},{isExpanded:e,areSuggestionsVisible:e,hasFetchedSuggestions:!1,hasSearchError:!1})},SET_KEYBOARD_FOCUS_WITHIN:function(t,e){return i(i({},t),{},{hasKeyboardFocusWithin:e,areSuggestionsVisible:!0})},INPUT_BLUR:function(t,e){return i(i({},t),{},{hasKeyboardFocusWithin:!1,areSuggestionsVisible:t.areSuggestionsVisible&&"keyboard"!==e,selectedIndex:-1})},SET_VALUE:function(t,e){return i(i({},t),{},{value:e})},UPDATE_SUGGESTIONS:function(t,e){return i(i({},t),{},{suggestions:e.results,hasFetchedSuggestions:!0,hasSearchError:e.hasError})},SHOW_SUGGESTIONS:function(t){return i(i({},t),{},{areSuggestionsVisible:!0,hasFetchedSuggestions:!1,hasSearchError:!1})},HIDE_SUGGESTIONS:function(t){return i(i({},t),{},{areSuggestionsVisible:!1,hasFetchedSuggestions:!1,hasSearchError:!1})},SET_SELECTED:function(t,e){return i(i({},t),{},{selectedIndex:e,areSuggestionsVisible:e>=0})}},u=r(738),c=r(287),l=/^<\/?mark>$/i,f=function(){var t=!1,e=0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/(<\/?mark>)/i).flatMap(function(r){var n=e;return e+=r.length,l.test(r)?(t="/"!==r[1],[]):r?[t?(0,c.jsx)("mark",{children:r},n):r]:[]})},p=function(t){var e=t.id,r=t.pluginState,n=t.handleSuggestionClick;return(0,c.jsx)("ul",{id:"".concat(e,"-search-suggestions"),role:"listbox","aria-labelledby":"".concat(e,"-search-input"),className:"im-c-search-suggestions",style:r.areSuggestionsVisible&&r.suggestions.length?void 0:{display:"none"},onMouseDown:function(t){return t.preventDefault()},children:r.suggestions.map(function(t,o){return(0,c.jsx)("li",{id:"".concat(e,"-search-suggestion-").concat(o),className:"im-c-search-suggestions__item",role:"option","aria-selected":r.selectedIndex===o,"aria-setsize":r.suggestions.length,"aria-posinset":o+1,onClick:function(){return n(t)},children:(0,c.jsx)("span",{className:"im-c-search-suggestions__label",children:f(t.marked)})},"".concat(e,"-").concat(t.type,"-").concat(t.id))})})};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function y(t,e,r){return(e=function(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var m=function(t,e,r){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(e){y(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({display:t.expanded||e.isExpanded?"flex":void 0},"mobile"!==r.breakpoint&&(null==t?void 0:t.width)&&{width:t.width})},b=function(t){var e=t.id,r=t.pluginState,n=t.pluginConfig,o=t.appState,i=t.inputRef,a=t.events,s=t.services,l=t.children,f=r.areSuggestionsVisible,d=r.hasFetchedSuggestions,h=r.hasSearchError,y=r.suggestions,b=void 0===y?[]:y,g=n.noResultsMessage,v=n.searchErrorMessage;(0,u.useEffect)(function(){f&&d&&s.announce(function(t,e,r,n){if(e)return r;if(0===t)return n;var o=1===t?"result":"results";return"".concat(t," ").concat(o," available")}(b.length,h,v,g))},[b,d]);var S=["im-c-search-form",n.expanded&&"im-c-search-form--default-expanded","im-c-panel"].filter(Boolean).join(" "),w=f&&d&&(h||!b.length);return(0,c.jsxs)("form",{id:"".concat(e,"-search-form"),role:"search",className:S,style:m(n,r,o),"aria-controls":"".concat(e,"-viewport"),onSubmit:function(t){return a.handleSubmit(t,o,r)},children:[(0,c.jsx)("button",{type:"submit",style:{display:"none"},"aria-hidden":"true",tabIndex:-1,children:"Submit"}),(0,c.jsxs)("div",{className:"im-c-search__input-container".concat(r.hasKeyboardFocusWithin?" im-c-search__input-container--keyboard-focus-within":""),children:[(0,c.jsx)("label",{htmlFor:"".concat(e,"-search-input"),className:"im-u-visually-hidden",children:n.placeholder}),(0,c.jsx)("input",{id:"".concat(e,"-search-input"),className:"im-c-search__input",type:"search",role:"combobox","aria-expanded":r.suggestionsVisible,"aria-controls":"".concat(e,"-search-suggestions"),"aria-activedescendant":r.selectedIndex>=0?"".concat(e,"-search-suggestion-").concat(r.selectedIndex):void 0,"aria-describedby":r.value?void 0:"".concat(e,"-search-hint"),"aria-autocomplete":"list",autoComplete:"off",placeholder:n.placeholder,name:"".concat(e,"-search-input"),spellCheck:!1,enterKeyHint:"search",value:r.value,onClick:a.handleInputClick,onChange:function(t){return a.handleInputChange(t,r)},onFocus:function(){return a.handleInputFocus(o.interfaceType)},onBlur:function(){return a.handleInputBlur(o.interfaceType)},onKeyDown:function(t){return a.handleInputKeyDown(t,r)},ref:i}),(0,c.jsx)("span",{id:"".concat(e,"-search-hint"),className:"im-c-search__hint",children:"When search results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."}),l]}),w&&(0,c.jsx)("div",{className:"im-c-search__status","aria-hidden":"true",children:h?v:g}),(0,c.jsx)(p,{id:e,appState:o,pluginState:r,handleSuggestionClick:function(t){return a.handleSuggestionClick(t,o)}})]})},g=function(t){var e=t.defaultExpanded,r=t.onClick,n=t.closeIcon;return(0,c.jsx)("button",{"aria-label":"Close search",className:"im-c-map-button im-c-search-close-button",type:"button",onClick:r,style:e?{display:"none"}:void 0,children:n&&(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:n}})})},v=function(t){var e=t.defaultExpanded,r=t.submitIcon;return(0,c.jsx)("button",{"aria-label":"Search",className:"im-c-map-button im-c-search-submit-button",type:"submit",style:e?void 0:{display:"none"},children:r&&(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",dangerouslySetInnerHTML:{__html:r}})})};let S=" ";class w{static get separator(){return S}static set separator(t){S=t}static parse(t){if(!isNaN(parseFloat(t))&&isFinite(t))return Number(t);const e=String(t).trim().replace(/^-/,"").replace(/[NSEW]$/i,"").split(/[^0-9.,]+/);if(""==e[e.length-1]&&e.splice(e.length-1),""==e)return NaN;let r=null;switch(e.length){case 3:r=e[0]/1+e[1]/60+e[2]/3600;break;case 2:r=e[0]/1+e[1]/60;break;case 1:r=e[0];break;default:return NaN}return/^-|[WS]$/i.test(t.trim())&&(r=-r),Number(r)}static toDms(t,e="d",r=void 0){if(isNaN(t))return null;if("string"==typeof t&&""==t.trim())return null;if("boolean"==typeof t)return null;if(t==1/0)return null;if(null==t)return null;if(void 0===r)switch(e){case"d":case"deg":r=4;break;case"dm":case"deg+min":r=2;break;case"dms":case"deg+min+sec":r=0;break;default:e="d",r=4}t=Math.abs(t);let n=null,o=null,i=null,a=null;switch(e){default:case"d":case"deg":o=t.toFixed(r),o<100&&(o="0"+o),o<10&&(o="0"+o),n=o+"°";break;case"dm":case"deg+min":o=Math.floor(t),i=(60*t%60).toFixed(r),60==i&&(i=(0).toFixed(r),o++),o=("000"+o).slice(-3),i<10&&(i="0"+i),n=o+"°"+w.separator+i+"′";break;case"dms":case"deg+min+sec":o=Math.floor(t),i=Math.floor(3600*t/60)%60,a=(3600*t%60).toFixed(r),60==a&&(a=(0).toFixed(r),i++),60==i&&(i=0,o++),o=("000"+o).slice(-3),i=("00"+i).slice(-2),a<10&&(a="0"+a),n=o+"°"+w.separator+i+"′"+w.separator+a+"″"}return n}static toLat(t,e,r){const n=w.toDms(w.wrap90(t),e,r);return null===n?"–":n.slice(1)+w.separator+(t<0?"S":"N")}static toLon(t,e,r){const n=w.toDms(w.wrap180(t),e,r);return null===n?"–":n+w.separator+(t<0?"W":"E")}static toBrng(t,e,r){const n=w.toDms(w.wrap360(t),e,r);return null===n?"–":n.replace("360","0")}static fromLocale(t){const e=123456.789.toLocaleString(),r={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(r.thousands,"⁜").replace(r.decimal,".").replace("⁜",",")}static toLocale(t){const e=123456.789.toLocaleString(),r={thousands:e.slice(3,4),decimal:e.slice(7,8)};return t.replace(/,([0-9])/,"⁜$1").replace(".",r.decimal).replace("⁜",r.thousands)}static compassPoint(t,e=3){if(![1,2,3].includes(Number(e)))throw new RangeError(`invalid precision ‘${e}’`);t=w.wrap360(t);const r=4*2**(e-1);return["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.round(t*r/360)%r*16/r]}static wrap90(t){if(-90<=t&&t<=90)return t;const e=t;return 1*Math.abs(((e-90)%360+360)%360-180)-90}static wrap180(t){if(-180<=t&&t<=180)return t;const e=360;return((360*t/e-180)%e+e)%e-180}static wrap360(t){if(0<=t&&t<360)return t;const e=360;return(360*t/e%e+e)%e}}Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var E=w;class O{constructor(t,e,r){if(isNaN(t)||isNaN(e)||isNaN(r))throw new TypeError(`invalid vector [${t},${e},${r}]`);this.x=Number(t),this.y=Number(e),this.z=Number(r)}get length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}plus(t){if(!(t instanceof O))throw new TypeError("v is not Vector3d object");return new O(this.x+t.x,this.y+t.y,this.z+t.z)}minus(t){if(!(t instanceof O))throw new TypeError("v is not Vector3d object");return new O(this.x-t.x,this.y-t.y,this.z-t.z)}times(t){if(isNaN(t))throw new TypeError(`invalid scalar value ‘${t}’`);return new O(this.x*t,this.y*t,this.z*t)}dividedBy(t){if(isNaN(t))throw new TypeError(`invalid scalar value ‘${t}’`);return new O(this.x/t,this.y/t,this.z/t)}dot(t){if(!(t instanceof O))throw new TypeError("v is not Vector3d object");return this.x*t.x+this.y*t.y+this.z*t.z}cross(t){if(!(t instanceof O))throw new TypeError("v is not Vector3d object");const e=this.y*t.z-this.z*t.y,r=this.z*t.x-this.x*t.z,n=this.x*t.y-this.y*t.x;return new O(e,r,n)}negate(){return new O(-this.x,-this.y,-this.z)}unit(){const t=this.length;if(1==t)return this;if(0==t)return this;const e=this.x/t,r=this.y/t,n=this.z/t;return new O(e,r,n)}angleTo(t,e=void 0){if(!(t instanceof O))throw new TypeError("v is not Vector3d object");if(!(e instanceof O||null==e))throw new TypeError("n is not Vector3d object");const r=null==e||this.cross(t).dot(e)>=0?1:-1,n=this.cross(t).length*r,o=this.dot(t);return Math.atan2(n,o)}rotateAround(t,e){if(!(t instanceof O))throw new TypeError("axis is not Vector3d object");const r=e.toRadians(),n=this.unit(),o=t.unit(),i=Math.sin(r),a=Math.cos(r),s=1-a,u=o.x,c=o.y,l=o.z,f=[[s*u*u+a,s*u*c-i*l,s*u*l+i*c],[s*u*c+i*l,s*c*c+a,s*c*l-i*u],[s*u*l-i*c,s*c*l+i*u,s*l*l+a]],p=[f[0][0]*n.x+f[0][1]*n.y+f[0][2]*n.z,f[1][0]*n.x+f[1][1]*n.y+f[1][2]*n.z,f[2][0]*n.x+f[2][1]*n.y+f[2][2]*n.z];return new O(p[0],p[1],p[2])}toString(t=3){return`[${this.x.toFixed(t)},${this.y.toFixed(t)},${this.z.toFixed(t)}]`}}Number.prototype.toRadians=function(){return this*Math.PI/180},Number.prototype.toDegrees=function(){return 180*this/Math.PI};var N=O;const T={WGS84:{a:6378137,b:6356752.314245,f:1/298.257223563}},j={WGS84:{ellipsoid:T.WGS84}};Object.freeze(T.WGS84),Object.freeze(j.WGS84);class x{constructor(t,e,r=0){if(isNaN(t)||null==t)throw new TypeError(`invalid lat ‘${t}’`);if(isNaN(e)||null==e)throw new TypeError(`invalid lon ‘${e}’`);if(isNaN(r)||null==r)throw new TypeError(`invalid height ‘${r}’`);this._lat=E.wrap90(Number(t)),this._lon=E.wrap180(Number(e)),this._height=Number(r)}get lat(){return this._lat}get latitude(){return this._lat}set lat(t){if(this._lat=isNaN(t)?E.wrap90(E.parse(t)):E.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid lat ‘${t}’`)}set latitude(t){if(this._lat=isNaN(t)?E.wrap90(E.parse(t)):E.wrap90(Number(t)),isNaN(this._lat))throw new TypeError(`invalid latitude ‘${t}’`)}get lon(){return this._lon}get lng(){return this._lon}get longitude(){return this._lon}set lon(t){if(this._lon=isNaN(t)?E.wrap180(E.parse(t)):E.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lon ‘${t}’`)}set lng(t){if(this._lon=isNaN(t)?E.wrap180(E.parse(t)):E.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid lng ‘${t}’`)}set longitude(t){if(this._lon=isNaN(t)?E.wrap180(E.parse(t)):E.wrap180(Number(t)),isNaN(this._lon))throw new TypeError(`invalid longitude ‘${t}’`)}get height(){return this._height}set height(t){if(this._height=Number(t),isNaN(this._height))throw new TypeError(`invalid height ‘${t}’`)}get datum(){return this._datum}set datum(t){this._datum=t}static get ellipsoids(){return T}static get datums(){return j}static parse(...t){if(0==t.length)throw new TypeError("invalid (empty) point");let e,r,n;if("object"==typeof t[0]&&(1==t.length||!isNaN(parseFloat(t[1])))){const o=t[0];if("Point"==o.type&&Array.isArray(o.coordinates)?([r,e,n]=o.coordinates,n=n||0):(null!=o.latitude&&(e=o.latitude),null!=o.lat&&(e=o.lat),null!=o.longitude&&(r=o.longitude),null!=o.lng&&(r=o.lng),null!=o.lon&&(r=o.lon),null!=o.height&&(n=o.height),e=E.wrap90(E.parse(e)),r=E.wrap180(E.parse(r))),null!=t[1]&&(n=t[1]),isNaN(e)||isNaN(r))throw new TypeError(`invalid point ‘${JSON.stringify(t[0])}’`)}if("string"==typeof t[0]&&2==t[0].split(",").length&&([e,r]=t[0].split(","),e=E.wrap90(E.parse(e)),r=E.wrap180(E.parse(r)),n=t[1]||0,isNaN(e)||isNaN(r)))throw new TypeError(`invalid point ‘${t[0]}’`);if(null==e&&null==r&&([e,r]=t,e=E.wrap90(E.parse(e)),r=E.wrap180(E.parse(r)),n=t[2]||0,isNaN(e)||isNaN(r)))throw new TypeError(`invalid point ‘${t.toString()}’`);return new this(e,r,n)}toCartesian(){const t=this.datum?this.datum.ellipsoid:this.referenceFrame?this.referenceFrame.ellipsoid:T.WGS84,e=this.lat.toRadians(),r=this.lon.toRadians(),n=this.height,{a:o,f:i}=t,a=Math.sin(e),s=Math.cos(e),u=Math.sin(r),c=Math.cos(r),l=2*i-i*i,f=o/Math.sqrt(1-l*a*a);return new _((f+n)*s*c,(f+n)*s*u,(f*(1-l)+n)*a)}equals(t){if(!(t instanceof x))throw new TypeError(`invalid point ‘${t}’`);return!(Math.abs(this.lat-t.lat)>Number.EPSILON||Math.abs(this.lon-t.lon)>Number.EPSILON||Math.abs(this.height-t.height)>Number.EPSILON||this.datum!=t.datum||this.referenceFrame!=t.referenceFrame||this.epoch!=t.epoch)}toString(t="d",e=void 0,r=null){if(!["d","dm","dms","n"].includes(t))throw new RangeError(`invalid format ‘${t}’`);const n=(this.height>=0?" +":" ")+this.height.toFixed(r)+"m";return"n"==t?(null==e&&(e=4),`${this.lat.toFixed(e)}, ${this.lon.toFixed(e)}${null==r?"":n}`):`${E.toLat(this.lat,t,e)}, ${E.toLon(this.lon,t,e)}${null==r?"":n}`}}class _ extends N{constructor(t,e,r){super(t,e,r)}toLatLon(t=T.WGS84){if(!t||!t.a)throw new TypeError(`invalid ellipsoid ‘${t}’`);const{x:e,y:r,z:n}=this,{a:o,b:i,f:a}=t,s=2*a-a*a,u=s/(1-s),c=Math.sqrt(e*e+r*r),l=i*n/(o*c)*(1+u*i/Math.sqrt(c*c+n*n)),f=l/Math.sqrt(1+l*l),p=f/l,d=isNaN(p)?0:Math.atan2(n+u*i*f*f*f,c-s*o*p*p*p),h=Math.atan2(r,e),y=Math.sin(d),m=c*Math.cos(d)+n*y-o*o/(o/Math.sqrt(1-s*y*y));return new x(d.toDegrees(),h.toDegrees(),m)}toString(t=0){return`[${this.x.toFixed(t)},${this.y.toFixed(t)},${this.z.toFixed(t)}]`}}const P={WGS84:{a:6378137,b:6356752.314245,f:1/298.257223563},Airy1830:{a:6377563.396,b:6356256.909,f:1/299.3249646},AiryModified:{a:6377340.189,b:6356034.448,f:1/299.3249646},Bessel1841:{a:6377397.155,b:6356078.962818,f:1/299.1528128},Clarke1866:{a:6378206.4,b:6356583.8,f:1/294.978698214},Clarke1880IGN:{a:6378249.2,b:6356515,f:1/293.466021294},GRS80:{a:6378137,b:6356752.31414,f:1/298.257222101},Intl1924:{a:6378388,b:6356911.946,f:1/297},WGS72:{a:6378135,b:6356750.5,f:1/298.26}},k={ED50:{ellipsoid:P.Intl1924,transform:[89.5,93.8,123.1,-1.2,0,0,.156]},ETRS89:{ellipsoid:P.GRS80,transform:[0,0,0,0,0,0,0]},Irl1975:{ellipsoid:P.AiryModified,transform:[-482.53,130.596,-564.557,-8.15,1.042,.214,.631]},NAD27:{ellipsoid:P.Clarke1866,transform:[8,-160,-176,0,0,0,0]},NAD83:{ellipsoid:P.GRS80,transform:[.9956,-1.9103,-.5215,-62e-5,.025915,.009426,.011599]},NTF:{ellipsoid:P.Clarke1880IGN,transform:[168,60,-320,0,0,0,0]},OSGB36:{ellipsoid:P.Airy1830,transform:[-446.448,125.157,-542.06,20.4894,-.1502,-.247,-.8421]},Potsdam:{ellipsoid:P.Bessel1841,transform:[-582,-105,-414,-8.3,1.04,.35,-3.08]},TokyoJapan:{ellipsoid:P.Bessel1841,transform:[148,-507,-685,0,0,0,0]},WGS72:{ellipsoid:P.WGS72,transform:[0,0,-4.5,-.22,0,0,.554]},WGS84:{ellipsoid:P.WGS84,transform:[0,0,0,0,0,0,0]}};Object.keys(P).forEach(t=>Object.freeze(P[t])),Object.keys(k).forEach(t=>{Object.freeze(k[t]),Object.freeze(k[t].transform)});class A extends x{constructor(t,e,r=0,n=k.WGS84){if(!n||null==n.ellipsoid)throw new TypeError(`unrecognised datum ‘${n}’`);super(t,e,r),this._datum=n}get datum(){return this._datum}static get ellipsoids(){return P}static get datums(){return k}static parse(...t){let e=k.WGS84;if((4==t.length||3==t.length&&"object"==typeof t[2])&&(e=t.pop()),!e||null==e.ellipsoid)throw new TypeError(`unrecognised datum ‘${e}’`);const r=super.parse(...t);return r._datum=e,r}convertDatum(t){if(!t||null==t.ellipsoid)throw new TypeError(`unrecognised datum ‘${t}’`);return this.toCartesian().convertDatum(t).toLatLon()}toCartesian(){const t=super.toCartesian();return new M(t.x,t.y,t.z,this.datum)}}class M extends _{constructor(t,e,r,n=void 0){if(n&&null==n.ellipsoid)throw new TypeError(`unrecognised datum ‘${n}’`);super(t,e,r),n&&(this._datum=n)}get datum(){return this._datum}set datum(t){if(!t||null==t.ellipsoid)throw new TypeError(`unrecognised datum ‘${t}’`);this._datum=t}toLatLon(t=void 0){t&&(console.info("datum parameter to Cartesian_Datum.toLatLon is deprecated: set datum before calling toLatLon()"),this.datum=t);const e=this.datum||k.WGS84;if(!e||null==e.ellipsoid)throw new TypeError(`unrecognised datum ‘${e}’`);const r=super.toLatLon(e.ellipsoid);return new A(r.lat,r.lon,r.height,this.datum)}convertDatum(t){if(!t||null==t.ellipsoid)throw new TypeError(`unrecognised datum ‘${t}’`);if(!this.datum)throw new TypeError("cartesian coordinate has no datum");let e=null,r=null;null!=this.datum&&this.datum!=k.WGS84||(e=this,r=t.transform),t==k.WGS84&&(e=this,r=this.datum.transform.map(t=>-t)),null==r&&(e=this.convertDatum(k.WGS84),r=t.transform);const n=e.applyTransform(r);return n.datum=t,n}applyTransform(t){const{x:e,y:r,z:n}=this,o=t[0],i=t[1],a=t[2],s=t[3]/1e6+1,u=(t[4]/3600).toRadians(),c=(t[5]/3600).toRadians(),l=(t[6]/3600).toRadians();return new M(o+e*s-r*l+n*c,i+e*l+r*s-n*u,a-e*c+r*u+n*s)}}const D={trueOrigin:{lat:49,lon:-2},falseOrigin:{easting:-4e5,northing:1e5},scaleFactor:.9996012717,ellipsoid:A.ellipsoids.Airy1830};class G{constructor(t,e){if(this.easting=Number(t),this.northing=Number(e),isNaN(t)||this.easting<0||this.easting>7e5)throw new RangeError(`invalid easting ‘${t}’`);if(isNaN(e)||this.northing<0||this.northing>13e5)throw new RangeError(`invalid northing ‘${e}’`)}toLatLon(t=A.datums.WGS84){const{easting:e,northing:r}=this,{a:n,b:o}=D.ellipsoid,i=D.trueOrigin.lat.toRadians(),a=D.trueOrigin.lon.toRadians(),s=-D.falseOrigin.easting,u=-D.falseOrigin.northing,c=D.scaleFactor,l=1-o*o/(n*n),f=(n-o)/(n+o),p=f*f,d=f*f*f;let h=i,y=0;do{h=(r-u-y)/(n*c)+h,y=o*c*((1+f+5/4*p+5/4*d)*(h-i)-(3*f+3*f*f+21/8*d)*Math.sin(h-i)*Math.cos(h+i)+(15/8*p+15/8*d)*Math.sin(2*(h-i))*Math.cos(2*(h+i))-35/24*d*Math.sin(3*(h-i))*Math.cos(3*(h+i)))}while(Math.abs(r-u-y)>=1e-5);const m=Math.cos(h),b=Math.sin(h),g=n*c/Math.sqrt(1-l*b*b),v=n*c*(1-l)/Math.pow(1-l*b*b,1.5),S=g/v-1,w=Math.tan(h),E=w*w,O=E*E,N=1/m,T=g*g*g,j=T*g*g,x=e-s,_=x*x,P=_*x,k=_*_,M=P*_;h=h-w/(2*v*g)*_+w/(24*v*T)*(5+3*E+S-9*E*S)*k-w/(720*v*j)*(61+90*E+45*O)*(k*_);const G=a+N/g*x-N/(6*T)*(g/v+2*E)*P+N/(120*j)*(5+28*E+24*O)*M-N/(j*g*g*5040)*(61+662*E+1320*O+O*E*720)*(M*_);let I=new R(h.toDegrees(),G.toDegrees(),0,A.datums.OSGB36);return t!=A.datums.OSGB36&&(I=I.convertDatum(t),I=new R(I.lat,I.lon,I.height,I.datum)),I}static parse(t){let e=(t=String(t).trim()).match(/^(\d+),\s*(\d+)$/);if(e)return new G(e[1],e[2]);if(e=t.match(/^[HNST][ABCDEFGHJKLMNOPQRSTUVWXYZ]\s*[0-9]+\s*[0-9]+$/i),!e)throw new Error(`invalid grid reference ‘${t}’`);let r=t.toUpperCase().charCodeAt(0)-"A".charCodeAt(0),n=t.toUpperCase().charCodeAt(1)-"A".charCodeAt(0);r>7&&r--,n>7&&n--;const o=(r-2)%5*5+n%5,i=19-5*Math.floor(r/5)-Math.floor(n/5);let a=t.slice(2).trim().split(/\s+/);if(1==a.length&&(a=[a[0].slice(0,a[0].length/2),a[0].slice(a[0].length/2)]),a[0].length!=a[1].length)throw new Error(`invalid grid reference ‘${t}’`);a[0]=a[0].padEnd(5,"0"),a[1]=a[1].padEnd(5,"0");const s=o+a[0],u=i+a[1];return new G(s,u)}toString(t=10){if(![0,2,4,6,8,10,12,14,16].includes(Number(t)))throw new RangeError(`invalid precision ‘${t}’`);let{easting:e,northing:r}=this;if(0==t){const t={useGrouping:!1,minimumIntegerDigits:6,maximumFractionDigits:3};return`${e.toLocaleString("en",t)},${r.toLocaleString("en",t)}`}const n=Math.floor(e/1e5),o=Math.floor(r/1e5);let i=19-o-(19-o)%5+Math.floor((n+10)/5),a=5*(19-o)%25+n%5;i>7&&i++,a>7&&a++;const s=String.fromCharCode(i+"A".charCodeAt(0),a+"A".charCodeAt(0));return e=Math.floor(e%1e5/Math.pow(10,5-t/2)),r=Math.floor(r%1e5/Math.pow(10,5-t/2)),e=e.toString().padStart(t/2,"0"),r=r.toString().padStart(t/2,"0"),`${s} ${e} ${r}`}}class R extends A{toOsGrid(){const t=this.datum==A.datums.OSGB36?this:this.convertDatum(A.datums.OSGB36),e=t.lat.toRadians(),r=t.lon.toRadians(),{a:n,b:o}=D.ellipsoid,i=D.trueOrigin.lat.toRadians(),a=D.trueOrigin.lon.toRadians(),s=-D.falseOrigin.easting,u=-D.falseOrigin.northing,c=D.scaleFactor,l=1-o*o/(n*n),f=(n-o)/(n+o),p=f*f,d=f*f*f,h=Math.cos(e),y=Math.sin(e),m=n*c/Math.sqrt(1-l*y*y),b=n*c*(1-l)/Math.pow(1-l*y*y,1.5),g=m/b-1,v=o*c*((1+f+5/4*p+5/4*d)*(e-i)-(3*f+3*f*f+21/8*d)*Math.sin(e-i)*Math.cos(e+i)+(15/8*p+15/8*d)*Math.sin(2*(e-i))*Math.cos(2*(e+i))-35/24*d*Math.sin(3*(e-i))*Math.cos(3*(e+i))),S=h*h*h,w=S*h*h,E=Math.tan(e)*Math.tan(e),O=E*E,N=r-a,T=N*N,j=T*N,x=j*N,_=x*N;let P=v+u+m/2*y*h*T+m/24*y*S*(5-E+9*g)*x+m/720*y*w*(61-58*E+O)*(_*N),k=s+m*h*N+m/6*S*(m/b-E)*j+m/120*w*(5-18*E+O+14*g-58*E*g)*_;P=Number(P.toFixed(3)),k=Number(k.toFixed(3));try{return new G(k,P)}catch(e){throw new Error(`${e.message} from (${t.lat.toFixed(6)},${t.lon.toFixed(6)}).toOsGrid()`)}}convertDatum(t){const e=super.convertDatum(t);return new R(e.lat,e.lon,e.height,e.datum)}}function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}var C,L;function $(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function F(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$(Object(r),!0).forEach(function(e){W(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function W(t,e,r){return(e=function(t){var e=function(t){if("object"!=I(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==I(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U(t){return function(t){if(Array.isArray(t))return B(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function z(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Y=500,V=function(t){var e=t.GAZETTEER_ENTRY,r="eng"===e.NAME2_LANG?e.NAME2:e.NAME1;return t.GAZETTEER_ENTRY.NAME1=r,t.GAZETTEER_ENTRY.NAME1_LANG="eng",t},q=function(t){return t.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw(C||(C=z(["$&"],["\\$&"]))))},H=function(t,e){var r,n,o,i,a=e.MBR_XMIN,s=e.MBR_YMIN,u=e.MBR_XMAX,c=e.MBR_YMAX,l=e.GEOMETRY_X,f=e.GEOMETRY_Y;if(null==a?(r=l-Y,n=f-Y,o=l+Y,i=f+Y):(r=a,n=s,o=u,i=c),"EPSG:27700"===t)return[r,n,o,i];if("EPSG:4326"===t){var p=new G(r,n).toLatLon(),d=new G(o,i).toLatLon();return[p.lon,p.lat,d.lon,d.lat].map(function(t){return Math.round(1e6*t)/1e6})}throw new Error("Unsupported CRS: ".concat(t))},K=function(t,e){var r=e.GEOMETRY_X,n=e.GEOMETRY_Y;if("EPSG:27700"===t)return[r,n];if("EPSG:4326"===t){var o=new G(r,n).toLatLon();return[Math.round(1e6*o.lon)/1e6,Math.round(1e6*o.lat)/1e6]}throw new Error("Unsupported CRS: ".concat(t))};function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function X(t){return function(t){if(Array.isArray(t))return tt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Q(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Q(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Q(t,e){if(t){if("string"==typeof t)return tt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tt(t,e):void 0}}function tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function et(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return rt(c,"_invoke",function(r,n,o){var i,s,u,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,s=0,u=t,p.n=r,a}};function d(r,n){for(s=r,u=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],d=p.p,h=i[2];r>3?(o=h===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=p.n<0)?u:r.call(n,p))!==a)break}catch(e){i=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(rt(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,rt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,rt(f,"constructor",c),rt(c,"constructor",u),u.displayName="GeneratorFunction",rt(c,o,"GeneratorFunction"),rt(f),rt(f,o,"Generator"),rt(f,n,function(){return this}),rt(f,"toString",function(){return"[object Generator]"}),(et=function(){return{w:i,m:p}})()}function rt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}rt=function(t,e,r,n){function i(e,r){rt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},rt(t,e,r,n)}function nt(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function ot(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){nt(i,n,o,a,s,"next",t)}function s(t){nt(i,n,o,a,s,"throw",t)}a(void 0)})}}var it=function(t){return t.replaceAll(/[^a-zA-Z0-9\s\-.,]/g,"").trim()},at=function(t){var e=t.url,r=t.options;return new Request(e,r)},st=function(){var t=ot(et().m(function t(e,r,n){var o,i,a,s;return et().w(function(t){for(;;)switch(t.n){case 0:if(i={url:null===(o=e.urlTemplate)||void 0===o?void 0:o.replace("{query}",encodeURIComponent(r)),options:{method:"GET"}},!e.buildRequest){t.n=1;break}return a=e.buildRequest(r,function(){return i}),t.a(2,a instanceof Request?a:at(a));case 1:if(!n){t.n=3;break}return s=at,t.n=2,n(i,r);case 2:return t.a(2,s(t.v));case 3:return t.a(2,at(i))}},t)}));return function(e,r,n){return t.apply(this,arguments)}}(),ut=function(){var t=ot(et().m(function t(e,r,n){var o,i,a;return et().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,fetch(r);case 1:if((o=t.v).ok){t.n=2;break}return console.error("Fetch error for ".concat(e.label||"dataset",": ").concat(o.status)),t.a(2,{error:!0});case 2:return t.n=3,o.json();case 3:return i=t.v,t.a(2,e.parseResults(i,n));case 4:return t.p=4,a=t.v,console.error("Network error for ".concat(e.label||"dataset",":"),a),t.a(2,{error:!0})}},t,null,[[0,4]])}));return function(e,r,n){return t.apply(this,arguments)}}(),ct=function(){var t=ot(et().m(function t(e,r,n,o){var i,a,s,u,c,l,f,p,d,h;return et().w(function(t){for(;;)switch(t.p=t.n){case 0:i=it(e),a=r.filter(function(t){var r=!t.includeRegex||t.includeRegex.test(e),n=!!t.excludeRegex&&t.excludeRegex.test(i);return r&&!n}),s=[],u=!1,c=J(a),t.p=1,c.s();case 2:if((l=c.n()).done){t.n=6;break}return f=l.value,t.n=3,st(f,i,o);case 3:return p=t.v,t.n=4,ut(f,p,i);case 4:if(null!=(d=t.v)&&d.error?u=!0:null!=d&&d.length&&(s=[].concat(X(s),X(d))),!f.exclusive||!s.length){t.n=5;break}return t.a(3,6);case 5:t.n=2;break;case 6:t.n=8;break;case 7:t.p=7,h=t.v,c.e(h);case 8:return t.p=8,c.f(),t.f(8);case 9:return n({type:"UPDATE_SUGGESTIONS",payload:{results:s,hasError:u}}),t.a(2,{results:s,sanitisedValue:i})}},t,null,[[1,7,8,9]])}));return function(e,r,n,o){return t.apply(this,arguments)}}(),lt=r(604);function ft(t){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(t)}function pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function dt(t,e,r){return(e=function(t){var e=function(t){if("object"!=ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ht=function(t){var e=t.suggestion,r=t.query,n=t.services,o=t.mapProvider,i=t.markers,a=t.showMarker,s=t.markerOptions;n.focusMap({message:lt.cr.replace("{query}",r)}),function(t){var e=t.bounds,r=t.point,n=t.markers,o=t.showMarker,i=t.markerOptions;t.mapProvider.fitToBounds(e),o&&n.add("search",r,i)}({mapProvider:o,bounds:e.bounds,point:e.point,markers:i,showMarker:a,markerOptions:s}),n.eventBus.emit("search:match",function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(r),!0).forEach(function(e){dt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({query:r},e))};function yt(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return mt(c,"_invoke",function(r,n,o){var i,s,u,c=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,s=0,u=t,p.n=r,a}};function d(r,n){for(s=r,u=n,e=0;!f&&c&&!o&&e<l.length;e++){var o,i=l[e],d=p.p,h=i[2];r>3?(o=h===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=d&&((o=r<2&&d<i[1])?(s=0,p.v=n,p.n=i[1]):d<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,p.n=h,s=0))}if(o||r>1)return a;throw f=!0,n}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){i||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(f=p.n<0)?u:r.call(n,p))!==a)break}catch(e){i=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(r,o,i),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(mt(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,mt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,mt(f,"constructor",c),mt(c,"constructor",u),u.displayName="GeneratorFunction",mt(c,o,"GeneratorFunction"),mt(f),mt(f,o,"Generator"),mt(f,n,function(){return this}),mt(f,"toString",function(){return"[object Generator]"}),(yt=function(){return{w:i,m:p}})()}function mt(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}mt=function(t,e,r,n){function i(e,r){mt(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},mt(t,e,r,n)}function bt(t,e,r,n,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}var gt=function(t){var e;return(null==t||null===(e=t.current)||void 0===e?void 0:e.search)||document.querySelector(".im-c-map-button--search")},vt=function(t){var e=t.dispatch,r=t.services,n=t.searchContainerRef,o=t.mapProvider,i=t.markers,a=t.datasets,s=t.transformRequest,u=t.showMarker,c=t.markerOptions,l="";return{handleTabOut:function(t,e){!function(t,e,r){var n,o=gt(e);if("Tab"===t.key&&o){var i=Array.from(document.querySelectorAll("input, button, select, textarea, a[href], [tabindex]")).filter(function(t){return t.tabIndex>=0&&!t.disabled&&t.getClientRects().length>0}),a=i[i.indexOf(t.target)+(t.shiftKey?-1:1)];if(null===(n=r.current)||void 0===n||!n.contains(a)){var s=t.shiftKey?o:i[i.indexOf(o)+1];s&&(t.preventDefault(),s.focus())}}}(t,e,n)},handleCloseClick:function(t,n){var o,a,s;e({type:"TOGGLE_EXPANDED",payload:!1}),e({type:"UPDATE_SUGGESTIONS",payload:{results:[],hasError:!1}}),e({type:"SET_VALUE",payload:""}),o=null==n?void 0:n.buttonRefs,a=0,s=function(){var t=gt(o);t&&(t.focus(),document.activeElement===t)||a<30&&(a+=1,requestAnimationFrame(s))},requestAnimationFrame(s),i.remove("search"),r.eventBus.emit("search:clear"),r.eventBus.emit("search:close")},handleSubmit:function(t,n,f){return(p=yt().m(function p(){var d,h,y,m,b,g,v,S,w;return yt().w(function(p){for(;;)switch(p.n){case 0:if(t.preventDefault(),d=f.suggestions,h=f.selectedIndex,y=f.value,m=null==y?void 0:y.trim(),e({type:"SET_SELECTED",payload:-1}),e({type:"HIDE_SUGGESTIONS"}),!(h>=0)){p.n=1;break}return b=d[h],e({type:"SET_VALUE",payload:b.text}),ht({suggestion:b,query:b.text,services:r,mapProvider:o,markers:i,showMarker:u,markerOptions:c}),p.a(2);case 1:if(!((null==m?void 0:m.length)<lt.zY.minSearchLength)){p.n=2;break}return p.a(2);case 2:if(g=d,d.length&&m===l){p.n=4;break}return p.n=3,ct(m,a,e,s);case 3:v=p.v,S=v.results,w=v.sanitisedValue,g=S,l=w;case 4:g.length&&("mobile"===n.breakpoint&&(e({type:"TOGGLE_EXPANDED",payload:!1}),r.eventBus.emit("search:close")),ht({suggestion:g[0],query:y,services:r,mapProvider:o,markers:i,showMarker:u,markerOptions:c}));case 5:return p.a(2)}},p)}),function(){var t=this,e=arguments;return new Promise(function(r,n){var o=p.apply(t,e);function i(t){bt(o,r,n,i,a,"next",t)}function a(t){bt(o,r,n,i,a,"throw",t)}i(void 0)})})();var p}}};function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function wt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function Et(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(r),!0).forEach(function(e){Ot(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ot(t,e,r){return(e=function(t){var e=function(t){if("object"!=St(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==St(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nt(t){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}var Tt=["marker"];function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function xt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}var Pt,kt,At,Mt={reducer:{initialState:{isExpanded:!1,hasKeyboardFocusWithin:!1,value:"",suggestions:[],areSuggestionsVisible:!1,hasFetchedSuggestions:!1,hasSearchError:!1,selectedIndex:-1},actions:s},applicationModes:(Pt={},kt=lt.V3,At={},(kt=function(t){var e=function(t){if("object"!=_t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_t(e)?e:e+""}(kt))in Pt?Object.defineProperty(Pt,kt,{value:At,enumerable:!0,configurable:!0,writable:!0}):Pt[kt]=At,Pt),buttons:[{id:"search",label:"Search",iconId:"search",ariaControls:function(t){var e=t.appConfig;return"".concat(e.id,"-search-form")},expandedWhen:function(t){return t.pluginState.isExpanded},excludeWhen:function(t){var e=t.pluginConfig;return Boolean(e.expanded)},keepFocus:!0,onClick:function(t,e){var r=e.pluginState,n=e.services;r.dispatch({type:"TOGGLE_EXPANDED",payload:!0}),n.eventBus.emit("search:open")},mobile:{slot:"top-right",showLabel:!1},tablet:{slot:"top-left",showLabel:!1},desktop:{slot:"top-left",showLabel:!1}}],controls:[{id:"search",mobile:{slot:"header"},tablet:{slot:"top-left"},desktop:{slot:"top-left"},render:function(t){var e=t.appConfig,r=t.iconRegistry,n=t.pluginState,o=t.pluginConfig,i=t.appState,a=t.mapState,s=t.services,l=t.mapProvider,f=t.setApplicationMode,p=t.clearApplicationMode,d=e.id,h=i.interfaceType,y=o.expanded,m=o.customDatasets,S=o.osNamesURL,w=o.regions,E=o.maxSuggestions,O=n.dispatch,N=n.isExpanded,T=n.areSuggestionsVisible,j=n.suggestions,x=r.close,_=r.search,P=(0,u.useRef)(null),k=(0,u.useRef)(null),A=i.layoutRefs.viewportRef,M=function(t){var e=t.customDatasets,r=void 0===e?[]:e,n=t.osNamesURL,o=t.crs,i=t.regions,a=void 0===i?["england","scotland","wales"]:i,s=t.maxSuggestions;return n?[].concat([{name:"osNames",urlTemplate:n,parseResults:function(t,e){return function(t,e,r,n){var o,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:8;if(!t||t.error||0===(null===(o=t.header)||void 0===o?void 0:o.totalresults))return[];var a=t.results;return a=function(t,e){var r=e.toLowerCase().replaceAll(",","").split(" ");return t.map(V).filter(function(t){return r.some(function(r){return t.GAZETTEER_ENTRY.NAME1.toLowerCase().includes(r)||(n=(n=e).replaceAll(/\s/g,""),/^(([A-Z]{1,2}\d[A-Z\d]?|ASCN|STHL|TDCU|BBND|[BFS]IQQ|PCRN|TKCA) ?\d[A-Z]{2}|BFPO ?\d{1,4}|(KY\d|MSR|VG|AI)[ -]?\d{4}|[A-Z]{2} ?\d{2}|GE ?CX|GIR ?0A{2}|SAN ?TA1)$/i.test(n));var n})})}(a,e),a=function(t,e){return t.filter(function(t){var r,n=null==t||null===(r=t.GAZETTEER_ENTRY)||void 0===r||null===(r=r.COUNTRY)||void 0===r?void 0:r.toLowerCase();return n&&e.includes(n)})}(a=function(t){return Array.from(new Map(t.map(function(t){return[t.GAZETTEER_ENTRY.ID,t]})).values())}(a),r),(a=a.slice(0,i)).map(function(t){return F(F({id:t.GAZETTEER_ENTRY.ID,bounds:H(n,t.GAZETTEER_ENTRY),point:K(n,t.GAZETTEER_ENTRY)},function(t,e){var r,n,o,i,a=e.NAME1,s=e.COUNTY_UNITARY,u=e.DISTRICT_BOROUGH,c=e.POSTCODE_DISTRICT,l=e.LOCAL_TYPE,f="".concat(["City","Postcode"].includes(l)?"":c+", ").concat("City"===l?"":s||u),p="".concat(a).concat(f?", "+f:"");return{text:p,marked:(r=p,n=t,o=U(n.replaceAll(/\s+/g,"")).map(q).join(String.raw(L||(L=z(["s*"],["\\s*"])))),i=new RegExp("(".concat(o,")"),"i"),r.replace(i,"<mark>$1</mark>"))}}(e,t.GAZETTEER_ENTRY)),{},{type:"os-names"})})}(t,e,a,o,s)},includeRegex:/[a-zA-Z0-9]/,excludeRegex:/^(?:[a-z]{2}\s*(?:\d{3}\s*\d{3}|\d{4}\s*\d{4}|\d{5}\s*\d{5})|\d+\s*,?\s*\d+)$/i}],function(t){return function(t){if(Array.isArray(t))return Z(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r)):r}({customDatasets:m,osNamesURL:S,regions:w,maxSuggestions:E,crs:l.crs}),D=(0,u.useRef)(null);if(!D.current){var G=o.marker,R=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(o,Tt);D.current=function(t){var e,r,n,o=t.dispatch,i=t.searchContainerRef,a=(e=function(e){return ct(e,t.datasets,o,t.transformRequest)},r=null,n=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];clearTimeout(r),r=setTimeout(function(){e.apply(void 0,n)},350)},n.cancel=function(){r&&(clearTimeout(r),r=null)},n),s=vt(t),u=function(t){var e=t.dispatch,r=t.debouncedFetchSuggestions;return{handleInputClick:function(){e({type:"SHOW_SUGGESTIONS"})},handleInputFocus:function(t){e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:"keyboard"===t})},handleInputBlur:function(t){e({type:"INPUT_BLUR",payload:t})},handleInputChange:function(t,n){var o=t.target.value;if(e({type:"SET_VALUE",payload:o}),(null==n?void 0:n.selectedIndex)>=0&&(e({type:"SET_SELECTED",payload:-1}),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:!0})),o.length<lt.zY.minSearchLength)return r.cancel(),e({type:"UPDATE_SUGGESTIONS",payload:{results:[],hasError:!1}}),void e({type:"HIDE_SUGGESTIONS"});e({type:"SHOW_SUGGESTIONS"}),r(o)}}}(Et(Et({},t),{},{debouncedFetchSuggestions:a})),c=function(t){var e=t.dispatch,r=t.services,n=t.mapProvider,o=t.markers,i=t.showMarker,a=t.markerOptions,s=function(t,e){var r;return e>=0?"".concat(null===(r=t[e])||void 0===r?void 0:r.text,". ").concat(e+1," of ").concat(t.length," is highlighted"):"".concat(t.length," suggestions available")};return{handleSuggestionClick:function(t,s){e({type:"SET_VALUE",payload:t.text}),e({type:"HIDE_SUGGESTIONS"}),e({type:"SET_SELECTED",payload:-1}),"mobile"===s.breakpoint&&(e({type:"TOGGLE_EXPANDED",payload:!1}),r.eventBus.emit("search:close")),ht({suggestion:t,query:t.text,services:r,mapProvider:n,markers:o,showMarker:i,markerOptions:a})},handleInputKeyDown:function(t,n){var o=n.suggestions,i=n.selectedIndex;switch(t.key){case"ArrowDown":if(null==o||!o.length)return;if(t.preventDefault(),i<o.length-1){var a=i+1;r.announce(s(o,a)),e({type:"SET_SELECTED",payload:a}),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:!1})}break;case"ArrowUp":if(null==o||!o.length)return;t.preventDefault();var u=i>0?i-1:-1;r.announce(s(o,u)),e({type:"SET_SELECTED",payload:u}),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:u<0});break;case"Escape":t.preventDefault(),e({type:"SET_KEYBOARD_FOCUS_WITHIN",payload:!0}),e({type:"HIDE_SUGGESTIONS"}),e({type:"SET_SELECTED",payload:-1})}}}}(t);return Et(Et(Et(Et({},s),u),c),{},{handleOutside:function(e){i.current.contains(e.target)||(o({type:"TOGGLE_EXPANDED",payload:!1}),t.services.eventBus.emit("search:close"))}})}(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach(function(e){xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({dispatch:O,datasets:M,services:s,mapProvider:l,searchContainerRef:P,markers:a.markers,markerOptions:G},R))}var I=D.current,C=N||!!(y&&T&&j.length);(0,u.useEffect)(function(){var t;N&&(null===(t=k.current)||void 0===t||t.focus())},[N]),(0,u.useLayoutEffect)(function(){if(N)return f(lt.V3),function(){return p(lt.V3)}},[N]),(0,u.useLayoutEffect)(function(){if(C)return A.current.style.pointerEvents="none",document.addEventListener("focusin",I.handleOutside),document.addEventListener("pointerdown",I.handleOutside),function(){A.current.style.pointerEvents="auto",document.removeEventListener("focusin",I.handleOutside),document.removeEventListener("pointerdown",I.handleOutside)}},[N,h,T,j]);var $=y||N;return(0,c.jsx)("div",{className:"im-c-search".concat($?"":" im-c-search--collapsed"),ref:P,onKeyDown:function(t){return I.handleTabOut(t,i.buttonRefs)},children:(0,c.jsxs)(b,{id:d,pluginState:n,pluginConfig:o,appState:i,inputRef:k,events:I,services:s,children:[(0,c.jsx)(g,{defaultExpanded:y,onClick:function(t){return I.handleCloseClick(t,i)},closeIcon:x}),(0,c.jsx)(v,{defaultExpanded:y,submitIcon:_})]})})}}],icons:[{id:"search",svgContent:'<path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle>'}]}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.searchPlugin=t())}(this,()=>(()=>{"use strict";var e,t,r={738(e){e.exports=preactCompat},287(e){e.exports=preactJsxRuntime},604(e,t,r){r.d(t,{z:()=>n});var n={expanded:!1,showMarker:!0,placeholder:"Search",minSearchLength:3,maxSuggestions:8,noResultsMessage:"No results available",searchErrorMessage:"Sorry, there was a problem with search"}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>"im-search-plugin.js",o.miniCssF=e=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="defra.searchPlugin:",o.l=(r,n,i,a)=>{if(e[r])e[r].push(n);else{var c,u;if(void 0!==i)for(var f=document.getElementsByTagName("script"),p=0;p<f.length;p++){var s=f[p];if(s.getAttribute("src")==r||s.getAttribute("data-webpack")==t+i){c=s;break}}c||(u=!0,(c=document.createElement("script")).charset="utf-8",o.nc&&c.setAttribute("nonce",o.nc),c.setAttribute("data-webpack",t+i),c.src=r),e[r]=[n];var l=(t,n)=>{c.onerror=c.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach(e=>e(n)),t)return t(n)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),u&&document.head.appendChild(c)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={57:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise((r,o)=>n=e[t]=[r,o]);r.push(n[2]=i);var a=o.p+o.u(t),c=new Error;o.l(a,r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",c.name="ChunkLoadError",c.type=i,c.request=a,n[1](c)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[a,c,u]=r,f=0;if(a.some(t=>0!==e[t])){for(n in c)o.o(c,n)&&(o.m[n]=c[n]);u&&u(o)}for(t&&t(r);f<a.length;f++)i=a[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunkdefra_DefraMap=this.webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i={};o.d(i,{default:()=>b});var a=o(604);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var u=n&&n.prototype instanceof c?n:c,p=Object.create(u.prototype);return f(p,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],s=!1,l={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,c=0,u=e,l.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!s&&f&&!o&&t<p.length;t++){var o,i=p[t],d=l.p,b=i[2];r>3?(o=b===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,l.v=n,l.n=i[1]):d<b&&(o=r<3||i[0]>n||n>b)&&(i[4]=r,i[5]=n,l.n=b,c=0))}if(o||r>1)return a;throw s=!0,n}return function(o,p,b){if(f>1)throw TypeError("Generator is already running");for(s&&1===p&&d(p,b),c=p,u=b;(t=c<2?e:u)||!s;){i||(c?c<3?(c>1&&(l.n=-1),d(c,u)):l.n=u:l.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(s=l.n<0)?u:r.call(n,l))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:s}}}(r,o,i),!0),p}var a={};function c(){}function p(){}function s(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(f(t={},n,function(){return this}),t),d=s.prototype=c.prototype=Object.create(l);function b(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,f(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=s,f(d,"constructor",s),f(s,"constructor",p),p.displayName="GeneratorFunction",f(s,o,"GeneratorFunction"),f(d),f(d,o,"Generator"),f(d,n,function(){return this}),f(d,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:b}})()}function f(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}f=function(e,t,r,n){function i(t,r){f(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},f(e,t,r,n)}function p(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l(l({},a.z),r),{},{id:"search",load:(e=u().m(function e(){var t;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(254).then(o.bind(o,1));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){p(i,n,o,a,c,"next",e)}function c(e){p(i,n,o,a,c,"throw",e)}a(void 0)})},function(){return t.apply(this,arguments)})})}return i.default})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("defra",[],t):"object"==typeof exports?exports.defra=t():(e.defra=e.defra||{},e.defra.searchPlugin=t())}(Object("undefined"!=typeof self?self:this),function(){return function(){"use strict";var e,t,r={738:function(e){e.exports=preactCompat},287:function(e){e.exports=preactJsxRuntime},604:function(e,t,r){r.d(t,{V3:function(){return i},cr:function(){return o},zY:function(){return n}});var n={expanded:!1,showMarker:!0,placeholder:"Search",minSearchLength:3,maxSuggestions:8,noResultsMessage:"No results available",searchErrorMessage:"Sorry, there was a problem with search"},o="Map moved to {query}",i="search"}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce(function(t,r){return o.f[r](e,t),t},[]))},o.u=function(e){return"im-search-plugin.js"},o.miniCssF=function(e){},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="defra.searchPlugin:",o.l=function(r,n,i,u){if(e[r])e[r].push(n);else{var c,a;if(void 0!==i)for(var f=document.getElementsByTagName("script"),s=0;s<f.length;s++){var l=f[s];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+i){c=l;break}}c||(a=!0,(c=document.createElement("script")).charset="utf-8",o.nc&&c.setAttribute("nonce",o.nc),c.setAttribute("data-webpack",t+i),c.src=r),e[r]=[n];var p=function(t,n){c.onerror=c.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach(function(e){return e(n)}),t)return t(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=p.bind(null,c.onerror),c.onload=p.bind(null,c.onload),a&&document.head.appendChild(c)}},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}(),function(){var e={57:0};o.f.j=function(t,r){var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(function(r,o){n=e[t]=[r,o]});r.push(n[2]=i);var u=o.p+o.u(t),c=new Error;o.l(u,function(r){if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+u+")",c.name="ChunkLoadError",c.type=i,c.request=u,n[1](c)}},"chunk-"+t,t)}};var t=function(t,r){var n,i,u=r[0],c=r[1],a=r[2],f=0;if(u.some(function(t){return 0!==e[t]})){for(n in c)o.o(c,n)&&(o.m[n]=c[n]);a&&a(o)}for(t&&t(r);f<u.length;f++)i=u[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap=Object("undefined"!=typeof self?self:this).webpackChunkdefra_DefraMap||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var i={};o.d(i,{default:function(){return b}});var u=o(604);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var a=n&&n.prototype instanceof c?n:c,s=Object.create(a.prototype);return f(s,"_invoke",function(r,n,o){var i,c,a,f=0,s=o||[],l=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return i=t,c=0,a=e,p.n=r,u}};function d(r,n){for(c=r,a=n,t=0;!l&&f&&!o&&t<s.length;t++){var o,i=s[t],d=p.p,b=i[2];r>3?(o=b===n)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,p.v=n,p.n=i[1]):d<b&&(o=r<3||i[0]>n||n>b)&&(i[4]=r,i[5]=n,p.n=b,c=0))}if(o||r>1)return u;throw l=!0,n}return function(o,s,b){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&d(s,b),c=s,a=b;(t=c<2?e:a)||!l;){i||(c?c<3?(c>1&&(p.n=-1),d(c,a)):p.n=a:p.v=a);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(l=p.n<0)?a:r.call(n,p))!==u)break}catch(t){i=e,c=1,a=t}finally{f=1}}return{value:t,done:l}}}(r,o,i),!0),s}var u={};function c(){}function s(){}function l(){}t=Object.getPrototypeOf;var p=[][n]?t(t([][n]())):(f(t={},n,function(){return this}),t),d=l.prototype=c.prototype=Object.create(p);function b(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,f(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=l,f(d,"constructor",l),f(l,"constructor",s),s.displayName="GeneratorFunction",f(l,o,"GeneratorFunction"),f(d),f(d,o,"Generator"),f(d,n,function(){return this}),f(d,"toString",function(){return"[object Generator]"}),(a=function(){return{w:i,m:b}})()}function f(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}f=function(e,t,r,n){function i(t,r){f(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},f(e,t,r,n)}function s(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t,r){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(p(p({},u.zY),r),{},{id:"search",load:(e=a().m(function e(){var t;return a().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.e(254).then(o.bind(o,523));case 1:return t=e.v.manifest,e.a(2,t)}},e)}),t=function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function u(e){s(i,n,o,u,c,"next",e)}function c(e){s(i,n,o,u,c,"throw",e)}u(void 0)})},function(){return t.apply(this,arguments)})})}return i.default}()});