@opensystemslab/map 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -22699,11 +22699,13 @@ function Da(i, t) {
22699
22699
  return Mu([e, n, o, t]);
22700
22700
  }
22701
22701
  function Qs(i, t) {
22702
+ const e = t === "EPSG:27700" ? {
22703
+ dataProjection: t,
22704
+ featureProjection: "EPSG:3857"
22705
+ } : { featureProjection: t };
22702
22706
  return new No().writeFeaturesObject(
22703
22707
  i instanceof Gi ? i.getFeatures() : i,
22704
- {
22705
- featureProjection: t
22706
- }
22708
+ e
22707
22709
  );
22708
22710
  }
22709
22711
  const wo = new Gi(), ii = new Gi();
@@ -28,7 +28,7 @@ Filter Expression:
28
28
  `,""),Ge;if(H==2){Ge.push(Du(hr,Ms),wd);return}hr=Fu(hr,wd,pd,Ms).split(`
29
29
  `);for(var ul=0,ME=hr.length;ul<ME;++ul)ul>0&&Ge.push(`
30
30
  `,""),Ge.push(hr[ul],wd);return Ge},[]):fe=ju(lr,F).trim(),Ct=it(E,"paint","text-opacity",L,V,p,I)}if(fe&&Ct&&!de){bt||(++rt,O=A[rt],(!O||!O.getText()||O.getFill()||O.getStroke())&&(O=new te,A[rt]=O),O.setImage(void 0),O.setGeometry(void 0)),O.getText()||O.setText(ct||new gf({padding:[2,2,2,2]})),ct=O.getText();var Mp=Y["text-transform"];Mp=="uppercase"?fe=Array.isArray(fe)?fe.map(function(Ge,Rn){return Rn%2?Ge:Ge.toUpperCase()}):fe.toUpperCase():Mp=="lowercase"&&(fe=Array.isArray(fe)?fe.map(function(Ge,Rn){return Rn%2?Ge:Ge.toLowerCase()}):fe.toLowerCase());var Cp=Array.isArray(fe)?fe:H==2?Du(fe,Ms):Fu(fe,ks,pd,Ms);ct.setText(Cp),ct.setFont(ks),ct.setRotation(Lu(it(E,"layout","text-rotate",L,V,p,I)));var hl=it(E,"layout","text-anchor",L,V,p,I),_d=bt||H==1?"point":it(E,"layout","symbol-placement",L,V,p,I);ct.setPlacement(_d),ct.setOverflow(_d==="point");var uo=it(E,"paint","text-halo-width",L,V,p,I),Ep=it(E,"layout","text-offset",L,V,p,I),Sp=it(E,"paint","text-translate",L,V,p,I),yd=0,xd=0;if(_d=="point"){var bd="center";hl.indexOf("left")!==-1?(bd="left",xd=uo):hl.indexOf("right")!==-1&&(bd="right",xd=-uo),ct.setTextAlign(bd);var wE=it(E,"layout","text-rotation-alignment",L,V,p,I);ct.setRotateWithView(wE=="map")}else ct.setMaxAngle(Lu(it(E,"layout","text-max-angle",L,V,p,I))*fe.length/Cp.length),ct.setTextAlign(),ct.setRotateWithView(!1);var kd="middle";hl.indexOf("bottom")==0?(kd="bottom",yd=-uo-.5*(ws-1)*zn):hl.indexOf("top")==0&&(kd="top",yd=uo+.5*(ws-1)*zn),ct.setTextBaseline(kd);var Tp=it(E,"layout","text-justify",L,V,p,I);ct.setJustify(Tp==="auto"?void 0:Tp),ct.setOffsetX(Ep[0]*zn+xd+Sp[0]),ct.setOffsetY(Ep[1]*zn+yd+Sp[1]),j.setColor(ao(it(E,"paint","text-color",L,V,p,I),Ct)),ct.setFill(j);var Ip=ao(it(E,"paint","text-halo-color",L,V,p,I),Ct);if(Ip){P.setColor(Ip),uo*=2;var zp=.5*zn;P.setWidth(uo<=zp?uo:zp),ct.setStroke(P)}else ct.setStroke(void 0);var Cs=it(E,"layout","text-padding",L,V,p,I),Es=ct.getPadding();Cs!==Es[0]&&(Es[0]=Cs,Es[1]=Cs,Es[2]=Cs,Es[3]=Cs),O.setZIndex(dt)}}}}if(rt>-1)return A.length=rt+1,A}};return i.setStyle(at),i.set("mapbox-source",v),i.set("mapbox-layers",f),i.set("mapbox-featurestate",{}),at}new Po;class yk extends Gx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:ag({extent:Ta(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Zg=yk,Kg='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class xk extends Zg{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Kg];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",o=t.url!==void 0?t.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:o,wrapX:t.wrapX,zDirection:t.zDirection})}}const bk=xk;function Hg(i,t=[]){return(...e)=>(n=>n.length>=i.length?i(...n):Hg(i,n))([...t,...e])}const kk=Array.isArray;function wk(i,t,e){if(!kk(e))throw new TypeError("reduce: list must be array or iterable");let n=0;const o=e.length;for(;n<o;)t=i(t,e[n],n,e),n++;return t}const Mk=Hg(wk);function Ck(i){return typeof i=="string"?i[i.length-1]||"":i[i.length-1]}function Qg(i,t){return arguments.length===1?e=>Qg(i,e):i*t}Mk(Qg,1);function Jg(i,t){if(arguments.length===1)return o=>Jg(i,o);if(i<1)throw new Error("First argument to splitEvery must be a positive integer");const e=[];let n=0;for(;n<t.length;)e.push(t.slice(n,n+=i));return e}const IE=Ap``,Ek="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBpZD0iYSIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0MCA1MCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmMsLmQsLmV7ZmlsbDpub25lO30uZHtzdHJva2Utd2lkdGg6MnB4O30uZCwuZXtzdHJva2U6IzAwMDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9LmZ7Y2xpcC1wYXRoOnVybCgjYik7fS5ne2ZpbGwtcnVsZTpldmVub2RkO308L3N0eWxlPgogICAgPGNsaXBQYXRoIGlkPSJiIj4KICAgICAgPHJlY3QgY2xhc3M9ImMiIHg9IjMuNTEiIHk9IjMuNDgiIHdpZHRoPSIzMi42OCIgaGVpZ2h0PSIzMi42OCIvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+CiAgPGcgY2xhc3M9ImYiPgogICAgPHBhdGggY2xhc3M9ImciIGQ9Ik0xNy4yNiwzLjQ4djYuNTRoMS4yM1Y1Ljc2bDIuNjQsNC4yNmgxLjMyVjMuNDhoLTEuMjNWNy44NWwtMi42OC00LjM3aC0xLjI4WiIvPgogIDwvZz4KICA8Y2lyY2xlIGNsYXNzPSJlIiBjeD0iMTkuOTYiIGN5PSIzMS40IiByPSIxNS4wNyIvPgogIDxsaW5lIGNsYXNzPSJkIiB4MT0iMTkuOTYiIHkxPSIxNi4zMyIgeDI9IjE5Ljk2IiB5Mj0iMzEuMjYiLz4KPC9zdmc+",Sk="data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIKICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgPGRlZnM+CiAgICA8c3R5bGU+LmNscy0xe2ZpbGw6bm9uZTt9PC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPnRyYXNoLWNhbjwvdGl0bGU+CiAgPHJlY3QgZmlsbD0id2hpdGUiIHg9IjEyIiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMTIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTgiIHk9IjEyIiB3aWR0aD0iMiIgaGVpZ2h0PSIxMiIvPgogIDxwYXRoIGZpbGw9IndoaXRlIiBkPSJNNCw2VjhINlYyOGEyLDIsMCwwLDAsMiwySDI0YTIsMiwwLDAsMCwyLTJWOGgyVjZaTTgsMjhWOEgyNFYyOFoiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgeD0iMTIiIHk9IjIiIHdpZHRoPSI4IiBoZWlnaHQ9IjIiLz4KICA8cmVjdCBmaWxsPSJ3aGl0ZSIgaWQ9Il9UcmFuc3BhcmVudF9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtUcmFuc3BhcmVudCBSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIvPgo8L3N2Zz4=";function Tk(i){return new U_({units:"metric",bar:i,steps:4,text:i,minWidth:140})}function Ik(){const i=document.createElement("img");i.src=Ek,i.title="North";const t=document.createElement("div");return t.className="north-arrow-control ol-unselectable ol-control",t.appendChild(i),new xo({element:t})}function zk(i,t){const e=document.createElement("button");if(e.title="Reset map view",t==="unicode")e.innerHTML="↻";else{const o=document.createElement("img");o.className="reset-icon",o.src=Sk,e.appendChild(o)}e.addEventListener("click",i,!1);const n=document.createElement("div");return n.className="reset-control ol-unselectable ol-control",n.appendChild(e),new xo({element:n})}const Va=new Ai({features:[],wrapX:!1}),Rk=new Qn({source:Va,properties:{name:"pointsLayer"},style:new te({image:new rn({radius:3,fill:new se({color:"grey"})})})});function Ak(i,t){var n,o,r;const e=i&&((r=(o=(n=i.getSource())==null?void 0:n.getFeaturesInExtent(t))==null?void 0:o.filter(s=>{var a;return((a=s.getGeometry())==null?void 0:a.getType())!=="Point"}))==null?void 0:r.flatMap(s=>s.flatCoordinates_));if(e)return Jg(2,e).forEach((s,a)=>{Va.addFeature(new Ti({geometry:new ni(s),i:a}))})}const tm=new ga({stroke:new ke({color:"red",width:2}),points:4,radius1:15,radius2:1}),em=new rn({radius:6,fill:new se({color:"#ff0000"})}),im={color:"#ff0000",width:3},Pk=new ke(im),Lk=new ke({...im,lineDash:[2,8]}),nm=new se({color:"rgba(255, 0, 0, 0.1)"}),Dk=new te({image:new ga({fill:new se({color:"#fff"}),stroke:new ke({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(i){const t=i.getGeometry();if(t instanceof $n){const e=t.getCoordinates()[0];return new Ar(e)}else return}}),Ok=[new te({fill:nm,stroke:Pk}),Dk];function Fk(i){return new te({stroke:Lk,fill:nm,image:i==="crosshair"?tm:em})}function Nk(i){return new te({image:new rn({radius:9,fill:new se({color:i})})})}function Gk(i){return new te({fill:new se({color:i})})}const Oi=new Ai;function jk(i,t){return new Qn({source:Oi,style:i==="Polygon"?Ok:Nk(t)})}function Bk(i,t,e){return new tx({source:Oi,type:i,style:i==="Polygon"?Fk(t):Gk(e)})}const om=new sx({source:Va,pixelTolerance:15});function Uk(i){return new ox({source:Oi,style:new te({image:i==="crosshair"?tm:em})})}const Wk="data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iMTAwIgogICBoZWlnaHQ9IjEwMCIKICAgaWQ9InN2ZzQ0NjAiCiAgIHNvZGlwb2RpOmRvY25hbWU9InVFQTE3LXBvaS1hbHQuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjAgKDQwMzVhNGZiNDksIDIwMjAtMDUtMDEpIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgcGFnZWNvbG9yPSIjZmZmZmZmIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIGJvcmRlcm9wYWNpdHk9IjEiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBncmlkdG9sZXJhbmNlPSIxMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpZD0ibmFtZWR2aWV3MTEiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjIuODU2NzExNCIKICAgICBpbmtzY2FwZTpjeD0iLTMxLjM3NjY1NyIKICAgICBpbmtzY2FwZTpjeT0iNTkuNTAwMTg0IgogICAgIGlua3NjYXBlOndpbmRvdy14PSItOCIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc0NDYwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXJvdGF0aW9uPSIwIiAvPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0NDYyIiAvPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQ0NjUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxwYXRoCiAgICAgZD0ibSA0Ny43ODE2MTQsNTUuMzU5OTU4IGMgNS41MTMyOSwwLjYzNDc4IDEwLjY4NzA5LC0xLjA0ODYzNCAxNC42Mzg1MjIsLTQuNzYzMDQ1IDQuMDEyMzI3LC0zLjc3MTIxNyA1LjgxNzEzMSwtNy45MTQzODggNS44MTcxMzEsLTEzLjM1NDE1OCAwLC01LjUwNzMzNyAtMS44MjMwNTIsLTkuNjMyODM1IC01Ljk1NTI1OSwtMTMuNDc4MTA4IC0xLjgyNjIzNiwtMS42OTkwMzkgLTQuMjI3MDUzLC0zLjA5NDUzNSAtNi44NDQyOTcsLTMuOTc3OTU0IC0yLjE0MDA0OCwtMC43MjI0OTUgLTYuODgyNywtMC45MDI0MDYgLTkuNDI2OTUyLC0wLjM1NzcyNiAtMi44MzI2MDQsMC42MDYyMzggLTYuMjAzMDg3LDIuMzY0OTE2IC04LjMzNTI5Miw0LjM0ODkxNCAtMy45OTAwNDgsMy43MTI0ODcgLTUuOTAxNzkxLDguMDc1MDE3IC01LjkwMTc5MSwxMy40NjUwNjQgMCwzLjIzMTM2IDAuNDcyMSw1LjI1NTEyNSAxLjkxNTU2Miw4LjIwNjI2IDEuMDUwMDgsMi4xNDY2OCAxLjQ0Mzg4NiwyLjY4MjA5NSAzLjQwNTkxNiw0LjYzMzEzNSAxLjcwODA1LDEuNjk4NTc0IDIuNjQ1MDQ0LDIuNDI1MDQxIDQuMDc0MjkxLDMuMTU4MzQgMi4zNTQ1NjMsMS4yMDgxMDIgNC40MDUwNzEsMS44NjUyNyA2LjYxMjE2OSwyLjExOTQ2OCB6IG0gMS4wMzYwNzYsNDQuMjEzNTUgYyAtMC4zODc4NjUsLTAuMjM1NDQgLTIuMTI2MjU2LC0xLjkyNTMxIC0zLjg2NDQzNywtMy43NTU1MyBDIDMxLjYzOTM2Niw4MS43OTg1NTggMjIuMzQ1MjM3LDY4LjE2MTE3MyAxNy4zMDAyMzEsNTUuMjQxMTQ3IDE1Ljc4MjI5NCw1MS4zNTQxNDEgMTUuMjE5ODAzLDQ5LjM5MTE1NiAxNC42MjU0ODYsNDUuOTExMjg0IDEyLjgwMjQzNiwzNS4yNDAxMyAxNC45ODU3NjksMjQuODE3MzIxIDIwLjg5Njg5NiwxNS45NTExNjUgMjMuMTQ3MjgsMTIuNTc2MzAyIDI3LjcxMjU0OCw4LjAwMDcxMzQgMzAuOTcxNjM0LDUuODUzNDQyNCBjIDExLjg5MTY0NCwtNy44MzUyNTcgMjYuMjIwMTcxLC03LjgwMjY1NyAzOC4xNjY1NSwwLjA4Njg4IDMuMTAwMzc3LDIuMDQ3MzU2IDcuNzEwODQsNi43MDE4NDI2IDkuOTA1NjMxLDkuOTk5Nzk0NiA0LjAxODQ4MSw2LjAzODg2NSA2LjE2MDAxNCwxMi4yMzcyNTkgNi44MTA1NywxOS43MTQ0NzIgMC41MzEwNyw2LjEwMjYyMyAtMC4zODMyMDgsMTIuMDYwMTU5IC0yLjg2Mjc0NSwxOC42OTQyMDQgLTQuODI1NjE1LDEyLjkwMjU2NiAtMTMuNTk3NTY3LDI1Ljc4MDgxNSAtMjguNzA1NDMyLDQyLjE0NDE0NSAtMy4zNzI4MTUsMy42NTI5OTIgLTMuOTcxMTYyLDMuOTkwMzYyIC01LjQ2ODUxOCwzLjA4MDYyIHoiCiAgICAgc3R5bGU9ImZpbGw6cmdiKDAsIDAsIDApO3N0cm9rZS13aWR0aDo0LjU1MzciCiAgICAgaWQ9InBhdGg0MTM1IgogICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiIC8+Cjwvc3ZnPgo=";var wn=function(){function i(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return i}();function Vk(i,t){return i>t?1:i<t?-1:0}function Mn(i,t,e){for(var n=new wn(null,null),o=n,r=n;;){var s=e(i,t.key);if(s<0){if(t.left===null)break;if(e(i,t.left.key)<0){var a=t.left;if(t.left=a.right,a.right=t,t=a,t.left===null)break}r.left=t,r=t,t=t.left}else if(s>0){if(t.right===null)break;if(e(i,t.right.key)>0){var a=t.right;if(t.right=a.left,a.left=t,t=a,t.right===null)break}o.right=t,o=t,t=t.right}else break}return o.right=t.left,r.left=t.right,t.left=n.right,t.right=n.left,t}function Bu(i,t,e,n){var o=new wn(i,t);if(e===null)return o.left=o.right=null,o;e=Mn(i,e,n);var r=n(i,e.key);return r<0?(o.left=e.left,o.right=e,e.left=null):r>=0&&(o.right=e.right,o.left=e,e.right=null),o}function rm(i,t,e){var n=null,o=null;if(t){t=Mn(i,t,e);var r=e(t.key,i);r===0?(n=t.left,o=t.right):r<0?(o=t.right,t.right=null,n=t):(n=t.left,t.left=null,o=t)}return{left:n,right:o}}function Xk(i,t,e){return t===null?i:(i===null||(t=Mn(i.key,t,e),t.left=i),t)}function Uu(i,t,e,n,o){if(i){n(""+t+(e?"└── ":"├── ")+o(i)+`
31
- `);var r=t+(e?" ":"│ ");i.left&&Uu(i.left,r,!1,n,o),i.right&&Uu(i.right,r,!0,n,o)}}var Wu=function(){function i(t){t===void 0&&(t=Vk),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=Bu(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new wn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var o=this._comparator,r=Mn(t,this._root,o),s=o(t,r.key);return s===0?this._root=r:(s<0?(n.left=r.left,n.right=r,r.left=null):s>0&&(n.right=r.right,n.left=r,r.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var o;if(e===null)return null;e=Mn(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=Mn(t,e.left,n),o.right=e.right),this._size--,o):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Mn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var o=n(t,e.key);if(o===0)return e;o<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=Mn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var o=n(t,e.key);if(o===0)return!0;o<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,o=[],r=!1;!r;)n!==null?(o.push(n),n=n.left):o.length!==0?(n=o.pop(),t.call(e,n),n=n.right):r=!0;return this},i.prototype.range=function(t,e,n,o){for(var r=[],s=this._comparator,a=this._root,l;r.length!==0||a;)if(a)r.push(a),a=a.left;else{if(a=r.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(o,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,o=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),o===t)return e;o++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return qk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var o=t.length,r=this._comparator;if(n&&Yu(t,e,0,o-1,r),this._root===null)this._root=Vu(t,e,0,o),this._size=o;else{var s=$k(this.toList(),Yk(t,e),r);o=this._size+o,this._root=Xu({head:s},0,o)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Uu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var o=this._comparator,r=rm(t,this._root,o),s=r.left,a=r.right;o(t,e)<0?a=Bu(e,n,a,o):s=Bu(e,n,s,o),this._root=Xk(s,a,o)},i.prototype.split=function(t){return rm(t,this._root,this._comparator)},i}();function Vu(i,t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2),s=i[r],a=t[r],l=new wn(s,a);return l.left=Vu(i,t,e,r),l.right=Vu(i,t,r+1,n),l}return null}function Yk(i,t){for(var e=new wn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new wn(i[o],t[o]);return n.next=null,e.next}function qk(i){for(var t=i,e=[],n=!1,o=new wn(null,null),r=o;!n;)t?(e.push(t),t=t.left):e.length>0?(t=r=r.next=e.pop(),t=t.right):n=!0;return r.next=null,o.next}function Xu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Xu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Xu(i,o+1,e),s}return null}function $k(i,t,e){for(var n=new wn(null,null),o=n,r=i,s=t;r!==null&&s!==null;)e(r.key,s.key)<0?(o.next=r,r=r.next):(o.next=s,s=s.next),o=o.next;return r!==null?o.next=r:s!==null&&(o.next=s),n.next}function Yu(i,t,e,n,o){if(!(e>=n)){for(var r=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(o(i[s],r)<0);do a--;while(o(i[a],r)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Yu(i,t,e,a,o),Yu(i,t,a+1,n,o)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function sm(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ee(i,t,e){return t&&sm(i.prototype,t),e&&sm(i,e),i}var ts=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},qu=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,o=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:r},ur:{x:o,y:s}}},Cn=Number.EPSILON;Cn===void 0&&(Cn=Math.pow(2,-52));var Zk=Cn*Cn,$u=function(t,e){if(-Cn<t&&t<Cn&&-Cn<e&&e<Cn)return 0;var n=t-e;return n*n<Zk*t*e?0:t<e?-1:1},Kk=function(){function i(){He(this,i),this.reset()}return Ee(i,[{key:"reset",value:function(){this.xRounder=new am,this.yRounder=new am}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),am=function(){function i(){He(this,i),this.tree=new Wu,this.round(0)}return Ee(i,[{key:"round",value:function(e){var n=this.tree.add(e),o=this.tree.prev(n);if(o!==null&&$u(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&$u(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),es=new Kk,is=function(t,e){return t.x*e.y-t.y*e.x},lm=function(t,e){return t.x*e.x+t.y*e.y},hm=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},s=is(o,r);return $u(s,0)},Xa=function(t){return Math.sqrt(lm(t,t))},Hk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return is(r,o)/Xa(r)/Xa(o)},Qk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return lm(r,o)/Xa(r)/Xa(o)},um=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},dm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Jk=function(t,e,n,o){if(e.x===0)return dm(n,o,t.x);if(o.x===0)return dm(t,e,n.x);if(e.y===0)return um(n,o,t.y);if(o.y===0)return um(t,e,n.y);var r=is(e,o);if(r==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=is(s,e)/r,l=is(s,o)/r,h=t.x+l*e.x,u=n.x+a*o.x,d=t.y+l*e.y,c=n.y+a*o.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},pi=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=i.comparePoints(e.point,n.point);return o!==0?o:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Ya.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){He(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ee(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,o=0,r=n.length;o<r;o++){var s=n[o];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var o=this.point.events[n];if(o.segment.consumedBy===void 0)for(var r=n+1;r<e;r++){var s=this.point.events[r];s.consumedBy===void 0&&o.otherSE.point.events===s.otherSE.point.events&&o.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,o=new Map,r=function(a){var l=a.otherSE;o.set(a,{sine:Hk(n.point,e.point,l.point),cosine:Qk(n.point,e.point,l.point)})};return function(s,a){o.has(s)||r(s),o.has(a)||r(a);var l=o.get(s),h=l.sine,u=l.cosine,d=o.get(a),c=d.sine,f=d.cosine;return h>=0&&c>=0?u<f?1:u>f?-1:0:h<0&&c<0?u<f?-1:u>f?1:0:c<h?-1:c>h?1:0}}}]),i}(),tw=0,Ya=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=e.leftSE.point.x,r=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<o)return 1;if(s<r)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(o<r){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(o>r){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var g=n.comparePoint(e.leftSE.point);if(g!==0)return g;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-o,x=d-h,k=a-r;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,o){He(this,i),this.id=++tw,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=o}return Ee(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,o=this.rightSE.point,r=this.vector();if(n.x===o.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/r.y,a=n.x+s*r.x;if(e.x===a)return 0;var l=(e.x-n.x)/r.x,h=n.y+l*r.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),o=e.bbox(),r=qu(n,o);if(r===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=ts(n,l)&&this.comparePoint(l)===0,d=ts(o,s)&&e.comparePoint(s)===0,c=ts(n,h)&&this.comparePoint(h)===0,f=ts(o,a)&&e.comparePoint(a)===0;if(d&&u)return f&&!c?a:!f&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return f&&a.x===l.x&&a.y===l.y?null:l;if(f&&c)return null;if(f)return a;if(c)return h;var g=Jk(s,this.vector(),l,e.vector());return g===null||!ts(r,g)?null:es.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],o=e.events!==void 0,r=new pi(e,!0),s=new pi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(r);var l=new i(r,a,this.rings.slice(),this.windings.slice());return pi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),pi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),o&&(r.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,o=e;n.consumedBy;)n=n.consumedBy;for(;o.consumedBy;)o=o.consumedBy;var r=i.compare(n,o);if(r!==0){if(r>0){var s=n;n=o,o=s}if(n.prev===o){var a=n;n=o,o=a}for(var l=0,h=o.rings.length;l<h;l++){var u=o.rings[l],d=o.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}o.rings=null,o.windings=null,o.consumedBy=n,o.leftSE.consumedBy=n.leftSE,o.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,o=this._afterState.windings,r=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),o.push(h)):o[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(o[f]!==0){var m=n[f],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;r.indexOf(x)===-1&&r.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(ri.type){case"union":{var o=e.length===0,r=n.length===0;this._isInResult=o!==r;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===ri.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(ri.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,o){var r,s,a,l=pi.comparePoints(e,n);if(l<0)r=e,s=n,a=1;else if(l>0)r=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new pi(r,!0),u=new pi(s,!1);return new i(h,u,[o],[a])}}]),i}(),cm=function(){function i(t,e,n){if(He(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=es.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var r=o,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=es.round(t[s][0],t[s][1]);l.x===r.x&&l.y===r.y||(this.segments.push(Ya.fromRing(r,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),r=l)}(o.x!==r.x||o.y!==r.y)&&this.segments.push(Ya.fromRing(r,o,this))}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE),e.push(r.rightSE)}return e}}]),i}(),ew=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new cm(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,o=t.length;n<o;n++){var r=new cm(t[n],this,!1);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,o=this.interiorRings.length;n<o;n++)for(var r=this.interiorRings[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),fm=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,o=t.length;n<o;n++){var r=new ew(t[n],this);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++)for(var r=this.polys[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),iw=function(){Ee(i,null,[{key:"factory",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var f=l.getAvailableLinkedEvents();if(f.length===0){var g=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(g.x,",")+" ".concat(g.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(f.length===1){h=f[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=f.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){He(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ee(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],o=1,r=this.events.length-1;o<r;o++){var s=this.events[o].point,a=this.events[o+1].point;hm(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];hm(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,f=[],g=d;g!=c;g+=u)f.push([n[g].x,n[g].y]);return f}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,o=this.events.length;n<o;n++){var r=this.events[n];pi.compare(e,r)>0&&(e=r)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),gm=function(){function i(t){He(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ee(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();r!==null&&e.push(r)}return e}}]),i}(),nw=function(){function i(t){He(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ee(i,[{key:"getGeom",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();r!==null&&e.push(r)}return e}},{key:"_composePolys",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!s.poly)if(s.isExteriorRing())n.push(new gm(s));else{var a=s.enclosingRing();a.poly||n.push(new gm(a)),a.poly.addInterior(s)}}return n}}]),i}(),ow=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ya.compare;He(this,i),this.queue=t,this.tree=new Wu(e),this.segments=[]}return Ee(i,[{key:"process",value:function(e){var n=e.segment,o=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),o;var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=r,a=r,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),f=0,g=c.length;f<g;f++)o.push(c[f])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)o.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=pi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),o.push(n.rightSE);for(var w=n.split(x),C=0,M=w.length;C<M;C++)o.push(w[C])}o.length>0?(this.tree.remove(n),o.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var z=this._splitSafely(l,S),P=0,j=z.length;P<j;P++)o.push(z[P]);if(!h.isAnEndpoint(S))for(var A=this._splitSafely(h,S),at=0,B=A.length;at<B;at++)o.push(A[at])}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);return r.push(o),e.consumedBy===void 0&&this.tree.insert(e),r}}]),i}(),mm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,rw=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,sw=function(){function i(){He(this,i)}return Ee(i,[{key:"run",value:function(e,n,o){ri.type=e,es.reset();for(var r=[new fm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new fm(o[s],!1));if(ri.numMultiPolys=r.length,ri.type==="difference")for(var l=r[0],h=1;h<r.length;)qu(r[h].bbox,l.bbox)!==null?h++:r.splice(h,1);if(ri.type==="intersection"){for(var u=0,d=r.length;u<d;u++)for(var c=r[u],f=u+1,g=r.length;f<g;f++)if(qu(c.bbox,r[f].bbox)===null)return[]}for(var m=new Wu(pi.compare),p=0,_=r.length;p<_;p++)for(var v=r[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>mm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new ow(m),w=m.size,C=m.pop();C;){var M=C.key;if(m.size===w){var S=M.segment;throw new Error("Unable to pop() ".concat(M.isLeft?"left":"right"," SweepEvent ")+"[".concat(M.point.x,", ").concat(M.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>mm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>rw)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var z=k.process(M),P=0,j=z.length;P<j;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,C=m.pop()}es.reset();var at=iw.factory(k.segments),B=new nw(at);return B.getGeom()}}]),i}(),ri=new sw,aw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("union",t,n)},lw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("intersection",t,n)},hw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("xor",t,n)},uw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("difference",t,n)},dw={union:aw,intersection:lw,xor:hw,difference:uw};function pm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function cw(i,t,e){e===void 0&&(e={});for(var n=0,o=i;n<o.length;n++){var r=o[n];if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<r[r.length-1].length;s++)if(r[r.length-1][s]!==r[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return pm(a,t,e)}function fw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return pm(n,t,e)}function vm(i){return i.type==="Feature"?i.geometry:i}function gw(i,t,e){e===void 0&&(e={});var n=vm(i),o=vm(t),r=dw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?cw(r[0],e.properties):fw(r,e.properties)}const mw="https://api.os.uk",_m={xyz:"/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png",vectorTile:"/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf",vectorTileStyle:"/maps/vector/v1/vts/resources/styles",places:"/search/places/v1/postcode",features:"/features/v1/wfs"};function ym(i,t,e={}){const n=new URL(t,i);return n.search=new URLSearchParams(e).toString(),decodeURI(n.href)}function pw({service:i,apiKey:t,params:e}){return ym(mw,_m[i],{...e,key:t})}function vw({service:i,proxyEndpoint:t,params:e}){let{origin:n,pathname:o}=new URL(t);return o=o.replace(/\/$/,""),ym(n,o+_m[i],e)}function ns({service:i,apiKey:t,proxyEndpoint:e,params:n}){if(e)return vw({service:i,proxyEndpoint:e,params:n});if(t)return pw({service:i,apiKey:t,params:n});throw Error(`Unable to generate URL for OS ${i} API. Either an API key or proxy endpoint must be supplied`)}function Zu(i,t){const e=uc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m²":t==="ha"&&(r=o+" ha"),r}function os(i,t,e){const n=t.getExtent();return i.getView().fit(di(n,e))}function qa(i,t){const[e,n,o]=Array.from(kr(i));return Kl([e,n,o,t])}function $a(i,t){return new Po().writeFeaturesObject(i instanceof Ai?i.getFeatures():i,{featureProjection:t})}const Ko=new Ai,si=new Ai;function _w(i,t,e){return new Qn({source:si,style:new te({stroke:e?void 0:new ke({width:3,color:i}),fill:new se({color:t?qa(i,.2):qa(i,0)})})})}function xm(i,t,e,n){const r={service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:`
31
+ `);var r=t+(e?" ":"│ ");i.left&&Uu(i.left,r,!1,n,o),i.right&&Uu(i.right,r,!0,n,o)}}var Wu=function(){function i(t){t===void 0&&(t=Vk),this._root=null,this._size=0,this._comparator=t}return i.prototype.insert=function(t,e){return this._size++,this._root=Bu(t,e,this._root,this._comparator)},i.prototype.add=function(t,e){var n=new wn(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var o=this._comparator,r=Mn(t,this._root,o),s=o(t,r.key);return s===0?this._root=r:(s<0?(n.left=r.left,n.right=r,r.left=null):s>0&&(n.right=r.right,n.left=r,r.right=null),this._size++,this._root=n),this._root},i.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},i.prototype._remove=function(t,e,n){var o;if(e===null)return null;e=Mn(t,e,n);var r=n(t,e.key);return r===0?(e.left===null?o=e.right:(o=Mn(t,e.left,n),o.right=e.right),this._size--,o):e},i.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Mn(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},i.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var o=n(t,e.key);if(o===0)return e;o<0?e=e.left:e=e.right}return null},i.prototype.find=function(t){return this._root&&(this._root=Mn(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},i.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var o=n(t,e.key);if(o===0)return!0;o<0?e=e.left:e=e.right}return!1},i.prototype.forEach=function(t,e){for(var n=this._root,o=[],r=!1;!r;)n!==null?(o.push(n),n=n.left):o.length!==0?(n=o.pop(),t.call(e,n),n=n.right):r=!0;return this},i.prototype.range=function(t,e,n,o){for(var r=[],s=this._comparator,a=this._root,l;r.length!==0||a;)if(a)r.push(a),a=a.left;else{if(a=r.pop(),l=s(a.key,e),l>0)break;if(s(a.key,t)>=0&&n.call(o,a))return this;a=a.right}return this},i.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},i.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},i.prototype.min=function(){return this._root?this.minNode(this._root).key:null},i.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},i.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},i.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},i.prototype.at=function(t){for(var e=this._root,n=!1,o=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),o===t)return e;o++,e=e.right}else n=!0;return null},i.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<0?(n=e,e=e.left):e=e.right}return n},i.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var o=this._comparator;e;){var r=o(t.key,e.key);if(r===0)break;r<0?e=e.left:(n=e,e=e.right)}return n},i.prototype.clear=function(){return this._root=null,this._size=0,this},i.prototype.toList=function(){return qk(this._root)},i.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var o=t.length,r=this._comparator;if(n&&Yu(t,e,0,o-1,r),this._root===null)this._root=Vu(t,e,0,o),this._size=o;else{var s=$k(this.toList(),Yk(t,e),r);o=this._size+o,this._root=Xu({head:s},0,o)}return this},i.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(i.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),i.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Uu(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},i.prototype.update=function(t,e,n){var o=this._comparator,r=rm(t,this._root,o),s=r.left,a=r.right;o(t,e)<0?a=Bu(e,n,a,o):s=Bu(e,n,s,o),this._root=Xk(s,a,o)},i.prototype.split=function(t){return rm(t,this._root,this._comparator)},i}();function Vu(i,t,e,n){var o=n-e;if(o>0){var r=e+Math.floor(o/2),s=i[r],a=t[r],l=new wn(s,a);return l.left=Vu(i,t,e,r),l.right=Vu(i,t,r+1,n),l}return null}function Yk(i,t){for(var e=new wn(null,null),n=e,o=0;o<i.length;o++)n=n.next=new wn(i[o],t[o]);return n.next=null,e.next}function qk(i){for(var t=i,e=[],n=!1,o=new wn(null,null),r=o;!n;)t?(e.push(t),t=t.left):e.length>0?(t=r=r.next=e.pop(),t=t.right):n=!0;return r.next=null,o.next}function Xu(i,t,e){var n=e-t;if(n>0){var o=t+Math.floor(n/2),r=Xu(i,t,o),s=i.head;return s.left=r,i.head=i.head.next,s.right=Xu(i,o+1,e),s}return null}function $k(i,t,e){for(var n=new wn(null,null),o=n,r=i,s=t;r!==null&&s!==null;)e(r.key,s.key)<0?(o.next=r,r=r.next):(o.next=s,s=s.next),o=o.next;return r!==null?o.next=r:s!==null&&(o.next=s),n.next}function Yu(i,t,e,n,o){if(!(e>=n)){for(var r=i[e+n>>1],s=e-1,a=n+1;;){do s++;while(o(i[s],r)<0);do a--;while(o(i[a],r)>0);if(s>=a)break;var l=i[s];i[s]=i[a],i[a]=l,l=t[s],t[s]=t[a],t[a]=l}Yu(i,t,e,a,o),Yu(i,t,a+1,n,o)}}function He(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function sm(i,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function Ee(i,t,e){return t&&sm(i.prototype,t),e&&sm(i,e),i}var ts=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},qu=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,o=t.ur.x<e.ur.x?t.ur.x:e.ur.x,r=t.ll.y<e.ll.y?e.ll.y:t.ll.y,s=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:r},ur:{x:o,y:s}}},Cn=Number.EPSILON;Cn===void 0&&(Cn=Math.pow(2,-52));var Zk=Cn*Cn,$u=function(t,e){if(-Cn<t&&t<Cn&&-Cn<e&&e<Cn)return 0;var n=t-e;return n*n<Zk*t*e?0:t<e?-1:1},Kk=function(){function i(){He(this,i),this.reset()}return Ee(i,[{key:"reset",value:function(){this.xRounder=new am,this.yRounder=new am}},{key:"round",value:function(e,n){return{x:this.xRounder.round(e),y:this.yRounder.round(n)}}}]),i}(),am=function(){function i(){He(this,i),this.tree=new Wu,this.round(0)}return Ee(i,[{key:"round",value:function(e){var n=this.tree.add(e),o=this.tree.prev(n);if(o!==null&&$u(n.key,o.key)===0)return this.tree.remove(e),o.key;var r=this.tree.next(n);return r!==null&&$u(n.key,r.key)===0?(this.tree.remove(e),r.key):e}}]),i}(),es=new Kk,is=function(t,e){return t.x*e.y-t.y*e.x},lm=function(t,e){return t.x*e.x+t.y*e.y},hm=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y},s=is(o,r);return $u(s,0)},Xa=function(t){return Math.sqrt(lm(t,t))},Hk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return is(r,o)/Xa(r)/Xa(o)},Qk=function(t,e,n){var o={x:e.x-t.x,y:e.y-t.y},r={x:n.x-t.x,y:n.y-t.y};return lm(r,o)/Xa(r)/Xa(o)},um=function(t,e,n){return e.y===0?null:{x:t.x+e.x/e.y*(n-t.y),y:n}},dm=function(t,e,n){return e.x===0?null:{x:n,y:t.y+e.y/e.x*(n-t.x)}},Jk=function(t,e,n,o){if(e.x===0)return dm(n,o,t.x);if(o.x===0)return dm(t,e,n.x);if(e.y===0)return um(n,o,t.y);if(o.y===0)return um(t,e,n.y);var r=is(e,o);if(r==0)return null;var s={x:n.x-t.x,y:n.y-t.y},a=is(s,e)/r,l=is(s,o)/r,h=t.x+l*e.x,u=n.x+a*o.x,d=t.y+l*e.y,c=n.y+a*o.y,f=(h+u)/2,g=(d+c)/2;return{x:f,y:g}},pi=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=i.comparePoints(e.point,n.point);return o!==0?o:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Ya.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(e,n){return e.x<n.x?-1:e.x>n.x?1:e.y<n.y?-1:e.y>n.y?1:0}}]);function i(t,e){He(this,i),t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}return Ee(i,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,o=0,r=n.length;o<r;o++){var s=n[o];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,n=0;n<e;n++){var o=this.point.events[n];if(o.segment.consumedBy===void 0)for(var r=n+1;r<e;r++){var s=this.point.events[r];s.consumedBy===void 0&&o.otherSE.point.events===s.otherSE.point.events&&o.segment.consume(s.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],n=0,o=this.point.events.length;n<o;n++){var r=this.point.events[n];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&e.push(r)}return e}},{key:"getLeftmostComparator",value:function(e){var n=this,o=new Map,r=function(a){var l=a.otherSE;o.set(a,{sine:Hk(n.point,e.point,l.point),cosine:Qk(n.point,e.point,l.point)})};return function(s,a){o.has(s)||r(s),o.has(a)||r(a);var l=o.get(s),h=l.sine,u=l.cosine,d=o.get(a),c=d.sine,f=d.cosine;return h>=0&&c>=0?u<f?1:u>f?-1:0:h<0&&c<0?u<f?-1:u>f?1:0:c<h?-1:c>h?1:0}}}]),i}(),tw=0,Ya=function(){Ee(i,null,[{key:"compare",value:function(e,n){var o=e.leftSE.point.x,r=n.leftSE.point.x,s=e.rightSE.point.x,a=n.rightSE.point.x;if(a<o)return 1;if(s<r)return-1;var l=e.leftSE.point.y,h=n.leftSE.point.y,u=e.rightSE.point.y,d=n.rightSE.point.y;if(o<r){if(h<l&&h<u)return 1;if(h>l&&h>u)return-1;var c=e.comparePoint(n.leftSE.point);if(c<0)return 1;if(c>0)return-1;var f=n.comparePoint(e.rightSE.point);return f!==0?f:-1}if(o>r){if(l<h&&l<d)return-1;if(l>h&&l>d)return 1;var g=n.comparePoint(e.leftSE.point);if(g!==0)return g;var m=e.comparePoint(n.rightSE.point);return m<0?1:m>0?-1:1}if(l<h)return-1;if(l>h)return 1;if(s<a){var p=n.comparePoint(e.rightSE.point);if(p!==0)return p}if(s>a){var _=e.comparePoint(n.rightSE.point);if(_<0)return 1;if(_>0)return-1}if(s!==a){var v=u-l,y=s-o,x=d-h,k=a-r;if(v>y&&x<k)return 1;if(v<y&&x>k)return-1}return s>a?1:s<a||u<d?-1:u>d?1:e.id<n.id?-1:e.id>n.id?1:0}}]);function i(t,e,n,o){He(this,i),this.id=++tw,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=o}return Ee(i,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<n?e:n},ur:{x:this.rightSE.point.x,y:e>n?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,o=this.rightSE.point,r=this.vector();if(n.x===o.x)return e.x===n.x?0:e.x<n.x?1:-1;var s=(e.y-n.y)/r.y,a=n.x+s*r.x;if(e.x===a)return 0;var l=(e.x-n.x)/r.x,h=n.y+l*r.y;return e.y===h?0:e.y<h?-1:1}},{key:"getIntersection",value:function(e){var n=this.bbox(),o=e.bbox(),r=qu(n,o);if(r===null)return null;var s=this.leftSE.point,a=this.rightSE.point,l=e.leftSE.point,h=e.rightSE.point,u=ts(n,l)&&this.comparePoint(l)===0,d=ts(o,s)&&e.comparePoint(s)===0,c=ts(n,h)&&this.comparePoint(h)===0,f=ts(o,a)&&e.comparePoint(a)===0;if(d&&u)return f&&!c?a:!f&&c?h:null;if(d)return c&&s.x===h.x&&s.y===h.y?null:s;if(u)return f&&a.x===l.x&&a.y===l.y?null:l;if(f&&c)return null;if(f)return a;if(c)return h;var g=Jk(s,this.vector(),l,e.vector());return g===null||!ts(r,g)?null:es.round(g.x,g.y)}},{key:"split",value:function(e){var n=[],o=e.events!==void 0,r=new pi(e,!0),s=new pi(e,!1),a=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(r);var l=new i(r,a,this.rings.slice(),this.windings.slice());return pi.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),pi.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),o&&(r.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,o=this.windings.length;n<o;n++)this.windings[n]*=-1}},{key:"consume",value:function(e){for(var n=this,o=e;n.consumedBy;)n=n.consumedBy;for(;o.consumedBy;)o=o.consumedBy;var r=i.compare(n,o);if(r!==0){if(r>0){var s=n;n=o,o=s}if(n.prev===o){var a=n;n=o,o=a}for(var l=0,h=o.rings.length;l<h;l++){var u=o.rings[l],d=o.windings[l],c=n.rings.indexOf(u);c===-1?(n.rings.push(u),n.windings.push(d)):n.windings[c]+=d}o.rings=null,o.windings=null,o.consumedBy=n,o.leftSE.consumedBy=n.leftSE,o.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var n=this._afterState.rings,o=this._afterState.windings,r=this._afterState.multiPolys,s=0,a=this.rings.length;s<a;s++){var l=this.rings[s],h=this.windings[s],u=n.indexOf(l);u===-1?(n.push(l),o.push(h)):o[u]+=h}for(var d=[],c=[],f=0,g=n.length;f<g;f++)if(o[f]!==0){var m=n[f],p=m.poly;if(c.indexOf(p)===-1)if(m.isExterior)d.push(p);else{c.indexOf(p)===-1&&c.push(p);var _=d.indexOf(m.poly);_!==-1&&d.splice(_,1)}}for(var v=0,y=d.length;v<y;v++){var x=d[v].multiPoly;r.indexOf(x)===-1&&r.push(x)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var e=this.beforeState().multiPolys,n=this.afterState().multiPolys;switch(ri.type){case"union":{var o=e.length===0,r=n.length===0;this._isInResult=o!==r;break}case"intersection":{var s,a;e.length<n.length?(s=e.length,a=n.length):(s=n.length,a=e.length),this._isInResult=a===ri.numMultiPolys&&s<a;break}case"xor":{var l=Math.abs(e.length-n.length);this._isInResult=l%2===1;break}case"difference":{var h=function(d){return d.length===1&&d[0].isSubject};this._isInResult=h(e)!==h(n);break}default:throw new Error("Unrecognized operation type found ".concat(ri.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,n,o){var r,s,a,l=pi.comparePoints(e,n);if(l<0)r=e,s=n,a=1;else if(l>0)r=n,s=e,a=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var h=new pi(r,!0),u=new pi(s,!1);return new i(h,u,[o],[a])}}]),i}(),cm=function(){function i(t,e,n){if(He(this,i),!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=es.round(t[0][0],t[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var r=o,s=1,a=t.length;s<a;s++){if(typeof t[s][0]!="number"||typeof t[s][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=es.round(t[s][0],t[s][1]);l.x===r.x&&l.y===r.y||(this.segments.push(Ya.fromRing(r,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),r=l)}(o.x!==r.x||o.y!==r.y)&&this.segments.push(Ya.fromRing(r,o,this))}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.segments.length;n<o;n++){var r=this.segments[n];e.push(r.leftSE),e.push(r.rightSE)}return e}}]),i}(),ew=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new cm(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,o=t.length;n<o;n++){var r=new cm(t[n],this,!1);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.interiorRings.push(r)}this.multiPoly=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,o=this.interiorRings.length;n<o;n++)for(var r=this.interiorRings[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),fm=function(){function i(t,e){if(He(this,i),!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,o=t.length;n<o;n++){var r=new ew(t[n],this);r.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=r.bbox.ll.x),r.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=r.bbox.ll.y),r.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=r.bbox.ur.x),r.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=r.bbox.ur.y),this.polys.push(r)}this.isSubject=e}return Ee(i,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++)for(var r=this.polys[n].getSweepEvents(),s=0,a=r.length;s<a;s++)e.push(r[s]);return e}}]),i}(),iw=function(){Ee(i,null,[{key:"factory",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!(!s.isInResult()||s.ringOut)){for(var a=null,l=s.leftSE,h=s.rightSE,u=[l],d=l.point,c=[];a=l,l=h,u.push(l),l.point!==d;)for(;;){var f=l.getAvailableLinkedEvents();if(f.length===0){var g=u[0].point,m=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(g.x,",")+" ".concat(g.y,"]. Last matching segment found ends at")+" [".concat(m.x,", ").concat(m.y,"]."))}if(f.length===1){h=f[0].otherSE;break}for(var p=null,_=0,v=c.length;_<v;_++)if(c[_].point===l.point){p=_;break}if(p!==null){var y=c.splice(p)[0],x=u.splice(y.index);x.unshift(x[0].otherSE),n.push(new i(x.reverse()));continue}c.push({index:u.length,point:l.point});var k=l.getLeftmostComparator(a);h=f.sort(k)[0].otherSE;break}n.push(new i(u))}}return n}}]);function i(t){He(this,i),this.events=t;for(var e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}return Ee(i,[{key:"getGeom",value:function(){for(var e=this.events[0].point,n=[e],o=1,r=this.events.length-1;o<r;o++){var s=this.events[o].point,a=this.events[o+1].point;hm(s,e,a)!==0&&(n.push(s),e=s)}if(n.length===1)return null;var l=n[0],h=n[1];hm(l,e,h)===0&&n.shift(),n.push(n[0]);for(var u=this.isExteriorRing()?1:-1,d=this.isExteriorRing()?0:n.length-1,c=this.isExteriorRing()?n.length:-1,f=[],g=d;g!=c;g+=u)f.push([n[g].x,n[g].y]);return f}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],n=1,o=this.events.length;n<o;n++){var r=this.events[n];pi.compare(e,r)>0&&(e=r)}for(var s=e.segment.prevInResult(),a=s?s.prevInResult():null;;){if(!s)return null;if(!a)return s.ringOut;if(a.ringOut!==s.ringOut)return a.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=a.prevInResult(),a=s?s.prevInResult():null}}}]),i}(),gm=function(){function i(t){He(this,i),this.exteriorRing=t,t.poly=this,this.interiorRings=[]}return Ee(i,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,o=this.interiorRings.length;n<o;n++){var r=this.interiorRings[n].getGeom();r!==null&&e.push(r)}return e}}]),i}(),nw=function(){function i(t){He(this,i),this.rings=t,this.polys=this._composePolys(t)}return Ee(i,[{key:"getGeom",value:function(){for(var e=[],n=0,o=this.polys.length;n<o;n++){var r=this.polys[n].getGeom();r!==null&&e.push(r)}return e}},{key:"_composePolys",value:function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];if(!s.poly)if(s.isExteriorRing())n.push(new gm(s));else{var a=s.enclosingRing();a.poly||n.push(new gm(a)),a.poly.addInterior(s)}}return n}}]),i}(),ow=function(){function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ya.compare;He(this,i),this.queue=t,this.tree=new Wu(e),this.segments=[]}return Ee(i,[{key:"process",value:function(e){var n=e.segment,o=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),o;var r=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!r)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=r,a=r,l=void 0,h=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;h===void 0;)a=this.tree.next(a),a===null?h=null:a.key.consumedBy===void 0&&(h=a.key);if(e.isLeft){var u=null;if(l){var d=l.getIntersection(n);if(d!==null&&(n.isAnEndpoint(d)||(u=d),!l.isAnEndpoint(d)))for(var c=this._splitSafely(l,d),f=0,g=c.length;f<g;f++)o.push(c[f])}var m=null;if(h){var p=h.getIntersection(n);if(p!==null&&(n.isAnEndpoint(p)||(m=p),!h.isAnEndpoint(p)))for(var _=this._splitSafely(h,p),v=0,y=_.length;v<y;v++)o.push(_[v])}if(u!==null||m!==null){var x=null;if(u===null)x=m;else if(m===null)x=u;else{var k=pi.comparePoints(u,m);x=k<=0?u:m}this.queue.remove(n.rightSE),o.push(n.rightSE);for(var w=n.split(x),C=0,M=w.length;C<M;C++)o.push(w[C])}o.length>0?(this.tree.remove(n),o.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&h){var S=l.getIntersection(h);if(S!==null){if(!l.isAnEndpoint(S))for(var z=this._splitSafely(l,S),P=0,j=z.length;P<j;P++)o.push(z[P]);if(!h.isAnEndpoint(S))for(var A=this._splitSafely(h,S),at=0,B=A.length;at<B;at++)o.push(A[at])}}this.tree.remove(n)}return o}},{key:"_splitSafely",value:function(e,n){this.tree.remove(e);var o=e.rightSE;this.queue.remove(o);var r=e.split(n);return r.push(o),e.consumedBy===void 0&&this.tree.insert(e),r}}]),i}(),mm=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,rw=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,sw=function(){function i(){He(this,i)}return Ee(i,[{key:"run",value:function(e,n,o){ri.type=e,es.reset();for(var r=[new fm(n,!0)],s=0,a=o.length;s<a;s++)r.push(new fm(o[s],!1));if(ri.numMultiPolys=r.length,ri.type==="difference")for(var l=r[0],h=1;h<r.length;)qu(r[h].bbox,l.bbox)!==null?h++:r.splice(h,1);if(ri.type==="intersection"){for(var u=0,d=r.length;u<d;u++)for(var c=r[u],f=u+1,g=r.length;f<g;f++)if(qu(c.bbox,r[f].bbox)===null)return[]}for(var m=new Wu(pi.compare),p=0,_=r.length;p<_;p++)for(var v=r[p].getSweepEvents(),y=0,x=v.length;y<x;y++)if(m.insert(v[y]),m.size>mm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var k=new ow(m),w=m.size,C=m.pop();C;){var M=C.key;if(m.size===w){var S=M.segment;throw new Error("Unable to pop() ".concat(M.isLeft?"left":"right"," SweepEvent ")+"[".concat(M.point.x,", ").concat(M.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(m.size>mm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(k.segments.length>rw)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var z=k.process(M),P=0,j=z.length;P<j;P++){var A=z[P];A.consumedBy===void 0&&m.insert(A)}w=m.size,C=m.pop()}es.reset();var at=iw.factory(k.segments),B=new nw(at);return B.getGeom()}}]),i}(),ri=new sw,aw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("union",t,n)},lw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("intersection",t,n)},hw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("xor",t,n)},uw=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return ri.run("difference",t,n)},dw={union:aw,intersection:lw,xor:hw,difference:uw};function pm(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function cw(i,t,e){e===void 0&&(e={});for(var n=0,o=i;n<o.length;n++){var r=o[n];if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<r[r.length-1].length;s++)if(r[r.length-1][s]!==r[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:i};return pm(a,t,e)}function fw(i,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:i};return pm(n,t,e)}function vm(i){return i.type==="Feature"?i.geometry:i}function gw(i,t,e){e===void 0&&(e={});var n=vm(i),o=vm(t),r=dw.union(n.coordinates,o.coordinates);return r.length===0?null:r.length===1?cw(r[0],e.properties):fw(r,e.properties)}const mw="https://api.os.uk",_m={xyz:"/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png",vectorTile:"/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf",vectorTileStyle:"/maps/vector/v1/vts/resources/styles",places:"/search/places/v1/postcode",features:"/features/v1/wfs"};function ym(i,t,e={}){const n=new URL(t,i);return n.search=new URLSearchParams(e).toString(),decodeURI(n.href)}function pw({service:i,apiKey:t,params:e}){return ym(mw,_m[i],{...e,key:t})}function vw({service:i,proxyEndpoint:t,params:e}){let{origin:n,pathname:o}=new URL(t);return o=o.replace(/\/$/,""),ym(n,o+_m[i],e)}function ns({service:i,apiKey:t,proxyEndpoint:e,params:n}){if(e)return vw({service:i,proxyEndpoint:e,params:n});if(t)return pw({service:i,apiKey:t,params:n});throw Error(`Unable to generate URL for OS ${i} API. Either an API key or proxy endpoint must be supplied`)}function Zu(i,t){const e=uc(i),n=Math.round(e*100)/100,o=n/1e4;let r;return t==="m2"?r=n+" m²":t==="ha"&&(r=o+" ha"),r}function os(i,t,e){const n=t.getExtent();return i.getView().fit(di(n,e))}function qa(i,t){const[e,n,o]=Array.from(kr(i));return Kl([e,n,o,t])}function $a(i,t){const e=t==="EPSG:27700"?{dataProjection:t,featureProjection:"EPSG:3857"}:{featureProjection:t};return new Po().writeFeaturesObject(i instanceof Ai?i.getFeatures():i,e)}const Ko=new Ai,si=new Ai;function _w(i,t,e){return new Qn({source:si,style:new te({stroke:e?void 0:new ke({width:3,color:i}),fill:new se({color:t?qa(i,.2):qa(i,0)})})})}function xm(i,t,e,n){const r={service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:`
32
32
  <ogc:Filter>
33
33
  <ogc:Contains>
34
34
  <ogc:PropertyName>SHAPE</ogc:PropertyName>
package/dist/index.html CHANGED
@@ -43,7 +43,7 @@
43
43
  <div style="display:flex;flex-direction:column;">
44
44
  <h1 style="color:red;font-family:Inter,Helvetica,sans-serif;font-size:16px;">*** This is a testing sandbox - these components are unaware of each other! ***</h1>
45
45
  <div style="margin-bottom:1em">
46
- <my-map zoom="20" maxZoom="23" drawMode drawPointer="dot" id="example-map" showScale disableVectorTiles osProxyEndpoint="https://api.editor.planx.dev/proxy/ordnance-survey" />
46
+ <my-map zoom="20" maxZoom="23" drawMode drawPointer="dot" id="example-map" showScale osProxyEndpoint="https://api.editor.planx.dev/proxy/ordnance-survey" />
47
47
  </div>
48
48
  <div style="margin-bottom:1em">
49
49
  <postcode-search hintText="Optional hint text shows up here" id="example-postcode" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensystemslab/map",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "license": "OGL-UK-3.0",
5
5
  "private": false,
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "@testing-library/user-event": "^14.4.3",
43
43
  "@types/node": "^18.6.3",
44
44
  "@types/proj4": "^2.5.2",
45
- "@vitest/ui": "^0.27.0",
45
+ "@vitest/ui": "^0.28.4",
46
46
  "happy-dom": "^8.1.0",
47
47
  "husky": "^8.0.1",
48
48
  "lint-staged": "^13.0.3",