@opensystemslab/map 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -367,7 +367,7 @@ var Zm=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.r
|
|
367
367
|
left: 0;
|
368
368
|
z-index: 100;
|
369
369
|
background: white;
|
370
|
-
}`,Cy=Object.freeze,zy=Object.defineProperty,Ty=Object.getOwnPropertyDescriptor,Ey=(t,e,i,o)=>{for(var n,r=o>1?void 0:o?Ty(e,i):e,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&zy(e,i,r),r};t.MyMap=class extends nt{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBuffer=40,this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="",this.osFeaturesApiKey="",this.osCopyright=`© Crown copyright and database rights ${(new Date).getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}firstUpdated(){var t;const e=this.renderRoot.querySelector(`#${this.id}`),i=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),o=(n=this.osCopyright,r=this.osVectorTilesApiKey,new jc({source:r?new Om({url:"https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key="+r,attributions:[n],attributionsCollapsible:!1,maxZoom:20}):new Im({attributions:[Rm]})}));var n,r;const a=function(t,e){let i=new Oh({declutter:!0,source:new pc({format:new Ql,url:"https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key="+e,attributions:[t],attributionsCollapsible:!1})});return e&&fetch("https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key="+e).then((t=>t.json())).then((t=>ky(i,t,"esri"))).catch((t=>console.log(t))),i}(this.osCopyright,this.osVectorTilesApiKey),s=new cc({target:e,layers:[i?a:o],view:new Ya({projection:"EPSG:3857",extent:(u=[-10.76418,49.528423,1.9134116,61.331151],p="EPSG:4326",d="EPSG:3857",Eo(u,an(p,d),void 0,h)),minZoom:this.minZoom,maxZoom:this.maxZoom,center:on([this.longitude,this.latitude]),zoom:this.zoom,enableRotation:!1}),controls:us({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[(l=this.useScaleBarStyle,new ls({units:"metric",bar:l,steps:4,text:!0,minWidth:140}))]:[]),interactions:ch({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});var l,u,p,d,h;this.map=s;const c=(f=this.drawPointer,new Jd({source:Xm,type:"Polygon",style:new yl({stroke:Bm,fill:qm,image:"crosshair"===f?Wm:Vm})}));var f;const g=function(t){return new lh({source:Xm,style:new yl({image:"crosshair"===t?Wm:Vm})})}(this.drawPointer),m=document.createElement("button");m.innerHTML="↻",m.title="Reset map view";m.addEventListener("click",(()=>{this.showFeaturesAtPoint?Bv(s,Uv,this.featureBuffer):b.getFeatures().length>0?Bv(s,b,this.geojsonBuffer):(s.getView().setCenter(on([this.longitude,this.latitude])),s.getView().setZoom(this.zoom)),this.drawMode&&(Xm.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${"m2"===this.areaUnit?"m²":this.areaUnit}`),s.addInteraction(c),s.addInteraction(Ym))}),!1);const v=document.createElement("div");v.className="reset-control ol-unselectable ol-control",v.appendChild(m);var y=new he({element:v});this.hideResetControl||s.addControl(y);const _=null==(t=this.renderRoot)?void 0:t.querySelectorAll(".ol-control button");null==_||_.forEach((t=>t.setAttribute("aria-label",t.getAttribute("title")||""))),s.on("pointerdrag",(()=>{s.getViewport().style.cursor="grabbing"})),s.on("pointermove",(()=>{s.getViewport().style.cursor="grab"}));const b=new qd;if("FeatureCollection"===this.geojsonData.type){let t=(new Gs).readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});b.addFeatures(t)}else if("Feature"===this.geojsonData.type){let t=(new Gs).readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});b.addFeature(t)}const x=new Cd({source:b,style:new yl({stroke:new sl({color:this.geojsonColor,width:3}),fill:new Ns({color:this.geojsonFill?qv(this.geojsonColor,.2):qv(this.geojsonColor,0)})})});if(s.addLayer(x),b.getFeatures().length>0){Bv(s,b,this.geojsonBuffer);const t=b.getFeatures()[0].getGeometry();t&&this.dispatch("geojsonDataArea",Nv(t,this.areaUnit))}if(this.drawMode){Xm.clear();const t=Object.keys(this.drawGeojsonData.geometry).length>0;if(t){let t=(new Gs).readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Xm.addFeature(t),Bv(s,Xm,this.drawGeojsonDataBuffer)}s.addLayer(Km),t||s.addInteraction(c),s.addInteraction(g),s.addInteraction(Ym),Xm.on("change",(()=>{var t;const e=Xm.getFeatures();if(e.length>0){const o=null==(t="string"==typeof(i=e)?i[i.length-1]||"":i[i.length-1])?void 0:t.getGeometry();this.dispatch("geojsonChange",(new Gs).writeFeaturesObject(e,{featureProjection:"EPSG:3857"})),o&&this.dispatch("areaChange",Nv(o,this.areaUnit)),s.removeInteraction(c)}var i}))}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){const t=20;if(s.addLayer(Dm),Km.setZIndex(1001),this.zoom<t){Am.clear();const t=s.getView().calculateExtent(s.getSize());Lm(a,t)}s.on("moveend",(()=>{const e=s.getView().getZoom();e&&e<t?Am.clear():setTimeout((()=>{Am.clear();const t=s.getView().calculateExtent(s.getSize());Lm(a,t)}),200)}))}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){Xv(on([this.longitude,this.latitude]),this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",(t=>{Xv(t.coordinate,this.osFeaturesApiKey,!0)}));const t=(k=this.featureColor,w=this.featureFill,new Cd({source:Uv,style:new yl({stroke:new sl({width:3,color:k}),fill:new Ns({color:qv(k,w?.2:0)})})}));s.addLayer(t),Uv.on("change",(()=>{if("ready"===Uv.getState()&&Uv.getFeatures().length>0){Bv(s,Uv,this.featureBuffer),this.dispatch("featuresGeojsonChange",(new Gs).writeFeaturesObject(Uv.getFeatures(),{featureProjection:"EPSG:3857"}));const t=Uv.getFeatures()[0].getGeometry();t&&this.dispatch("featuresAreaChange",Nv(t,this.areaUnit))}}))}var k,w;setTimeout((()=>{window.dispatchEvent(new Event("resize")),e.style.opacity="1",this.dispatch("ready")}),500)}render(){return D(wy||(wy=Cy(zy(t=['<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>\n <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />\n <div id="','" class="map" tabindex="0" />'],"raw",{value:Cy(e||t.slice())}))),this.id);var t,e}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.map)||t.dispose()}},t.MyMap.styles=a(Sy),Ey([st({type:String})],t.MyMap.prototype,"id",2),Ey([st({type:Number})],t.MyMap.prototype,"latitude",2),Ey([st({type:Number})],t.MyMap.prototype,"longitude",2),Ey([st({type:Number})],t.MyMap.prototype,"zoom",2),Ey([st({type:Number})],t.MyMap.prototype,"minZoom",2),Ey([st({type:Number})],t.MyMap.prototype,"maxZoom",2),Ey([st({type:Boolean})],t.MyMap.prototype,"drawMode",2),Ey([st({type:Object})],t.MyMap.prototype,"drawGeojsonData",2),Ey([st({type:Number})],t.MyMap.prototype,"drawGeojsonDataBuffer",2),Ey([st({type:String})],t.MyMap.prototype,"drawPointer",2),Ey([st({type:Boolean})],t.MyMap.prototype,"showFeaturesAtPoint",2),Ey([st({type:Boolean})],t.MyMap.prototype,"clickFeatures",2),Ey([st({type:String})],t.MyMap.prototype,"featureColor",2),Ey([st({type:Boolean})],t.MyMap.prototype,"featureFill",2),Ey([st({type:Number})],t.MyMap.prototype,"featureBuffer",2),Ey([st({type:Object})],t.MyMap.prototype,"geojsonData",2),Ey([st({type:String})],t.MyMap.prototype,"geojsonColor",2),Ey([st({type:Boolean})],t.MyMap.prototype,"geojsonFill",2),Ey([st({type:Number})],t.MyMap.prototype,"geojsonBuffer",2),Ey([st({type:Boolean})],t.MyMap.prototype,"disableVectorTiles",2),Ey([st({type:String})],t.MyMap.prototype,"osVectorTilesApiKey",2),Ey([st({type:String})],t.MyMap.prototype,"osFeaturesApiKey",2),Ey([st({type:String})],t.MyMap.prototype,"osCopyright",2),Ey([st({type:Boolean})],t.MyMap.prototype,"hideResetControl",2),Ey([st({type:Boolean})],t.MyMap.prototype,"staticMode",2),Ey([st({type:String})],t.MyMap.prototype,"areaUnit",2),Ey([st({type:Boolean})],t.MyMap.prototype,"showScale",2),Ey([st({type:Boolean})],t.MyMap.prototype,"useScaleBarStyle",2),t.MyMap=Ey([rt("my-map")],t.MyMap);var Py,Oy={exports:{}};Py=Oy,function(t,e){Py.exports=e()}(window,(function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=37)}([function(t,e,i){var o=i(1),n=i(6),r=i(7),a=i(16),s=i(18),l="prototype",u=function(t,e,i){var p,d,h,c,f=t&u.F,g=t&u.G,m=t&u.S,v=t&u.P,y=t&u.B,_=g?o:m?o[e]||(o[e]={}):(o[e]||{})[l],b=g?n:n[e]||(n[e]={}),x=b[l]||(b[l]={});for(p in g&&(i=e),i)h=((d=!f&&_&&void 0!==_[p])?_:i)[p],c=y&&d?s(h,o):v&&"function"==typeof h?s(Function.call,h):h,_&&a(_,p,h,t&u.U),b[p]!=h&&r(b,p,c),v&&x[p]!=h&&(x[p]=h)};o.core=n,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){t.exports=!i(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,i){i.r(e),i.d(e,"h",(function(){return s})),i.d(e,"createElement",(function(){return s})),i.d(e,"cloneElement",(function(){return p})),i.d(e,"Component",(function(){return F})),i.d(e,"render",(function(){return M})),i.d(e,"rerender",(function(){return f})),i.d(e,"options",(function(){return n}));var o=function(){},n={},r=[],a=[];function s(t,e){var i,s,l,u,p=a;for(u=arguments.length;2<u--;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(l="function"!=typeof t)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(l=!1)),l&&i?p[p.length-1]+=s:p===a?p=[s]:p.push(s),i=l;var d=new o;return d.nodeName=t,d.children=p,d.attributes=null==e?void 0:e,d.key=null==e?void 0:e.key,void 0!==n.vnode&&n.vnode(d),d}function l(t,e){for(var i in e)t[i]=e[i];return t}var u="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function p(t,e){return s(t.nodeName,l(l({},t.attributes),e),2<arguments.length?[].slice.call(arguments,2):t.children)}var d=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function c(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(n.debounceRendering||u)(f)}function f(){var t,e=h;for(h=[];t=e.pop();)t._dirty&&R(t)}function g(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function m(t){var e=l({},t.attributes);e.children=t.children;var i=t.nodeName.defaultProps;if(void 0!==i)for(var o in i)void 0===e[o]&&(e[o]=i[o]);return e}function v(t){var e=t.parentNode;e&&e.removeChild(t)}function y(t,e,i,o,n){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)i&&i(null),o&&o(t);else if("class"!==e||n)if("style"===e){if(o&&"string"!=typeof o&&"string"!=typeof i||(t.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof i)for(var r in i)r in o||(t.style[r]="");for(var r in o)t.style[r]="number"==typeof o[r]&&!1===d.test(r)?o[r]+"px":o[r]}}else if("dangerouslySetInnerHTML"===e)o&&(t.innerHTML=o.__html||"");else if("o"==e[0]&&"n"==e[1]){var a=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),o?i||t.addEventListener(e,_,a):t.removeEventListener(e,_,a),(t._listeners||(t._listeners={}))[e]=o}else if("list"!==e&&"type"!==e&&!n&&e in t){try{t[e]=null==o?"":o}catch(l){}null!=o&&!1!==o||"spellcheck"==e||t.removeAttribute(e)}else{var s=n&&e!==(e=e.replace(/^xlink:?/,""));null==o||!1===o?s?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof o&&(s?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),o):t.setAttribute(e,o))}else t.className=o||""}function _(t){return this._listeners[t.type](n.event&&n.event(t)||t)}var b=[],x=0,k=!1,w=!1;function S(){for(var t;t=b.pop();)n.afterMount&&n.afterMount(t),t.componentDidMount&&t.componentDidMount()}function C(t,e,i,o,n){var r=t,a=k;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||n)?t.nodeValue!=e&&(t.nodeValue=e):(r=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(r,t),z(t,!0))),r.__preactattr_=!0,r;var s,l,u=e.nodeName;if("function"==typeof u)return function(t,e,i,o){for(var n=t&&t._component,r=n,a=t,s=n&&t._componentConstructor===e.nodeName,l=s,u=m(e);n&&!l&&(n=n._parentComponent);)l=n.constructor===e.nodeName;return n&&l&&(!o||n._component)?(j(n,u,3,i,o),t=n.base):(r&&!s&&(I(r),t=a=null),n=P(e.nodeName,u,i),t&&!n.nextBase&&(n.nextBase=t,a=null),j(n,u,1,i,o),t=n.base,a&&t!==a&&(a._component=null,z(a,!1))),t}(t,e,i,o);if(k="svg"===u||"foreignObject"!==u&&k,u=String(u),(!t||!g(t,u))&&(s=u,(l=k?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,r=l,t)){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(r,t),z(t,!0)}var p=r.firstChild,d=r.__preactattr_,h=e.children;if(null==d){d=r.__preactattr_={};for(var c=r.attributes,f=c.length;f--;)d[c[f].name]=c[f].value}return!w&&h&&1===h.length&&"string"==typeof h[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=h[0]&&(p.nodeValue=h[0]):(h&&h.length||null!=p)&&function(t,e,i,o,n){var r,a,s,l,u,p,d,h,c=t.childNodes,f=[],m={},y=0,_=0,b=c.length,x=0,k=e?e.length:0;if(0!==b)for(var w=0;w<b;w++){var S=c[w],T=S.__preactattr_;null!=(E=k&&T?S._component?S._component.__key:T.key:null)?(y++,m[E]=S):(T||(void 0!==S.splitText?!n||S.nodeValue.trim():n))&&(f[x++]=S)}if(0!==k)for(w=0;w<k;w++){var E;if(u=null,null!=(E=(l=e[w]).key))y&&void 0!==m[E]&&(u=m[E],m[E]=void 0,y--);else if(_<x)for(r=_;r<x;r++)if(void 0!==f[r]&&(p=a=f[r],h=n,"string"==typeof(d=l)||"number"==typeof d?void 0!==p.splitText:"string"==typeof d.nodeName?!p._componentConstructor&&g(p,d.nodeName):h||p._componentConstructor===d.nodeName)){u=a,f[r]=void 0,r===x-1&&x--,r===_&&_++;break}u=C(u,l,i,o),s=c[w],u&&u!==t&&u!==s&&(null==s?t.appendChild(u):u===s.nextSibling?v(s):t.insertBefore(u,s))}if(y)for(var w in m)void 0!==m[w]&&z(m[w],!1);for(;_<=x;)void 0!==(u=f[x--])&&z(u,!1)}(r,h,i,o,w||null!=d.dangerouslySetInnerHTML),function(t,e,i){var o;for(o in i)e&&null!=e[o]||null==i[o]||y(t,o,i[o],i[o]=void 0,k);for(o in e)"children"===o||"innerHTML"===o||o in i&&e[o]===("value"===o||"checked"===o?t[o]:i[o])||y(t,o,i[o],i[o]=e[o],k)}(r,e.attributes,d),k=a,r}function z(t,e){var i=t._component;i?I(i):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||v(t),T(t))}function T(t){for(t=t.lastChild;t;){var e=t.previousSibling;z(t,!0),t=e}}var E=[];function P(t,e,i){var o,n=E.length;for(t.prototype&&t.prototype.render?(o=new t(e,i),F.call(o,e,i)):((o=new F(e,i)).constructor=t,o.render=O);n--;)if(E[n].constructor===t)return o.nextBase=E[n].nextBase,E.splice(n,1),o;return o}function O(t,e,i){return this.constructor(t,i)}function j(t,e,i,o,r){t._disable||(t._disable=!0,t.__ref=e.ref,t.__key=e.key,delete e.ref,delete e.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||r?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,o)),o&&o!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=o),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==i&&(1!==i&&!1===n.syncComponentUpdates&&t.base?c(t):R(t,1,r)),t.__ref&&t.__ref(t))}function R(t,e,i,o){if(!t._disable){var r,a,s,u=t.props,p=t.state,d=t.context,h=t.prevProps||u,c=t.prevState||p,f=t.prevContext||d,g=t.base,v=t.nextBase,y=g||v,_=t._component,T=!1,E=f;if(t.constructor.getDerivedStateFromProps&&(p=l(l({},p),t.constructor.getDerivedStateFromProps(u,p)),t.state=p),g&&(t.props=h,t.state=c,t.context=f,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(u,p,d)?T=!0:t.componentWillUpdate&&t.componentWillUpdate(u,p,d),t.props=u,t.state=p,t.context=d),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!T){r=t.render(u,p,d),t.getChildContext&&(d=l(l({},d),t.getChildContext())),g&&t.getSnapshotBeforeUpdate&&(E=t.getSnapshotBeforeUpdate(h,c));var O,F,M=r&&r.nodeName;if("function"==typeof M){var A=m(r);(a=_)&&a.constructor===M&&A.key==a.__key?j(a,A,1,d,!1):(O=a,t._component=a=P(M,A,d),a.nextBase=a.nextBase||v,a._parentComponent=t,j(a,A,0,d,!1),R(a,1,i,!0)),F=a.base}else s=y,(O=_)&&(s=t._component=null),(y||1===e)&&(s&&(s._component=null),F=function(t,e,i,o,n,r){x++||(k=null!=n&&void 0!==n.ownerSVGElement,w=null!=t&&!("__preactattr_"in t));var a=C(t,e,i,o,r);return n&&a.parentNode!==n&&n.appendChild(a),--x||(w=!1,r||S()),a}(s,r,d,i||!g,y&&y.parentNode,!0));if(y&&F!==y&&a!==_){var D=y.parentNode;D&&F!==D&&(D.replaceChild(F,y),O||(y._component=null,z(y,!1)))}if(O&&I(O),(t.base=F)&&!o){for(var L=t,G=t;G=G._parentComponent;)(L=G).base=F;F._component=L,F._componentConstructor=L.constructor}}for(!g||i?b.unshift(t):T||(t.componentDidUpdate&&t.componentDidUpdate(h,c,E),n.afterUpdate&&n.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);x||o||S()}}function I(t){n.beforeUnmount&&n.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var i=t._component;i?I(i):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),v(t.nextBase=e),E.push(t),T(e)),t.__ref&&t.__ref(null)}function F(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}function M(t,e,i){return function(t,e,i,o,n,r){x++||(k=null!=n&&void 0!==n.ownerSVGElement,w=null!=t&&!("__preactattr_"in t));var a=C(t,e,i,o,r);return n&&a.parentNode!==n&&n.appendChild(a),--x||(w=!1,r||S()),a}(i,t,{},!1,e,!1)}l(F.prototype,{setState:function(t,e){this.prevState||(this.prevState=this.state),this.state=l(l({},this.state),"function"==typeof t?t(this.state,this.props):t),e&&this._renderCallbacks.push(e),c(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),R(this,2)},render:function(){}});var A={h:s,createElement:s,cloneElement:p,Component:F,render:M,rerender:f,options:n};e.default=A},function(t,e){var i=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=i)},function(t,e,i){var o=i(8),n=i(40);t.exports=i(3)?function(t,e,i){return o.f(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var o=i(9),n=i(38),r=i(39),a=Object.defineProperty;e.f=i(3)?Object.defineProperty:function(t,e,i){if(o(t),e=r(e,!0),o(i),n)try{return a(t,e,i)}catch(s){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){var o=i(2);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var i=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+o).toString(36))}},function(t,e,i){var o=i(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,i){var o=i(4);t.exports=function(t,e){return!!t&&o((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,i){var o=i(0);o(o.S+o.F,"Object",{assign:i(41)})},function(t,e,i){var o=i(2),n=i(1).document,r=o(n)&&o(n.createElement);t.exports=function(t){return r?n.createElement(t):{}}},function(t,e,i){var o=i(1),n=i(7),r=i(17),a=i(10)("src"),s="toString",l=Function[s],u=(""+l).split(s);i(6).inspectSource=function(t){return l.call(t)},(t.exports=function(t,e,i,s){var l="function"==typeof i;l&&(r(i,"name")||n(i,"name",e)),t[e]!==i&&(l&&(r(i,a)||n(i,a,t[e]?""+t[e]:u.join(String(e)))),t===o?t[e]=i:s?t[e]?t[e]=i:n(t,e,i):(delete t[e],n(t,e,i)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||l.call(this)}))},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){var o=i(19);t.exports=function(t,e,i){if(o(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,o){return t.call(e,i,o)};case 3:return function(i,o,n){return t.call(e,i,o,n)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){var o=i(42),n=i(28);t.exports=Object.keys||function(t){return o(t,n)}},function(t,e,i){var o=i(11),n=i(12);t.exports=function(t){return o(n(t))}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,i){var o=i(21),n=i(24),r=i(43);t.exports=function(t){return function(e,i,a){var s,l=o(e),u=n(l.length),p=r(a,u);if(t&&i!=i){for(;p<u;)if((s=l[p++])!=s)return!0}else for(;p<u;p++)if((t||p in l)&&l[p]===i)return t||p||0;return!t&&-1}}},function(t,e,i){var o=i(25),n=Math.min;t.exports=function(t){return 0<t?n(o(t),9007199254740991):0}},function(t,e){var i=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?o:i)(t)}},function(t,e,i){var o=i(27)("keys"),n=i(10);t.exports=function(t){return o[t]||(o[t]=n(t))}},function(t,e,i){var o=i(6),n=i(1),r="__core-js_shared__",a=n[r]||(n[r]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:i(44)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var o=i(12);t.exports=function(t){return Object(o(t))}},function(t,e,i){var o=i(8).f,n=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in n||i(3)&&o(n,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},function(t,e,i){var o=i(0),n=i(32)(1);o(o.P+o.F*!i(13)([].map,!0),"Array",{map:function(t){return n(this,t,arguments[1])}})},function(t,e,i){var o=i(18),n=i(11),r=i(29),a=i(24),s=i(47);t.exports=function(t,e){var i=1==t,l=2==t,u=3==t,p=4==t,d=6==t,h=5==t||d,c=e||s;return function(e,s,f){for(var g,m,v=r(e),y=n(v),_=o(s,f,3),b=a(y.length),x=0,k=i?c(e,b):l?c(e,0):void 0;x<b;x++)if((h||x in y)&&(m=_(g=y[x],x,v),t))if(i)k[x]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return x;case 2:k.push(g)}else if(p)return!1;return d?-1:u||p?p:k}}},function(t,e,i){var o=i(22);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,i){var o=i(27)("wks"),n=i(10),r=i(1).Symbol,a="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=a&&r[t]||(a?r:n)("Symbol."+t))}).store=o},function(t,e,i){var o=i(0),n=i(23)(!1),r=[].indexOf,a=!!r&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(a||!i(13)(r)),"Array",{indexOf:function(t){return a?r.apply(this,arguments)||0:n(this,t,arguments[1])}})},function(t,e,i){var o=i(0);o(o.S,"Object",{create:i(52)})},function(t,e,i){e.__esModule=!0,e.default=void 0,i(14),i(30),i(31),i(35),i(49),i(50);var o,n=i(5),r=(o=i(51))&&o.__esModule?o:{default:o};function a(t){if(!t.element)throw new Error("element is not defined");if(!t.id)throw new Error("id is not defined");if(!t.source)throw new Error("source is not defined");Array.isArray(t.source)&&(t.source=s(t.source)),(0,n.render)((0,n.createElement)(r.default,t),t.element)}var s=function(t){return function(e,i){i(t.filter((function(t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())})))}};a.enhanceSelectElement=function(t){if(!t.selectElement)throw new Error("selectElement is not defined");if(!t.source){var e=[].filter.call(t.selectElement.options,(function(e){return e.value||t.preserveNullOptions}));t.source=e.map((function(t){return t.textContent||t.innerText}))}if(t.onConfirm=t.onConfirm||function(e){var i=[].filter.call(t.selectElement.options,(function(t){return(t.textContent||t.innerText)===e}))[0];i&&(i.selected=!0)},t.selectElement.value||void 0===t.defaultValue){var i=t.selectElement.options[t.selectElement.options.selectedIndex];t.defaultValue=i.textContent||i.innerText}void 0===t.name&&(t.name=""),void 0===t.id&&(void 0===t.selectElement.id?t.id="":t.id=t.selectElement.id),void 0===t.autoselect&&(t.autoselect=!0);var o=document.createElement("div");t.selectElement.parentNode.insertBefore(o,t.selectElement),a(Object.assign({},t,{element:o})),t.selectElement.style.display="none",t.selectElement.id=t.selectElement.id+"-select"};var l=a;e.default=l},function(t,e,i){t.exports=!i(3)&&!i(4)((function(){return 7!=Object.defineProperty(i(15)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,i){var o=i(2);t.exports=function(t,e){if(!o(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!o(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var o=i(20),n=i(45),r=i(46),a=i(29),s=i(11),l=Object.assign;t.exports=!l||i(4)((function(){var t={},e={},i=Symbol(),o="abcdefghijklmnopqrst";return t[i]=7,o.split("").forEach((function(t){e[t]=t})),7!=l({},t)[i]||Object.keys(l({},e)).join("")!=o}))?function(t,e){for(var i=a(t),l=arguments.length,u=1,p=n.f,d=r.f;u<l;)for(var h,c=s(arguments[u++]),f=p?o(c).concat(p(c)):o(c),g=f.length,m=0;m<g;)d.call(c,h=f[m++])&&(i[h]=c[h]);return i}:l},function(t,e,i){var o=i(17),n=i(21),r=i(23)(!1),a=i(26)("IE_PROTO");t.exports=function(t,e){var i,s=n(t),l=0,u=[];for(i in s)i!=a&&o(s,i)&&u.push(i);for(;e.length>l;)o(s,i=e[l++])&&(~r(u,i)||u.push(i));return u}},function(t,e,i){var o=i(25),n=Math.max,r=Math.min;t.exports=function(t,e){return(t=o(t))<0?n(t+e,0):r(t,e)}},function(t,e){t.exports=!1},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,i){var o=i(48);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,i){var o=i(2),n=i(33),r=i(34)("species");t.exports=function(t){var e;return n(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!n(e.prototype)||(e=void 0),o(e)&&null===(e=e[r])&&(e=void 0)),void 0===e?Array:e}},function(t,e,i){var o=i(0),n=i(32)(2);o(o.P+o.F*!i(13)([].filter,!0),"Array",{filter:function(t){return n(this,t,arguments[1])}})},function(t,e,i){var o=i(0);o(o.S,"Array",{isArray:i(33)})},function(t,e,i){e.__esModule=!0,e.default=void 0,i(14),i(36),i(30),i(31),i(35),i(55),i(58);var o=i(5),n=a(i(60)),r=a(i(61));function a(t){return t&&t.__esModule?t:{default:t}}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t}).apply(this,arguments)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var u={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function p(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var d=function(t){function e(e){var i;return(i=t.call(this,e)||this).elementReferences={},i.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},i.handleComponentBlur=i.handleComponentBlur.bind(l(l(i))),i.handleKeyDown=i.handleKeyDown.bind(l(l(i))),i.handleUpArrow=i.handleUpArrow.bind(l(l(i))),i.handleDownArrow=i.handleDownArrow.bind(l(l(i))),i.handleEnter=i.handleEnter.bind(l(l(i))),i.handlePrintableKey=i.handlePrintableKey.bind(l(l(i))),i.handleListMouseLeave=i.handleListMouseLeave.bind(l(l(i))),i.handleOptionBlur=i.handleOptionBlur.bind(l(l(i))),i.handleOptionClick=i.handleOptionClick.bind(l(l(i))),i.handleOptionFocus=i.handleOptionFocus.bind(l(l(i))),i.handleOptionMouseDown=i.handleOptionMouseDown.bind(l(l(i))),i.handleOptionMouseEnter=i.handleOptionMouseEnter.bind(l(l(i))),i.handleInputBlur=i.handleInputBlur.bind(l(l(i))),i.handleInputChange=i.handleInputChange.bind(l(l(i))),i.handleInputFocus=i.handleInputFocus.bind(l(l(i))),i.pollInputElement=i.pollInputElement.bind(l(l(i))),i.getDirectInputChanges=i.getDirectInputChanges.bind(l(l(i))),i}var i,r;r=t,(i=e).prototype=Object.create(r.prototype),(i.prototype.constructor=i).__proto__=r;var a=e.prototype;return a.isQueryAnOption=function(t,e){var i=this;return-1!==e.map((function(t){return i.templateInputValue(t).toLowerCase()})).indexOf(t.toLowerCase())},a.componentDidMount=function(){this.pollInputElement()},a.componentWillUnmount=function(){clearTimeout(this.$pollInput)},a.pollInputElement=function(){var t=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){t.pollInputElement()}),100)},a.getDirectInputChanges=function(){var t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})},a.componentDidUpdate=function(t,e){var i=this.state.focused,o=null===i,n=e.focused!==i;n&&!o&&this.elementReferences[i].focus();var r=-1===i,a=n&&null===e.focused;if(r&&a){var s=this.elementReferences[i];s.setSelectionRange(0,s.value.length)}},a.hasAutoselect=function(){return!p()&&this.props.autoselect},a.templateInputValue=function(t){var e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t},a.templateSuggestion=function(t){var e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t},a.handleComponentBlur=function(t){var e,i=this.state,o=i.options,n=i.query,r=i.selected;this.props.confirmOnBlur?(e=t.query||n,this.props.onConfirm(o[r])):e=n,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:e,selected:null,validChoiceMade:this.isQueryAnOption(e,o)})},a.handleListMouseLeave=function(t){this.setState({hovered:null})},a.handleOptionBlur=function(t,e){var i=this.state,o=i.focused,n=i.menuOpen,r=i.options,a=i.selected,s=null===t.relatedTarget,l=t.relatedTarget===this.elementReferences[-1],u=o!==e&&-1!==o;if(!u&&s||!u&&!l){var d=n&&p();this.handleComponentBlur({menuOpen:d,query:this.templateInputValue(r[a])})}},a.handleInputBlur=function(t){var e=this.state,i=e.focused,o=e.menuOpen,n=e.options,r=e.query,a=e.selected;if(-1===i){var s=o&&p(),l=p()?r:this.templateInputValue(n[a]);this.handleComponentBlur({menuOpen:s,query:l})}},a.handleInputChange=function(t){var e=this,i=this.props,o=i.minLength,n=i.source,r=i.showAllValues,a=this.hasAutoselect(),s=t.target.value,l=0===s.length,u=this.state.query.length!==s.length,p=s.length>=o;this.setState({query:s,ariaHint:l}),r||!l&&u&&p?n(s,(function(t){var i=0<t.length;e.setState({menuOpen:i,options:t,selected:a&&i?0:-1,validChoiceMade:!1})})):!l&&p||this.setState({menuOpen:!1,options:[]})},a.handleInputClick=function(t){this.handleInputChange(t)},a.handleInputFocus=function(t){var e=this.state,i=e.query,o=e.validChoiceMade,n=e.options,r=this.props.minLength,a=!o&&i.length>=r&&0<n.length;a?this.setState((function(t){var e=t.menuOpen;return{focused:-1,menuOpen:a||e,selected:-1}})):this.setState({focused:-1})},a.handleOptionFocus=function(t){this.setState({focused:t,hovered:null,selected:t})},a.handleOptionMouseEnter=function(t,e){p()||this.setState({hovered:e})},a.handleOptionClick=function(t,e){var i=this.state.options[e],o=this.templateInputValue(i);this.props.onConfirm(i),this.setState({focused:-1,hovered:null,menuOpen:!1,query:o,selected:-1,validChoiceMade:!0}),this.forceUpdate()},a.handleOptionMouseDown=function(t){t.preventDefault()},a.handleUpArrow=function(t){t.preventDefault();var e=this.state,i=e.menuOpen,o=e.selected;-1!==o&&i&&this.handleOptionFocus(o-1)},a.handleDownArrow=function(t){var e=this;if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var i=this.state,o=i.menuOpen,n=i.options,r=i.selected;r!==n.length-1&&o&&this.handleOptionFocus(r+1)}},a.handleSpace=function(t){var e=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))},a.handleEnter=function(t){this.state.menuOpen&&(t.preventDefault(),0<=this.state.selected&&this.handleOptionClick(t,this.state.selected))},a.handlePrintableKey=function(t){var e=this.elementReferences[-1];t.target===e||e.focus()},a.handleKeyDown=function(t){switch(u[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(47<(e=t.keyCode)&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223)&&this.handlePrintableKey(t)}var e},a.render=function(){var t,e=this,i=this.props,r=i.cssNamespace,a=i.displayMenu,l=i.id,u=i.minLength,d=i.name,h=i.placeholder,c=i.required,f=i.showAllValues,g=i.tNoResults,m=i.tStatusQueryTooShort,v=i.tStatusNoResults,y=i.tStatusSelectedOption,_=i.tStatusResults,b=i.tAssistiveHint,x=i.dropdownArrow,k=this.state,w=k.focused,S=k.hovered,C=k.menuOpen,z=k.options,T=k.query,E=k.selected,P=k.ariaHint,O=k.validChoiceMade,j=this.hasAutoselect(),R=-1===w,I=0===z.length,F=0!==T.length,M=T.length>=u,A=this.props.showNoOptionsFound&&R&&I&&F&&M,D=r+"__wrapper",L=r+"__input",G=null!==w?" "+L+"--focused":"",N=this.props.showAllValues?" "+L+"--show-all-values":" "+L+"--default",B=r+"__dropdown-arrow-down",q=-1!==w&&null!==w,W=r+"__menu",V=W+"--"+a,U=W+"--"+(C||A?"visible":"hidden"),X=r+"__option",K=r+"__hint",Y=this.templateInputValue(z[E]),Z=Y&&0===Y.toLowerCase().indexOf(T.toLowerCase())&&j?T+Y.substr(T.length):"",$=l+"__assistiveHint",H=P?{"aria-describedby":$}:null;return f&&"string"==typeof(t=x({className:B}))&&(t=(0,o.createElement)("div",{className:r+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:t}})),(0,o.createElement)("div",{className:D,onKeyDown:this.handleKeyDown},(0,o.createElement)(n.default,{id:l,length:z.length,queryLength:T.length,minQueryLength:u,selectedOption:this.templateInputValue(z[E]),selectedOptionIndex:E,validChoiceMade:O,isInFocus:null!==this.state.focused,tQueryTooShort:m,tNoResults:v,tSelectedOption:y,tResults:_}),Z&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:K,readonly:!0,tabIndex:"-1",value:Z})),(0,o.createElement)("input",s({"aria-expanded":C?"true":"false","aria-activedescendant":!!q&&l+"__option--"+w,"aria-owns":l+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},H,{autoComplete:"off",className:""+L+G+N,id:l,onClick:function(t){return e.handleInputClick(t)},onBlur:this.handleInputBlur},{onInput:this.handleInputChange},{onFocus:this.handleInputFocus,name:d,placeholder:h,ref:function(t){e.elementReferences[-1]=t},type:"text",role:"combobox",required:c,value:T})),t,(0,o.createElement)("ul",{className:W+" "+V+" "+U,onMouseLeave:function(t){return e.handleListMouseLeave(t)},id:l+"__listbox",role:"listbox"},z.map((function(t,i){var n=(-1===w?E===i:w===i)&&null===S?" "+X+"--focused":"",r=i%2?" "+X+"--odd":"",a=p()?"<span id="+l+"__option-suffix--"+i+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(i+1)+" of "+z.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":w===i?"true":"false",className:""+X+n+r,dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)+a},id:l+"__option--"+i,key:i,onBlur:function(t){return e.handleOptionBlur(t,i)},onClick:function(t){return e.handleOptionClick(t,i)},onMouseDown:e.handleOptionMouseDown,onMouseEnter:function(t){return e.handleOptionMouseEnter(t,i)},ref:function(t){e.elementReferences[i]=t},role:"option",tabIndex:"-1","aria-posinset":i+1,"aria-setsize":z.length})})),A&&(0,o.createElement)("li",{className:X+" "+X+"--no-results"},g())),(0,o.createElement)("span",{id:$,style:{display:"none"}},b()))},e}(o.Component);(e.default=d).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:r.default}},function(t,e,i){var o=i(9),n=i(53),r=i(28),a=i(26)("IE_PROTO"),s=function(){},l="prototype",u=function(){var t,e=i(15)("iframe"),o=r.length;for(e.style.display="none",i(54).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;o--;)delete u[l][r[o]];return u()};t.exports=Object.create||function(t,e){var i;return null!==t?(s[l]=o(t),i=new s,s[l]=null,i[a]=t):i=u(),void 0===e?i:n(i,e)}},function(t,e,i){var o=i(8),n=i(9),r=i(20);t.exports=i(3)?Object.defineProperties:function(t,e){n(t);for(var i,a=r(e),s=a.length,l=0;l<s;)o.f(t,i=a[l++],e[i]);return t}},function(t,e,i){var o=i(1).document;t.exports=o&&o.documentElement},function(t,e,i){var o=i(0);o(o.P,"Function",{bind:i(56)})},function(t,e,i){var o=i(19),n=i(2),r=i(57),a=[].slice,s={};t.exports=Function.bind||function(t){var e=o(this),i=a.call(arguments,1),l=function(){var o=i.concat(a.call(arguments));return this instanceof l?function(t,e,i){if(!(e in s)){for(var o=[],n=0;n<e;n++)o[n]="a["+n+"]";s[e]=Function("F,a","return new F("+o.join(",")+")")}return s[e](t,i)}(e,o.length,o):r(e,o,t)};return n(e.prototype)&&(l.prototype=e.prototype),l}},function(t,e){t.exports=function(t,e,i){var o=void 0===i;switch(e.length){case 0:return o?t():t.call(i);case 1:return o?t(e[0]):t.call(i,e[0]);case 2:return o?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return o?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return o?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},function(t,e,i){i(59)("match",1,(function(t,e,i){return[function(i){var o=t(this),n=null==i?void 0:i[e];return void 0!==n?n.call(i,o):new RegExp(i)[e](String(o))},i]}))},function(t,e,i){var o=i(7),n=i(16),r=i(4),a=i(12),s=i(34);t.exports=function(t,e,i){var l=s(t),u=i(a,l,""[t]),p=u[0],d=u[1];r((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)}))&&(n(String.prototype,t,p),o(RegExp.prototype,l,2==e?function(t,e){return d.call(t,this,e)}:function(t){return d.call(t,this)}))}},function(t,e,i){e.__esModule=!0,e.default=void 0,i(36);var o=i(5),n=function(t){function e(){for(var e,i=arguments.length,o=new Array(i),n=0;n<i;n++)o[n]=arguments[n];return(e=t.call.apply(t,[this].concat(o))||this).state={bump:!1,debounced:!1},e}var i,n;n=t,(i=e).prototype=Object.create(n.prototype),(i.prototype.constructor=i).__proto__=n;var r=e.prototype;return r.componentWillMount=function(){var t=this;this.debounceStatusUpdate=function(t,e,i){var o;return function(){var n=this,r=arguments,a=function(){o=null,i||t.apply(n,r)},s=i&&!o;clearTimeout(o),o=setTimeout(a,e),s&&t.apply(n,r)}}((function(){if(!t.state.debounced){var e=!t.props.isInFocus||t.props.validChoiceMade;t.setState((function(t){return{bump:!t.bump,debounced:!0,silenced:e}}))}}),1400)},r.componentWillReceiveProps=function(t){t.queryLength,this.setState({debounced:!1})},r.render=function(){var t,e=this.props,i=e.id,n=e.length,r=e.queryLength,a=e.minQueryLength,s=e.selectedOption,l=e.selectedOptionIndex,u=e.tQueryTooShort,p=e.tNoResults,d=e.tSelectedOption,h=e.tResults,c=this.state,f=c.bump,g=c.debounced,m=c.silenced,v=r<a,y=0===n,_=s?d(s,n,l):"";return t=v?u(a):y?p():h(n,_),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:i+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!m&&g&&f?t:""),(0,o.createElement)("div",{id:i+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},m||!g||f?"":t))},e}(o.Component);(e.default=n).defaultProps={tQueryTooShort:function(t){return"Type in "+t+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(t,e,i){return t+" "+(i+1)+" of "+e+" is highlighted"},tResults:function(t,e){return t+" "+(1===t?"result":"results")+" "+(1===t?"is":"are")+" available. "+e}}},function(t,e,i){e.__esModule=!0,e.default=void 0;var o=i(5);e.default=function(t){var e=t.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))}}]).default}));var jy,Ry,Iy=kl(Oy.exports),Fy=s`@charset "UTF-8";
|
370
|
+
}`,Cy=Object.freeze,zy=Object.defineProperty,Ty=Object.getOwnPropertyDescriptor,Ey=(t,e,i,o)=>{for(var n,r=o>1?void 0:o?Ty(e,i):e,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&zy(e,i,r),r};t.MyMap=class extends nt{constructor(){super(),this.id="map",this.latitude=51.507351,this.longitude=-.127758,this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBuffer=40,this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="",this.osFeaturesApiKey="",this.osCopyright=`© Crown copyright and database rights ${(new Date).getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}firstUpdated(){var t;const e=this.renderRoot.querySelector(`#${this.id}`),i=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),o=(n=this.osCopyright,r=this.osVectorTilesApiKey,new jc({source:r?new Om({url:"https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key="+r,attributions:[n],attributionsCollapsible:!1,maxZoom:20}):new Im({attributions:[Rm]})}));var n,r;const a=function(t,e){let i=new Oh({declutter:!0,source:new pc({format:new Ql,url:"https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key="+e,attributions:[t],attributionsCollapsible:!1})});return e&&fetch("https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key="+e).then((t=>t.json())).then((t=>ky(i,t,"esri"))).catch((t=>console.log(t))),i}(this.osCopyright,this.osVectorTilesApiKey),s=new cc({target:e,layers:[i?a:o],view:new Ya({projection:"EPSG:3857",extent:(u=[-10.76418,49.528423,1.9134116,61.331151],p="EPSG:4326",d="EPSG:3857",Eo(u,an(p,d),void 0,h)),minZoom:this.minZoom,maxZoom:this.maxZoom,center:on([this.longitude,this.latitude]),zoom:this.zoom,enableRotation:!1}),controls:us({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[(l=this.useScaleBarStyle,new ls({units:"metric",bar:l,steps:4,text:!0,minWidth:140}))]:[]),interactions:ch({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});var l,u,p,d,h;this.map=s;const c=(f=this.drawPointer,new Jd({source:Xm,type:"Polygon",style:new yl({stroke:Bm,fill:qm,image:"crosshair"===f?Wm:Vm})}));var f;const g=function(t){return new lh({source:Xm,style:new yl({image:"crosshair"===t?Wm:Vm})})}(this.drawPointer),m=document.createElement("button");m.innerHTML="↻",m.title="Reset map view";m.addEventListener("click",(()=>{this.showFeaturesAtPoint?Bv(s,Uv,this.featureBuffer):b.getFeatures().length>0?Bv(s,b,this.geojsonBuffer):(s.getView().setCenter(on([this.longitude,this.latitude])),s.getView().setZoom(this.zoom)),this.drawMode&&(Xm.clear(),this.dispatch("geojsonChange",{}),this.dispatch("areaChange",`0 ${"m2"===this.areaUnit?"m²":this.areaUnit}`),s.addInteraction(c),s.addInteraction(Ym))}),!1);const v=document.createElement("div");v.className="reset-control ol-unselectable ol-control",v.appendChild(m);var y=new he({element:v});this.hideResetControl||s.addControl(y);const _=null==(t=this.renderRoot)?void 0:t.querySelectorAll(".ol-control button");null==_||_.forEach((t=>t.setAttribute("aria-label",t.getAttribute("title")||""))),s.on("pointerdrag",(()=>{s.getViewport().style.cursor="grabbing"})),s.on("pointermove",(()=>{s.getViewport().style.cursor="grab"}));const b=new qd;if("FeatureCollection"===this.geojsonData.type){let t=(new Gs).readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});b.addFeatures(t)}else if("Feature"===this.geojsonData.type){let t=(new Gs).readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});b.addFeature(t)}const x=new Cd({source:b,style:new yl({stroke:new sl({color:this.geojsonColor,width:3}),fill:new Ns({color:this.geojsonFill?qv(this.geojsonColor,.2):qv(this.geojsonColor,0)})})});if(s.addLayer(x),b.getFeatures().length>0){Bv(s,b,this.geojsonBuffer);const t=b.getFeatures()[0].getGeometry();t&&this.dispatch("geojsonDataArea",Nv(t,this.areaUnit))}if(this.drawMode){Xm.clear();const t=Object.keys(this.drawGeojsonData.geometry).length>0;if(t){let t=(new Gs).readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Xm.addFeature(t),Bv(s,Xm,this.drawGeojsonDataBuffer)}s.addLayer(Km),t||s.addInteraction(c),s.addInteraction(g),s.addInteraction(Ym),Xm.on("change",(()=>{var t;const e=Xm.getFeatures();if(e.length>0){const o=null==(t="string"==typeof(i=e)?i[i.length-1]||"":i[i.length-1])?void 0:t.getGeometry();this.dispatch("geojsonChange",(new Gs).writeFeaturesObject(e,{featureProjection:"EPSG:3857"})),o&&this.dispatch("areaChange",Nv(o,this.areaUnit)),s.removeInteraction(c)}var i}))}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles){const t=20;if(s.addLayer(Dm),Km.setZIndex(1001),this.zoom<t){Am.clear();const t=s.getView().calculateExtent(s.getSize());Lm(a,t)}s.on("moveend",(()=>{const e=s.getView().getZoom();e&&e<t?Am.clear():setTimeout((()=>{Am.clear();const t=s.getView().calculateExtent(s.getSize());Lm(a,t)}),200)}))}if(this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){Xv(on([this.longitude,this.latitude]),this.osFeaturesApiKey,!1),this.clickFeatures&&s.on("singleclick",(t=>{Xv(t.coordinate,this.osFeaturesApiKey,!0)}));const t=(k=this.featureColor,w=this.featureFill,new Cd({source:Uv,style:new yl({stroke:new sl({width:3,color:k}),fill:new Ns({color:qv(k,w?.2:0)})})}));s.addLayer(t),Uv.on("change",(()=>{if("ready"===Uv.getState()&&Uv.getFeatures().length>0){Bv(s,Uv,this.featureBuffer),this.dispatch("featuresGeojsonChange",(new Gs).writeFeaturesObject(Uv.getFeatures(),{featureProjection:"EPSG:3857"}));const t=Uv.getFeatures()[0].getGeometry();t&&this.dispatch("featuresAreaChange",Nv(t,this.areaUnit))}}))}var k,w;setTimeout((()=>{window.dispatchEvent(new Event("resize")),e.style.opacity="1",this.dispatch("ready")}),500)}render(){return D(wy||(wy=Cy(zy(t=['<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>\n <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />\n <div id="','" class="map" tabindex="0" />'],"raw",{value:Cy(e||t.slice())}))),this.id);var t,e}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.map)||t.dispose()}},t.MyMap.styles=a(Sy),Ey([st({type:String})],t.MyMap.prototype,"id",2),Ey([st({type:Number})],t.MyMap.prototype,"latitude",2),Ey([st({type:Number})],t.MyMap.prototype,"longitude",2),Ey([st({type:Number})],t.MyMap.prototype,"zoom",2),Ey([st({type:Number})],t.MyMap.prototype,"minZoom",2),Ey([st({type:Number})],t.MyMap.prototype,"maxZoom",2),Ey([st({type:Boolean})],t.MyMap.prototype,"drawMode",2),Ey([st({type:Object})],t.MyMap.prototype,"drawGeojsonData",2),Ey([st({type:Number})],t.MyMap.prototype,"drawGeojsonDataBuffer",2),Ey([st({type:String})],t.MyMap.prototype,"drawPointer",2),Ey([st({type:Boolean})],t.MyMap.prototype,"showFeaturesAtPoint",2),Ey([st({type:Boolean})],t.MyMap.prototype,"clickFeatures",2),Ey([st({type:String})],t.MyMap.prototype,"featureColor",2),Ey([st({type:Boolean})],t.MyMap.prototype,"featureFill",2),Ey([st({type:Number})],t.MyMap.prototype,"featureBuffer",2),Ey([st({type:Object})],t.MyMap.prototype,"geojsonData",2),Ey([st({type:String})],t.MyMap.prototype,"geojsonColor",2),Ey([st({type:Boolean})],t.MyMap.prototype,"geojsonFill",2),Ey([st({type:Number})],t.MyMap.prototype,"geojsonBuffer",2),Ey([st({type:Boolean})],t.MyMap.prototype,"disableVectorTiles",2),Ey([st({type:String})],t.MyMap.prototype,"osVectorTilesApiKey",2),Ey([st({type:String})],t.MyMap.prototype,"osFeaturesApiKey",2),Ey([st({type:String})],t.MyMap.prototype,"osCopyright",2),Ey([st({type:Boolean})],t.MyMap.prototype,"hideResetControl",2),Ey([st({type:Boolean})],t.MyMap.prototype,"staticMode",2),Ey([st({type:String})],t.MyMap.prototype,"areaUnit",2),Ey([st({type:Boolean})],t.MyMap.prototype,"showScale",2),Ey([st({type:Boolean})],t.MyMap.prototype,"useScaleBarStyle",2),t.MyMap=Ey([rt("my-map")],t.MyMap);var Py,Oy={exports:{}};Py=Oy,function(t,e){Py.exports=e()}(window,(function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i(i.s=37)}([function(t,e,i){var o=i(1),n=i(6),r=i(7),a=i(16),s=i(18),l="prototype",u=function(t,e,i){var p,d,h,c,f=t&u.F,g=t&u.G,m=t&u.S,v=t&u.P,y=t&u.B,_=g?o:m?o[e]||(o[e]={}):(o[e]||{})[l],b=g?n:n[e]||(n[e]={}),x=b[l]||(b[l]={});for(p in g&&(i=e),i)h=((d=!f&&_&&void 0!==_[p])?_:i)[p],c=y&&d?s(h,o):v&&"function"==typeof h?s(Function.call,h):h,_&&a(_,p,h,t&u.U),b[p]!=h&&r(b,p,c),v&&x[p]!=h&&(x[p]=h)};o.core=n,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){t.exports=!i(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,i){i.r(e),i.d(e,"h",(function(){return s})),i.d(e,"createElement",(function(){return s})),i.d(e,"cloneElement",(function(){return p})),i.d(e,"Component",(function(){return F})),i.d(e,"render",(function(){return M})),i.d(e,"rerender",(function(){return f})),i.d(e,"options",(function(){return n}));var o=function(){},n={},r=[],a=[];function s(t,e){var i,s,l,u,p=a;for(u=arguments.length;2<u--;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(l="function"!=typeof t)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(l=!1)),l&&i?p[p.length-1]+=s:p===a?p=[s]:p.push(s),i=l;var d=new o;return d.nodeName=t,d.children=p,d.attributes=null==e?void 0:e,d.key=null==e?void 0:e.key,void 0!==n.vnode&&n.vnode(d),d}function l(t,e){for(var i in e)t[i]=e[i];return t}var u="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function p(t,e){return s(t.nodeName,l(l({},t.attributes),e),2<arguments.length?[].slice.call(arguments,2):t.children)}var d=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function c(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(n.debounceRendering||u)(f)}function f(){var t,e=h;for(h=[];t=e.pop();)t._dirty&&R(t)}function g(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function m(t){var e=l({},t.attributes);e.children=t.children;var i=t.nodeName.defaultProps;if(void 0!==i)for(var o in i)void 0===e[o]&&(e[o]=i[o]);return e}function v(t){var e=t.parentNode;e&&e.removeChild(t)}function y(t,e,i,o,n){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)i&&i(null),o&&o(t);else if("class"!==e||n)if("style"===e){if(o&&"string"!=typeof o&&"string"!=typeof i||(t.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof i)for(var r in i)r in o||(t.style[r]="");for(var r in o)t.style[r]="number"==typeof o[r]&&!1===d.test(r)?o[r]+"px":o[r]}}else if("dangerouslySetInnerHTML"===e)o&&(t.innerHTML=o.__html||"");else if("o"==e[0]&&"n"==e[1]){var a=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),o?i||t.addEventListener(e,_,a):t.removeEventListener(e,_,a),(t._listeners||(t._listeners={}))[e]=o}else if("list"!==e&&"type"!==e&&!n&&e in t){try{t[e]=null==o?"":o}catch(l){}null!=o&&!1!==o||"spellcheck"==e||t.removeAttribute(e)}else{var s=n&&e!==(e=e.replace(/^xlink:?/,""));null==o||!1===o?s?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof o&&(s?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),o):t.setAttribute(e,o))}else t.className=o||""}function _(t){return this._listeners[t.type](n.event&&n.event(t)||t)}var b=[],x=0,k=!1,w=!1;function S(){for(var t;t=b.pop();)n.afterMount&&n.afterMount(t),t.componentDidMount&&t.componentDidMount()}function C(t,e,i,o,n){var r=t,a=k;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||n)?t.nodeValue!=e&&(t.nodeValue=e):(r=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(r,t),z(t,!0))),r.__preactattr_=!0,r;var s,l,u=e.nodeName;if("function"==typeof u)return function(t,e,i,o){for(var n=t&&t._component,r=n,a=t,s=n&&t._componentConstructor===e.nodeName,l=s,u=m(e);n&&!l&&(n=n._parentComponent);)l=n.constructor===e.nodeName;return n&&l&&(!o||n._component)?(j(n,u,3,i,o),t=n.base):(r&&!s&&(I(r),t=a=null),n=P(e.nodeName,u,i),t&&!n.nextBase&&(n.nextBase=t,a=null),j(n,u,1,i,o),t=n.base,a&&t!==a&&(a._component=null,z(a,!1))),t}(t,e,i,o);if(k="svg"===u||"foreignObject"!==u&&k,u=String(u),(!t||!g(t,u))&&(s=u,(l=k?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,r=l,t)){for(;t.firstChild;)r.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(r,t),z(t,!0)}var p=r.firstChild,d=r.__preactattr_,h=e.children;if(null==d){d=r.__preactattr_={};for(var c=r.attributes,f=c.length;f--;)d[c[f].name]=c[f].value}return!w&&h&&1===h.length&&"string"==typeof h[0]&&null!=p&&void 0!==p.splitText&&null==p.nextSibling?p.nodeValue!=h[0]&&(p.nodeValue=h[0]):(h&&h.length||null!=p)&&function(t,e,i,o,n){var r,a,s,l,u,p,d,h,c=t.childNodes,f=[],m={},y=0,_=0,b=c.length,x=0,k=e?e.length:0;if(0!==b)for(var w=0;w<b;w++){var S=c[w],T=S.__preactattr_;null!=(E=k&&T?S._component?S._component.__key:T.key:null)?(y++,m[E]=S):(T||(void 0!==S.splitText?!n||S.nodeValue.trim():n))&&(f[x++]=S)}if(0!==k)for(w=0;w<k;w++){var E;if(u=null,null!=(E=(l=e[w]).key))y&&void 0!==m[E]&&(u=m[E],m[E]=void 0,y--);else if(_<x)for(r=_;r<x;r++)if(void 0!==f[r]&&(p=a=f[r],h=n,"string"==typeof(d=l)||"number"==typeof d?void 0!==p.splitText:"string"==typeof d.nodeName?!p._componentConstructor&&g(p,d.nodeName):h||p._componentConstructor===d.nodeName)){u=a,f[r]=void 0,r===x-1&&x--,r===_&&_++;break}u=C(u,l,i,o),s=c[w],u&&u!==t&&u!==s&&(null==s?t.appendChild(u):u===s.nextSibling?v(s):t.insertBefore(u,s))}if(y)for(var w in m)void 0!==m[w]&&z(m[w],!1);for(;_<=x;)void 0!==(u=f[x--])&&z(u,!1)}(r,h,i,o,w||null!=d.dangerouslySetInnerHTML),function(t,e,i){var o;for(o in i)e&&null!=e[o]||null==i[o]||y(t,o,i[o],i[o]=void 0,k);for(o in e)"children"===o||"innerHTML"===o||o in i&&e[o]===("value"===o||"checked"===o?t[o]:i[o])||y(t,o,i[o],i[o]=e[o],k)}(r,e.attributes,d),k=a,r}function z(t,e){var i=t._component;i?I(i):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||v(t),T(t))}function T(t){for(t=t.lastChild;t;){var e=t.previousSibling;z(t,!0),t=e}}var E=[];function P(t,e,i){var o,n=E.length;for(t.prototype&&t.prototype.render?(o=new t(e,i),F.call(o,e,i)):((o=new F(e,i)).constructor=t,o.render=O);n--;)if(E[n].constructor===t)return o.nextBase=E[n].nextBase,E.splice(n,1),o;return o}function O(t,e,i){return this.constructor(t,i)}function j(t,e,i,o,r){t._disable||(t._disable=!0,t.__ref=e.ref,t.__key=e.key,delete e.ref,delete e.key,void 0===t.constructor.getDerivedStateFromProps&&(!t.base||r?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,o)),o&&o!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=o),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==i&&(1!==i&&!1===n.syncComponentUpdates&&t.base?c(t):R(t,1,r)),t.__ref&&t.__ref(t))}function R(t,e,i,o){if(!t._disable){var r,a,s,u=t.props,p=t.state,d=t.context,h=t.prevProps||u,c=t.prevState||p,f=t.prevContext||d,g=t.base,v=t.nextBase,y=g||v,_=t._component,T=!1,E=f;if(t.constructor.getDerivedStateFromProps&&(p=l(l({},p),t.constructor.getDerivedStateFromProps(u,p)),t.state=p),g&&(t.props=h,t.state=c,t.context=f,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(u,p,d)?T=!0:t.componentWillUpdate&&t.componentWillUpdate(u,p,d),t.props=u,t.state=p,t.context=d),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!T){r=t.render(u,p,d),t.getChildContext&&(d=l(l({},d),t.getChildContext())),g&&t.getSnapshotBeforeUpdate&&(E=t.getSnapshotBeforeUpdate(h,c));var O,F,M=r&&r.nodeName;if("function"==typeof M){var A=m(r);(a=_)&&a.constructor===M&&A.key==a.__key?j(a,A,1,d,!1):(O=a,t._component=a=P(M,A,d),a.nextBase=a.nextBase||v,a._parentComponent=t,j(a,A,0,d,!1),R(a,1,i,!0)),F=a.base}else s=y,(O=_)&&(s=t._component=null),(y||1===e)&&(s&&(s._component=null),F=function(t,e,i,o,n,r){x++||(k=null!=n&&void 0!==n.ownerSVGElement,w=null!=t&&!("__preactattr_"in t));var a=C(t,e,i,o,r);return n&&a.parentNode!==n&&n.appendChild(a),--x||(w=!1,r||S()),a}(s,r,d,i||!g,y&&y.parentNode,!0));if(y&&F!==y&&a!==_){var D=y.parentNode;D&&F!==D&&(D.replaceChild(F,y),O||(y._component=null,z(y,!1)))}if(O&&I(O),(t.base=F)&&!o){for(var L=t,G=t;G=G._parentComponent;)(L=G).base=F;F._component=L,F._componentConstructor=L.constructor}}for(!g||i?b.unshift(t):T||(t.componentDidUpdate&&t.componentDidUpdate(h,c,E),n.afterUpdate&&n.afterUpdate(t));t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);x||o||S()}}function I(t){n.beforeUnmount&&n.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var i=t._component;i?I(i):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),v(t.nextBase=e),E.push(t),T(e)),t.__ref&&t.__ref(null)}function F(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{},this._renderCallbacks=[]}function M(t,e,i){return function(t,e,i,o,n,r){x++||(k=null!=n&&void 0!==n.ownerSVGElement,w=null!=t&&!("__preactattr_"in t));var a=C(t,e,i,o,r);return n&&a.parentNode!==n&&n.appendChild(a),--x||(w=!1,r||S()),a}(i,t,{},!1,e,!1)}l(F.prototype,{setState:function(t,e){this.prevState||(this.prevState=this.state),this.state=l(l({},this.state),"function"==typeof t?t(this.state,this.props):t),e&&this._renderCallbacks.push(e),c(this)},forceUpdate:function(t){t&&this._renderCallbacks.push(t),R(this,2)},render:function(){}});var A={h:s,createElement:s,cloneElement:p,Component:F,render:M,rerender:f,options:n};e.default=A},function(t,e){var i=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=i)},function(t,e,i){var o=i(8),n=i(40);t.exports=i(3)?function(t,e,i){return o.f(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var o=i(9),n=i(38),r=i(39),a=Object.defineProperty;e.f=i(3)?Object.defineProperty:function(t,e,i){if(o(t),e=r(e,!0),o(i),n)try{return a(t,e,i)}catch(s){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){var o=i(2);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var i=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+o).toString(36))}},function(t,e,i){var o=i(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,i){var o=i(4);t.exports=function(t,e){return!!t&&o((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,i){var o=i(0);o(o.S+o.F,"Object",{assign:i(41)})},function(t,e,i){var o=i(2),n=i(1).document,r=o(n)&&o(n.createElement);t.exports=function(t){return r?n.createElement(t):{}}},function(t,e,i){var o=i(1),n=i(7),r=i(17),a=i(10)("src"),s="toString",l=Function[s],u=(""+l).split(s);i(6).inspectSource=function(t){return l.call(t)},(t.exports=function(t,e,i,s){var l="function"==typeof i;l&&(r(i,"name")||n(i,"name",e)),t[e]!==i&&(l&&(r(i,a)||n(i,a,t[e]?""+t[e]:u.join(String(e)))),t===o?t[e]=i:s?t[e]?t[e]=i:n(t,e,i):(delete t[e],n(t,e,i)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||l.call(this)}))},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){var o=i(19);t.exports=function(t,e,i){if(o(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,o){return t.call(e,i,o)};case 3:return function(i,o,n){return t.call(e,i,o,n)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){var o=i(42),n=i(28);t.exports=Object.keys||function(t){return o(t,n)}},function(t,e,i){var o=i(11),n=i(12);t.exports=function(t){return o(n(t))}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e,i){var o=i(21),n=i(24),r=i(43);t.exports=function(t){return function(e,i,a){var s,l=o(e),u=n(l.length),p=r(a,u);if(t&&i!=i){for(;p<u;)if((s=l[p++])!=s)return!0}else for(;p<u;p++)if((t||p in l)&&l[p]===i)return t||p||0;return!t&&-1}}},function(t,e,i){var o=i(25),n=Math.min;t.exports=function(t){return 0<t?n(o(t),9007199254740991):0}},function(t,e){var i=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?o:i)(t)}},function(t,e,i){var o=i(27)("keys"),n=i(10);t.exports=function(t){return o[t]||(o[t]=n(t))}},function(t,e,i){var o=i(6),n=i(1),r="__core-js_shared__",a=n[r]||(n[r]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:i(44)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var o=i(12);t.exports=function(t){return Object(o(t))}},function(t,e,i){var o=i(8).f,n=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in n||i(3)&&o(n,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},function(t,e,i){var o=i(0),n=i(32)(1);o(o.P+o.F*!i(13)([].map,!0),"Array",{map:function(t){return n(this,t,arguments[1])}})},function(t,e,i){var o=i(18),n=i(11),r=i(29),a=i(24),s=i(47);t.exports=function(t,e){var i=1==t,l=2==t,u=3==t,p=4==t,d=6==t,h=5==t||d,c=e||s;return function(e,s,f){for(var g,m,v=r(e),y=n(v),_=o(s,f,3),b=a(y.length),x=0,k=i?c(e,b):l?c(e,0):void 0;x<b;x++)if((h||x in y)&&(m=_(g=y[x],x,v),t))if(i)k[x]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return x;case 2:k.push(g)}else if(p)return!1;return d?-1:u||p?p:k}}},function(t,e,i){var o=i(22);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,i){var o=i(27)("wks"),n=i(10),r=i(1).Symbol,a="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=a&&r[t]||(a?r:n)("Symbol."+t))}).store=o},function(t,e,i){var o=i(0),n=i(23)(!1),r=[].indexOf,a=!!r&&1/[1].indexOf(1,-0)<0;o(o.P+o.F*(a||!i(13)(r)),"Array",{indexOf:function(t){return a?r.apply(this,arguments)||0:n(this,t,arguments[1])}})},function(t,e,i){var o=i(0);o(o.S,"Object",{create:i(52)})},function(t,e,i){e.__esModule=!0,e.default=void 0,i(14),i(30),i(31),i(35),i(49),i(50);var o,n=i(5),r=(o=i(51))&&o.__esModule?o:{default:o};function a(t){if(!t.element)throw new Error("element is not defined");if(!t.id)throw new Error("id is not defined");if(!t.source)throw new Error("source is not defined");Array.isArray(t.source)&&(t.source=s(t.source)),(0,n.render)((0,n.createElement)(r.default,t),t.element)}var s=function(t){return function(e,i){i(t.filter((function(t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())})))}};a.enhanceSelectElement=function(t){if(!t.selectElement)throw new Error("selectElement is not defined");if(!t.source){var e=[].filter.call(t.selectElement.options,(function(e){return e.value||t.preserveNullOptions}));t.source=e.map((function(t){return t.textContent||t.innerText}))}if(t.onConfirm=t.onConfirm||function(e){var i=[].filter.call(t.selectElement.options,(function(t){return(t.textContent||t.innerText)===e}))[0];i&&(i.selected=!0)},t.selectElement.value||void 0===t.defaultValue){var i=t.selectElement.options[t.selectElement.options.selectedIndex];t.defaultValue=i.textContent||i.innerText}void 0===t.name&&(t.name=""),void 0===t.id&&(void 0===t.selectElement.id?t.id="":t.id=t.selectElement.id),void 0===t.autoselect&&(t.autoselect=!0);var o=document.createElement("div");t.selectElement.parentNode.insertBefore(o,t.selectElement),a(Object.assign({},t,{element:o})),t.selectElement.style.display="none",t.selectElement.id=t.selectElement.id+"-select"};var l=a;e.default=l},function(t,e,i){t.exports=!i(3)&&!i(4)((function(){return 7!=Object.defineProperty(i(15)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,i){var o=i(2);t.exports=function(t,e){if(!o(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!o(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,i){var o=i(20),n=i(45),r=i(46),a=i(29),s=i(11),l=Object.assign;t.exports=!l||i(4)((function(){var t={},e={},i=Symbol(),o="abcdefghijklmnopqrst";return t[i]=7,o.split("").forEach((function(t){e[t]=t})),7!=l({},t)[i]||Object.keys(l({},e)).join("")!=o}))?function(t,e){for(var i=a(t),l=arguments.length,u=1,p=n.f,d=r.f;u<l;)for(var h,c=s(arguments[u++]),f=p?o(c).concat(p(c)):o(c),g=f.length,m=0;m<g;)d.call(c,h=f[m++])&&(i[h]=c[h]);return i}:l},function(t,e,i){var o=i(17),n=i(21),r=i(23)(!1),a=i(26)("IE_PROTO");t.exports=function(t,e){var i,s=n(t),l=0,u=[];for(i in s)i!=a&&o(s,i)&&u.push(i);for(;e.length>l;)o(s,i=e[l++])&&(~r(u,i)||u.push(i));return u}},function(t,e,i){var o=i(25),n=Math.max,r=Math.min;t.exports=function(t,e){return(t=o(t))<0?n(t+e,0):r(t,e)}},function(t,e){t.exports=!1},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,i){var o=i(48);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,i){var o=i(2),n=i(33),r=i(34)("species");t.exports=function(t){var e;return n(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!n(e.prototype)||(e=void 0),o(e)&&null===(e=e[r])&&(e=void 0)),void 0===e?Array:e}},function(t,e,i){var o=i(0),n=i(32)(2);o(o.P+o.F*!i(13)([].filter,!0),"Array",{filter:function(t){return n(this,t,arguments[1])}})},function(t,e,i){var o=i(0);o(o.S,"Array",{isArray:i(33)})},function(t,e,i){e.__esModule=!0,e.default=void 0,i(14),i(36),i(30),i(31),i(35),i(55),i(58);var o=i(5),n=a(i(60)),r=a(i(61));function a(t){return t&&t.__esModule?t:{default:t}}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t}).apply(this,arguments)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var u={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function p(){return"undefined"!=typeof navigator&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var d=function(t){function e(e){var i;return(i=t.call(this,e)||this).elementReferences={},i.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},i.handleComponentBlur=i.handleComponentBlur.bind(l(l(i))),i.handleKeyDown=i.handleKeyDown.bind(l(l(i))),i.handleUpArrow=i.handleUpArrow.bind(l(l(i))),i.handleDownArrow=i.handleDownArrow.bind(l(l(i))),i.handleEnter=i.handleEnter.bind(l(l(i))),i.handlePrintableKey=i.handlePrintableKey.bind(l(l(i))),i.handleListMouseLeave=i.handleListMouseLeave.bind(l(l(i))),i.handleOptionBlur=i.handleOptionBlur.bind(l(l(i))),i.handleOptionClick=i.handleOptionClick.bind(l(l(i))),i.handleOptionFocus=i.handleOptionFocus.bind(l(l(i))),i.handleOptionMouseDown=i.handleOptionMouseDown.bind(l(l(i))),i.handleOptionMouseEnter=i.handleOptionMouseEnter.bind(l(l(i))),i.handleInputBlur=i.handleInputBlur.bind(l(l(i))),i.handleInputChange=i.handleInputChange.bind(l(l(i))),i.handleInputFocus=i.handleInputFocus.bind(l(l(i))),i.pollInputElement=i.pollInputElement.bind(l(l(i))),i.getDirectInputChanges=i.getDirectInputChanges.bind(l(l(i))),i}var i,r;r=t,(i=e).prototype=Object.create(r.prototype),(i.prototype.constructor=i).__proto__=r;var a=e.prototype;return a.isQueryAnOption=function(t,e){var i=this;return-1!==e.map((function(t){return i.templateInputValue(t).toLowerCase()})).indexOf(t.toLowerCase())},a.componentDidMount=function(){this.pollInputElement()},a.componentWillUnmount=function(){clearTimeout(this.$pollInput)},a.pollInputElement=function(){var t=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){t.pollInputElement()}),100)},a.getDirectInputChanges=function(){var t=this.elementReferences[-1];t&&t.value!==this.state.query&&this.handleInputChange({target:{value:t.value}})},a.componentDidUpdate=function(t,e){var i=this.state.focused,o=null===i,n=e.focused!==i;n&&!o&&this.elementReferences[i].focus();var r=-1===i,a=n&&null===e.focused;if(r&&a){var s=this.elementReferences[i];s.setSelectionRange(0,s.value.length)}},a.hasAutoselect=function(){return!p()&&this.props.autoselect},a.templateInputValue=function(t){var e=this.props.templates&&this.props.templates.inputValue;return e?e(t):t},a.templateSuggestion=function(t){var e=this.props.templates&&this.props.templates.suggestion;return e?e(t):t},a.handleComponentBlur=function(t){var e,i=this.state,o=i.options,n=i.query,r=i.selected;this.props.confirmOnBlur?(e=t.query||n,this.props.onConfirm(o[r])):e=n,this.setState({focused:null,menuOpen:t.menuOpen||!1,query:e,selected:null,validChoiceMade:this.isQueryAnOption(e,o)})},a.handleListMouseLeave=function(t){this.setState({hovered:null})},a.handleOptionBlur=function(t,e){var i=this.state,o=i.focused,n=i.menuOpen,r=i.options,a=i.selected,s=null===t.relatedTarget,l=t.relatedTarget===this.elementReferences[-1],u=o!==e&&-1!==o;if(!u&&s||!u&&!l){var d=n&&p();this.handleComponentBlur({menuOpen:d,query:this.templateInputValue(r[a])})}},a.handleInputBlur=function(t){var e=this.state,i=e.focused,o=e.menuOpen,n=e.options,r=e.query,a=e.selected;if(-1===i){var s=o&&p(),l=p()?r:this.templateInputValue(n[a]);this.handleComponentBlur({menuOpen:s,query:l})}},a.handleInputChange=function(t){var e=this,i=this.props,o=i.minLength,n=i.source,r=i.showAllValues,a=this.hasAutoselect(),s=t.target.value,l=0===s.length,u=this.state.query.length!==s.length,p=s.length>=o;this.setState({query:s,ariaHint:l}),r||!l&&u&&p?n(s,(function(t){var i=0<t.length;e.setState({menuOpen:i,options:t,selected:a&&i?0:-1,validChoiceMade:!1})})):!l&&p||this.setState({menuOpen:!1,options:[]})},a.handleInputClick=function(t){this.handleInputChange(t)},a.handleInputFocus=function(t){var e=this.state,i=e.query,o=e.validChoiceMade,n=e.options,r=this.props.minLength,a=!o&&i.length>=r&&0<n.length;a?this.setState((function(t){var e=t.menuOpen;return{focused:-1,menuOpen:a||e,selected:-1}})):this.setState({focused:-1})},a.handleOptionFocus=function(t){this.setState({focused:t,hovered:null,selected:t})},a.handleOptionMouseEnter=function(t,e){p()||this.setState({hovered:e})},a.handleOptionClick=function(t,e){var i=this.state.options[e],o=this.templateInputValue(i);this.props.onConfirm(i),this.setState({focused:-1,hovered:null,menuOpen:!1,query:o,selected:-1,validChoiceMade:!0}),this.forceUpdate()},a.handleOptionMouseDown=function(t){t.preventDefault()},a.handleUpArrow=function(t){t.preventDefault();var e=this.state,i=e.menuOpen,o=e.selected;-1!==o&&i&&this.handleOptionFocus(o-1)},a.handleDownArrow=function(t){var e=this;if(t.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var i=this.state,o=i.menuOpen,n=i.options,r=i.selected;r!==n.length-1&&o&&this.handleOptionFocus(r+1)}},a.handleSpace=function(t){var e=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(t.preventDefault(),this.props.source("",(function(t){e.setState({menuOpen:!0,options:t})}))),-1!==this.state.focused&&(t.preventDefault(),this.handleOptionClick(t,this.state.focused))},a.handleEnter=function(t){this.state.menuOpen&&(t.preventDefault(),0<=this.state.selected&&this.handleOptionClick(t,this.state.selected))},a.handlePrintableKey=function(t){var e=this.elementReferences[-1];t.target===e||e.focus()},a.handleKeyDown=function(t){switch(u[t.keyCode]){case"up":this.handleUpArrow(t);break;case"down":this.handleDownArrow(t);break;case"space":this.handleSpace(t);break;case"enter":this.handleEnter(t);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(47<(e=t.keyCode)&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223)&&this.handlePrintableKey(t)}var e},a.render=function(){var t,e=this,i=this.props,r=i.cssNamespace,a=i.displayMenu,l=i.id,u=i.minLength,d=i.name,h=i.placeholder,c=i.required,f=i.showAllValues,g=i.tNoResults,m=i.tStatusQueryTooShort,v=i.tStatusNoResults,y=i.tStatusSelectedOption,_=i.tStatusResults,b=i.tAssistiveHint,x=i.dropdownArrow,k=this.state,w=k.focused,S=k.hovered,C=k.menuOpen,z=k.options,T=k.query,E=k.selected,P=k.ariaHint,O=k.validChoiceMade,j=this.hasAutoselect(),R=-1===w,I=0===z.length,F=0!==T.length,M=T.length>=u,A=this.props.showNoOptionsFound&&R&&I&&F&&M,D=r+"__wrapper",L=r+"__input",G=null!==w?" "+L+"--focused":"",N=this.props.showAllValues?" "+L+"--show-all-values":" "+L+"--default",B=r+"__dropdown-arrow-down",q=-1!==w&&null!==w,W=r+"__menu",V=W+"--"+a,U=W+"--"+(C||A?"visible":"hidden"),X=r+"__option",K=r+"__hint",Y=this.templateInputValue(z[E]),Z=Y&&0===Y.toLowerCase().indexOf(T.toLowerCase())&&j?T+Y.substr(T.length):"",$=l+"__assistiveHint",H=P?{"aria-describedby":$}:null;return f&&"string"==typeof(t=x({className:B}))&&(t=(0,o.createElement)("div",{className:r+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:t}})),(0,o.createElement)("div",{className:D,onKeyDown:this.handleKeyDown},(0,o.createElement)(n.default,{id:l,length:z.length,queryLength:T.length,minQueryLength:u,selectedOption:this.templateInputValue(z[E]),selectedOptionIndex:E,validChoiceMade:O,isInFocus:null!==this.state.focused,tQueryTooShort:m,tNoResults:v,tSelectedOption:y,tResults:_}),Z&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:K,readonly:!0,tabIndex:"-1",value:Z})),(0,o.createElement)("input",s({"aria-expanded":C?"true":"false","aria-activedescendant":!!q&&l+"__option--"+w,"aria-owns":l+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"},H,{autoComplete:"off",className:""+L+G+N,id:l,onClick:function(t){return e.handleInputClick(t)},onBlur:this.handleInputBlur},{onInput:this.handleInputChange},{onFocus:this.handleInputFocus,name:d,placeholder:h,ref:function(t){e.elementReferences[-1]=t},type:"text",role:"combobox",required:c,value:T})),t,(0,o.createElement)("ul",{className:W+" "+V+" "+U,onMouseLeave:function(t){return e.handleListMouseLeave(t)},id:l+"__listbox",role:"listbox"},z.map((function(t,i){var n=(-1===w?E===i:w===i)&&null===S?" "+X+"--focused":"",r=i%2?" "+X+"--odd":"",a=p()?"<span id="+l+"__option-suffix--"+i+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(i+1)+" of "+z.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":w===i?"true":"false",className:""+X+n+r,dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)+a},id:l+"__option--"+i,key:i,onBlur:function(t){return e.handleOptionBlur(t,i)},onClick:function(t){return e.handleOptionClick(t,i)},onMouseDown:e.handleOptionMouseDown,onMouseEnter:function(t){return e.handleOptionMouseEnter(t,i)},ref:function(t){e.elementReferences[i]=t},role:"option",tabIndex:"-1","aria-posinset":i+1,"aria-setsize":z.length})})),A&&(0,o.createElement)("li",{className:X+" "+X+"--no-results"},g())),(0,o.createElement)("span",{id:$,style:{display:"none"}},b()))},e}(o.Component);(e.default=d).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:r.default}},function(t,e,i){var o=i(9),n=i(53),r=i(28),a=i(26)("IE_PROTO"),s=function(){},l="prototype",u=function(){var t,e=i(15)("iframe"),o=r.length;for(e.style.display="none",i(54).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;o--;)delete u[l][r[o]];return u()};t.exports=Object.create||function(t,e){var i;return null!==t?(s[l]=o(t),i=new s,s[l]=null,i[a]=t):i=u(),void 0===e?i:n(i,e)}},function(t,e,i){var o=i(8),n=i(9),r=i(20);t.exports=i(3)?Object.defineProperties:function(t,e){n(t);for(var i,a=r(e),s=a.length,l=0;l<s;)o.f(t,i=a[l++],e[i]);return t}},function(t,e,i){var o=i(1).document;t.exports=o&&o.documentElement},function(t,e,i){var o=i(0);o(o.P,"Function",{bind:i(56)})},function(t,e,i){var o=i(19),n=i(2),r=i(57),a=[].slice,s={};t.exports=Function.bind||function(t){var e=o(this),i=a.call(arguments,1),l=function(){var o=i.concat(a.call(arguments));return this instanceof l?function(t,e,i){if(!(e in s)){for(var o=[],n=0;n<e;n++)o[n]="a["+n+"]";s[e]=Function("F,a","return new F("+o.join(",")+")")}return s[e](t,i)}(e,o.length,o):r(e,o,t)};return n(e.prototype)&&(l.prototype=e.prototype),l}},function(t,e){t.exports=function(t,e,i){var o=void 0===i;switch(e.length){case 0:return o?t():t.call(i);case 1:return o?t(e[0]):t.call(i,e[0]);case 2:return o?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return o?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return o?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},function(t,e,i){i(59)("match",1,(function(t,e,i){return[function(i){var o=t(this),n=null==i?void 0:i[e];return void 0!==n?n.call(i,o):new RegExp(i)[e](String(o))},i]}))},function(t,e,i){var o=i(7),n=i(16),r=i(4),a=i(12),s=i(34);t.exports=function(t,e,i){var l=s(t),u=i(a,l,""[t]),p=u[0],d=u[1];r((function(){var e={};return e[l]=function(){return 7},7!=""[t](e)}))&&(n(String.prototype,t,p),o(RegExp.prototype,l,2==e?function(t,e){return d.call(t,this,e)}:function(t){return d.call(t,this)}))}},function(t,e,i){e.__esModule=!0,e.default=void 0,i(36);var o=i(5),n=function(t){function e(){for(var e,i=arguments.length,o=new Array(i),n=0;n<i;n++)o[n]=arguments[n];return(e=t.call.apply(t,[this].concat(o))||this).state={bump:!1,debounced:!1},e}var i,n;n=t,(i=e).prototype=Object.create(n.prototype),(i.prototype.constructor=i).__proto__=n;var r=e.prototype;return r.componentWillMount=function(){var t=this;this.debounceStatusUpdate=function(t,e,i){var o;return function(){var n=this,r=arguments,a=function(){o=null,i||t.apply(n,r)},s=i&&!o;clearTimeout(o),o=setTimeout(a,e),s&&t.apply(n,r)}}((function(){if(!t.state.debounced){var e=!t.props.isInFocus||t.props.validChoiceMade;t.setState((function(t){return{bump:!t.bump,debounced:!0,silenced:e}}))}}),1400)},r.componentWillReceiveProps=function(t){t.queryLength,this.setState({debounced:!1})},r.render=function(){var t,e=this.props,i=e.id,n=e.length,r=e.queryLength,a=e.minQueryLength,s=e.selectedOption,l=e.selectedOptionIndex,u=e.tQueryTooShort,p=e.tNoResults,d=e.tSelectedOption,h=e.tResults,c=this.state,f=c.bump,g=c.debounced,m=c.silenced,v=r<a,y=0===n,_=s?d(s,n,l):"";return t=v?u(a):y?p():h(n,_),this.debounceStatusUpdate(),(0,o.createElement)("div",{style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:i+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!m&&g&&f?t:""),(0,o.createElement)("div",{id:i+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},m||!g||f?"":t))},e}(o.Component);(e.default=n).defaultProps={tQueryTooShort:function(t){return"Type in "+t+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(t,e,i){return t+" "+(i+1)+" of "+e+" is highlighted"},tResults:function(t,e){return t+" "+(1===t?"result":"results")+" "+(1===t?"is":"are")+" available. "+e}}},function(t,e,i){e.__esModule=!0,e.default=void 0;var o=i(5);e.default=function(t){var e=t.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))}}]).default}));var jy,Ry=kl(Oy.exports),Iy=s`@charset "UTF-8";
|
371
371
|
.govuk-link {
|
372
372
|
font-family: "GDS Transport", arial, sans-serif;
|
373
373
|
-webkit-font-smoothing: antialiased;
|
@@ -6549,7 +6549,20 @@ x:-moz-any-link {
|
|
6549
6549
|
}
|
6550
6550
|
:host .autocomplete__menu {
|
6551
6551
|
max-height: var(--autocomplete__menu__max-height, 342px);
|
6552
|
-
}`,
|
6552
|
+
}`,Fy=Object.freeze,My=Object.defineProperty,Ay=Object.getOwnPropertyDescriptor,Dy=(t,e,i,o)=>{for(var n,r=o>1?void 0:o?Ay(e,i):e,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&My(e,i,r),r};t.AddressAutocomplete=class extends nt{constructor(){super(...arguments),this.id="autocomplete",this.postcode="SE5 0HU",this.label="Select an address",this.initialAddress="",this.osPlacesApiKey="",this.arrowStyle="default",this.labelStyle="responsive",this._totalAddresses=void 0,this._addressesInPostcode=[],this._options=[],this._selectedAddress=null,this._osError=void 0,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}connectedCallback(){super.connectedCallback(),this._fetchData()}disconnectedCallback(){super.disconnectedCallback()}getLightDropdownArrow(){return'<svg class="autocomplete__dropdown-arrow-down" style="height: 17px;" viewBox="0 0 512 512" ><path d="M256,298.3L256,298.3L256,298.3l174.2-167.2c4.3-4.2,11.4-4.1,15.8,0.2l30.6,29.9c4.4,4.3,4.5,11.3,0.2,15.5L264.1,380.9 c-2.2,2.2-5.2,3.2-8.1,3c-3,0.1-5.9-0.9-8.1-3L35.2,176.7c-4.3-4.2-4.2-11.2,0.2-15.5L66,131.3c4.4-4.3,11.5-4.4,15.8-0.2L256,298.3 z"/></svg>'}firstUpdated(){Ry({element:this.renderRoot.querySelector(`#${this.id}-container`),id:this.id,required:!0,source:this._options,defaultValue:this.initialAddress,showAllValues:!0,displayMenu:"overlay",dropdownArrow:"light"===this.arrowStyle?this.getLightDropdownArrow:void 0,tNoResults:()=>"No addresses found",onConfirm:t=>{this._selectedAddress=this._addressesInPostcode.filter((e=>e.LPI.ADDRESS.split(`, ${e.LPI.ADMINISTRATIVE_AREA}`)[0]===t))[0],this._selectedAddress&&this.dispatch("addressSelection",{address:this._selectedAddress})}})}async _fetchData(t=0,e=[]){const i={postcode:this.postcode,dataset:"LPI",maxResults:"100",output_srs:"EPSG:4326",lr:"EN",key:this.osPlacesApiKey},o=`https://api.os.uk/search/places/v1/postcode?${new URLSearchParams(i)}`;await fetch(o+`&offset=${t}`).then((t=>t.json())).then((t=>{var i,o,n;(t.error||t.fault)&&(this._osError=(null==(i=t.error)?void 0:i.message)||(null==(o=t.fault)?void 0:o.faultstring)||"Something went wrong"),this._totalAddresses=null==(n=t.header)?void 0:n.totalresults;const r=e.concat(t.results||[]);if(this._addressesInPostcode=r,this.dispatch("ready",{postcode:this.postcode,status:`fetched ${this._addressesInPostcode.length}/${this._totalAddresses} addresses`}),t.results){t.results.filter((t=>"APPROVED"===t.LPI.LPI_LOGICAL_STATUS_CODE_DESCRIPTION)).map((t=>{this._options.push(t.LPI.ADDRESS.split(`, ${t.LPI.ADMINISTRATIVE_AREA}`)[0])}));const e=new Intl.Collator([],{numeric:!0});this._options.sort(((t,i)=>e.compare(t,i)))}this._totalAddresses&&this._totalAddresses>this._addressesInPostcode.length&&this._fetchData(this._addressesInPostcode.length,this._addressesInPostcode)})).catch((t=>console.log(t)))}_getLabelClasses(){let t="govuk-label";return"static"===this.labelStyle&&(t+=" govuk-label--static"),t}_getErrorMessageContainer(t){const e=t?D` <span class="govuk-warning-text__icon" aria-hidden="true">!</span>
|
6553
|
+
<strong class="govuk-warning-text__text">
|
6554
|
+
<span class="govuk-warning-text__assistive">Warning</span>
|
6555
|
+
${t}
|
6556
|
+
</strong>`:null;return D`<div class="${t?"govuk-warning-text":""}" role="status">${e}</div>`}_getAutocomplete(t){return t?null:D`
|
6557
|
+
<link
|
6558
|
+
rel="stylesheet"
|
6559
|
+
href="https://cdn.jsdelivr.net/npm/accessible-autocomplete@2.0.4/dist/accessible-autocomplete.min.css"
|
6560
|
+
/>
|
6561
|
+
<label class=${this._getLabelClasses()} for=${this.id}>
|
6562
|
+
${this.label}
|
6563
|
+
</label>
|
6564
|
+
<div id="${this.id}-container" spellcheck="false"></div>
|
6565
|
+
`}render(){let t;return this.osPlacesApiKey?this._osError?t=this._osError:0===this._totalAddresses&&(t=`No addresses found in postcode ${this.postcode}`):t="Missing OS Places API key",D(jy||(jy=Fy(My(e=['\n <script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>\n ',"\n ","\n "],"raw",{value:Fy(i||e.slice())}))),this._getErrorMessageContainer(t),this._getAutocomplete(t));var e,i}},t.AddressAutocomplete.styles=a(Iy),Dy([st({type:String})],t.AddressAutocomplete.prototype,"id",2),Dy([st({type:String})],t.AddressAutocomplete.prototype,"postcode",2),Dy([st({type:String})],t.AddressAutocomplete.prototype,"label",2),Dy([st({type:String})],t.AddressAutocomplete.prototype,"initialAddress",2),Dy([st({type:String})],t.AddressAutocomplete.prototype,"osPlacesApiKey",2),Dy([st({type:String})],t.AddressAutocomplete.prototype,"arrowStyle",2),Dy([st({type:String})],t.AddressAutocomplete.prototype,"labelStyle",2),Dy([lt()],t.AddressAutocomplete.prototype,"_totalAddresses",2),Dy([lt()],t.AddressAutocomplete.prototype,"_addressesInPostcode",2),Dy([lt()],t.AddressAutocomplete.prototype,"_options",2),Dy([lt()],t.AddressAutocomplete.prototype,"_selectedAddress",2),Dy([lt()],t.AddressAutocomplete.prototype,"_osError",2),t.AddressAutocomplete=Dy([rt("address-autocomplete")],t.AddressAutocomplete);var Ly,Gy=function(){return(Gy=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)},Ny=/^([a-z]{1,2}\d)([a-z])$/i,By=/[a-z]{2}$/i,qy=/\d[a-z]{2}$/i,Wy=/^[a-z]{1,2}\d[a-z\d]?\s*\d[a-z]{2}$/i,Vy=/^[a-z]{1,2}/i,Uy={valid:!1,postcode:null,incode:null,outcode:null,area:null,district:null,subDistrict:null,sector:null,unit:null},Xy=function(t){return null===t?null:t[0]},Ky=/\s+/gi,Yy=function(t){return t.replace(Ky,"").toUpperCase()},Zy=function(t,e){return Yy(t).match(e)},$y=function(t){return null!==t.match(Wy)},Hy=function(t){var e=Jy(t);if(null===e)return null;var i=Qy(t);return null===i?null:e+" "+i},Jy=function(t){return $y(t)?Yy(t).replace(qy,""):null},Qy=function(t){if(!$y(t))return null;var e=Zy(t,qy);return Xy(e)},t_=function(t){if(!$y(t))return null;var e=Zy(t,Vy);return Xy(e)},e_=function(t){var e=Jy(t);if(null===e)return null;var i=Qy(t);return null===i?null:e+" "+i[0]},i_=function(t){if(!$y(t))return null;var e=Zy(t,By);return Xy(e)},o_=function(t){var e=Jy(t);if(null===e)return null;var i=e.match(Ny);return null===i?e:i[1]},n_=function(t){var e=Jy(t);return null===e||null===e.match(Ny)?null:e},r_=s`@charset "UTF-8";
|
6553
6566
|
.govuk-link {
|
6554
6567
|
font-family: "GDS Transport", arial, sans-serif;
|
6555
6568
|
-webkit-font-smoothing: antialiased;
|
@@ -12700,10 +12713,10 @@ x:-moz-any-link {
|
|
12700
12713
|
.govuk-\\!-width-one-quarter {
|
12701
12714
|
width: 25% !important;
|
12702
12715
|
}
|
12703
|
-
}`,
|
12716
|
+
}`,a_=Object.freeze,s_=Object.defineProperty,l_=Object.getOwnPropertyDescriptor,u_=(t,e,i,o)=>{for(var n,r=o>1?void 0:o?l_(e,i):e,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(o?n(e,i,r):n(r))||r);return o&&r&&s_(e,i,r),r};t.PostcodeSearch=class extends nt{constructor(){super(...arguments),this.id="postcode",this.errorId="postcode-error",this.label="Postcode",this.hintText="",this.errorMessage="Enter a valid UK postcode",this.onlyQuestionOnPage=!1,this._postcode="",this._sanitizedPostcode=null,this._showPostcodeError=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}_onInputChange(t){const e=t.target.value;var i;(i=e.trim(),$y(i)?{valid:!0,postcode:Hy(i),incode:Qy(i),outcode:Jy(i),area:t_(i),district:o_(i),subDistrict:n_(i),sector:e_(i),unit:i_(i)}:Gy({},Uy)).valid?(this._sanitizedPostcode=Hy(e.trim()),this._postcode=Hy(e.trim())||e):(this._sanitizedPostcode=null,this._postcode=e.toUpperCase()),this._sanitizedPostcode&&(this._showPostcodeError=!1,this.dispatch("postcodeValidated",{postcode:this._sanitizedPostcode}))}_onBlur(){this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_onKeyUp(t){"Enter"!==t.key||this._sanitizedPostcode||(this._showPostcodeError=!0),this._showError()}_showError(){var t,e;const i=null==(t=this.shadowRoot)?void 0:t.querySelector(`#${this.errorId}`);i&&(i.style.display="none"),i&&this._showPostcodeError&&(i.style.display="");const o=null==(e=this.shadowRoot)?void 0:e.querySelector(".govuk-form-group");o&&this._showPostcodeError&&o.classList.add("govuk-form-group--error"),o&&!this._showPostcodeError&&o.classList.remove("govuk-form-group--error")}_makeLabel(){return this.onlyQuestionOnPage?D`<h1 class="govuk-label-wrapper">
|
12704
12717
|
<label class="govuk-label govuk-label--l" htmlFor=${this.id}>
|
12705
12718
|
${this.label}
|
12706
12719
|
</label>
|
12707
12720
|
</h1>`:D`<label class="govuk-label" htmlFor=${this.id}
|
12708
12721
|
>${this.label}</label
|
12709
|
-
>`}render(){return D(
|
12722
|
+
>`}render(){return D(Ly||(Ly=a_(s_(t=['<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>\n <div class="govuk-form-group">\n ','\n <div id="postcode-hint" class="govuk-hint">',"</div>\n <span\n id=",'\n class="govuk-error-message"\n style="display:none"\n role="status"\n >\n <span class="govuk-visually-hidden">Error:</span>','\n </span>\n <input\n class="govuk-input govuk-input--width-10"\n id=','\n name="postcode"\n type="text"\n autocomplete="postal-code"\n spellcheck="false"\n aria-describedby="postcode-hint ','"\n .value=',"\n @input=","\n @blur=","\n @keyup=",'\n tabindex="0"\n />\n </div>'],"raw",{value:a_(e||t.slice())}))),this._makeLabel(),this.hintText,this.errorId,this.errorMessage,this.id,this.errorId,this._postcode,this._onInputChange,this._onBlur,this._onKeyUp);var t,e}},t.PostcodeSearch.styles=a(r_),u_([st({type:String})],t.PostcodeSearch.prototype,"id",2),u_([st({type:String})],t.PostcodeSearch.prototype,"errorId",2),u_([st({type:String})],t.PostcodeSearch.prototype,"label",2),u_([st({type:String})],t.PostcodeSearch.prototype,"hintText",2),u_([st({type:String})],t.PostcodeSearch.prototype,"errorMessage",2),u_([st({type:Boolean})],t.PostcodeSearch.prototype,"onlyQuestionOnPage",2),u_([lt()],t.PostcodeSearch.prototype,"_postcode",2),u_([lt()],t.PostcodeSearch.prototype,"_sanitizedPostcode",2),u_([lt()],t.PostcodeSearch.prototype,"_showPostcodeError",2),t.PostcodeSearch=u_([rt("postcode-search")],t.PostcodeSearch),Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"}));
|
package/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LitElement } from "lit";
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
2
2
|
declare type Address = {
|
3
3
|
LPI: any;
|
4
4
|
};
|
@@ -24,7 +24,20 @@ export declare class AddressAutocomplete extends LitElement {
|
|
24
24
|
firstUpdated(): void;
|
25
25
|
_fetchData(offset?: number, prevResults?: Address[]): Promise<void>;
|
26
26
|
_getLabelClasses(): string;
|
27
|
-
|
27
|
+
/**
|
28
|
+
* Render an errorMessage container
|
29
|
+
* Must always be visible to ensure that role="status" works for screenreaders
|
30
|
+
* @param errorMessage
|
31
|
+
* @returns TemplateResult
|
32
|
+
*/
|
33
|
+
_getErrorMessageContainer(errorMessage: string | undefined): TemplateResult;
|
34
|
+
/**
|
35
|
+
* If not in state of error, return the autocomplete
|
36
|
+
* @param errorMessage
|
37
|
+
* @returns TemplateResult | null
|
38
|
+
*/
|
39
|
+
_getAutocomplete(errorMessage: string | undefined): TemplateResult | null;
|
40
|
+
render(): TemplateResult<1>;
|
28
41
|
/**
|
29
42
|
* dispatches an event for clients to subscribe to
|
30
43
|
* @param eventName
|