From 30fe6ab07734e297c3c9b6d781dca30b80c5c31d Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Sat, 27 Jul 2024 21:05:48 +0200 Subject: [PATCH] Updated documentation --- 1060.bundle.js | 3 ++- ....LICENSE.txt => 1060.bundle.js.LICENSE.txt | 0 1346.bundle.js | 2 +- 1562.bundle.js | 2 +- 182.bundle.js | 2 +- 1901.bundle.js | 2 +- 1917.bundle.js | 2 +- 1973.bundle.js | 2 +- 198.bundle.js | 2 +- 2003.bundle.js | 2 +- 2099.bundle.js | 2 +- 2148.bundle.js | 2 +- 2285.bundle.js | 2 +- 2345.bundle.js | 2 +- 2729.bundle.js | 2 +- 2836.bundle.js | 2 +- 2883.bundle.js | 2 +- 290.bundle.js | 1 + 3220.bundle.js | 2 +- 3371.bundle.js | 2 +- 4012.bundle.js | 2 +- 4025.bundle.js | 2 +- 4108.bundle.js | 2 +- 4629.bundle.js | 1 - 4783.bundle.js | 2 +- 5249.bundle.js | 2 +- 5408.bundle.js | 1 - 5451.bundle.js | 2 -- 6025.bundle.js | 2 +- 6537.bundle.js | 2 +- 6782.bundle.js | 2 +- 681.bundle.js | 2 +- 6946.bundle.js | 1 - 7240.bundle.js | 2 +- 7379.bundle.js | 2 +- 8224.bundle.js | 2 +- 8296.bundle.js | 2 +- 8621.bundle.js | 2 +- 892.bundle.js | 2 +- 8980.bundle.js | 2 +- 9155.bundle.js | 2 +- 9177.bundle.js | 2 +- 9467.bundle.js | 1 + 9633.bundle.js | 1 + 9921.bundle.js | 2 +- api/index.html | 27 +++++++------------ bundle.js | 2 +- bundle.js.LICENSE.txt | 6 ++--- index.html | 7 ++--- 49 files changed, 57 insertions(+), 68 deletions(-) rename 5451.bundle.js.LICENSE.txt => 1060.bundle.js.LICENSE.txt (100%) create mode 100644 290.bundle.js delete mode 100644 4629.bundle.js delete mode 100644 5408.bundle.js delete mode 100644 5451.bundle.js delete mode 100644 6946.bundle.js create mode 100644 9467.bundle.js create mode 100644 9633.bundle.js diff --git a/1060.bundle.js b/1060.bundle.js index eebee488..1026b57f 100644 --- a/1060.bundle.js +++ b/1060.bundle.js @@ -1 +1,2 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1060],{4748:e=>{"use strict";function t(e,t){this.x=e,this.y=t}e.exports=t,t.prototype={clone:function(){return new t(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,o=n*this.x+t*this.y;return this.x=r,this.y=o,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),o=t.x+n*(this.x-t.x)-r*(this.y-t.y),i=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=o,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(e){return e instanceof t?e:Array.isArray(e)?new t(e[0],e[1]):e}},4537:(e,t,n)=>{e.exports.VectorTile=n(7054),n(8729),n(6241)},7054:(e,t,n)=>{"use strict";var r=n(6241);function o(e,t,n){if(3===e){var o=new r(n,n.readVarint()+n.pos);o.length&&(t[o.name]=o)}}e.exports=function(e,t){this.layers=e.readFields(o,{},t)}},8729:(e,t,n)=>{"use strict";var r=n(4748);function o(e,t,n,r,o){this.properties={},this.extent=n,this.type=0,this._pbf=e,this._geometry=-1,this._keys=r,this._values=o,e.readFields(i,this,t)}function i(e,t,n){1==e?t.id=n.readVarint():2==e?function(e,t){for(var n=e.readVarint()+e.pos;e.pos>3}if(i--,1===o||2===o)s+=e.readSVarint(),a+=e.readSVarint(),1===o&&(t&&l.push(t),t=[]),t.push(new r(s,a));else{if(7!==o)throw new Error("unknown command "+o);t&&t.push(t[0].clone())}}return t&&l.push(t),l},o.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,o=0,i=0,s=1/0,a=-1/0,l=1/0,u=-1/0;e.pos>3}if(r--,1===n||2===n)(o+=e.readSVarint())a&&(a=o),(i+=e.readSVarint())u&&(u=i);else if(7!==n)throw new Error("unknown command "+n)}return[s,l,a,u]},o.prototype.toGeoJSON=function(e,t,n){var r,i,a=this.extent*Math.pow(2,n),l=this.extent*e,u=this.extent*t,d=this.loadGeometry(),c=o.types[this.type];function h(e){for(var t=0;t{"use strict";var r=n(8729);function o(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(i,this,t),this.length=this._features.length}function i(e,t,n){15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){for(var t=null,n=e.readVarint()+e.pos;e.pos>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}e.exports=o,o.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new r(this._pbf,t,this.extent,this._keys,this._values)}},1060:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{MBTilesFormat:()=>A,MBTilesRasterSource:()=>R,MBTilesVectorSource:()=>O,importMBTiles:()=>L}),globalThis.sqlite3Worker1Promiser=function e(t=e.defaultConfig){if(1===arguments.length&&"function"==typeof arguments[0]){const n=t;(t=Object.assign(Object.create(null),e.defaultConfig)).onready=n}else t=Object.assign(Object.create(null),e.defaultConfig,t);const n=Object.create(null),r=function(){},o=t.onerror||r,i=t.debug||r,s=t.generateMessageId?void 0:Object.create(null),a=t.generateMessageId||function(e){return e.type+"#"+(s[e.type]=(s[e.type]||0)+1)},l=(...e)=>{throw new Error(e.join(" "))};let u;return t.worker||(t.worker=e.defaultConfig.worker),"function"==typeof t.worker&&(t.worker=t.worker()),t.worker.onmessage=function(e){e=e.data,i("worker1.onmessage",e);let r=n[e.messageId];if(!r)return e&&"sqlite3-api"===e.type&&"worker1-ready"===e.result?void(t.onready&&t.onready()):(r=n[e.type],r&&r.onrow?void r.onrow(e):void(t.onunhandled?t.onunhandled(arguments[0]):o("sqlite3Worker1Promiser() unhandled worker message:",e)));switch(delete n[e.messageId],e.type){case"error":return void r.reject(e);case"open":u||(u=e.dbId);break;case"close":e.dbId===u&&(u=void 0)}try{r.resolve(e)}catch(e){r.reject(e)}},function(){let e;1===arguments.length?e=arguments[0]:2===arguments.length?(e=Object.create(null),e.type=arguments[0],e.args=arguments[1]):l("Invalid arugments for sqlite3Worker1Promiser()-created factory."),e.dbId||(e.dbId=u),e.messageId=a(e),e.departureTime=performance.now();const r=Object.create(null);let o;r.message=e,"exec"===e.type&&e.args&&("function"==typeof e.args.callback?(o=e.messageId+":row",r.onrow=e.args.callback,e.args.callback=o,n[o]=r):"string"==typeof e.args.callback&&l("exec callback may not be a string when using the Promise interface."));let s=new Promise((function(o,s){r.resolve=o,r.reject=s,n[e.messageId]=r,i("Posting",e.type,"message to Worker dbId="+(u||"default")+":",e),t.worker.postMessage(e)}));return o&&(s=s.finally((()=>delete n[o]))),s}},globalThis.sqlite3Worker1Promiser.defaultConfig={worker:function(){return new Worker(new URL(n.p+n.u(1901),n.b),{type:void 0})},onerror:(...e)=>console.error("worker1 promiser error",...e)};const o={timeout:2e4,maxPageSize:4096,cacheSize:1024,headers:{}};var i;!function(e){e[e.WORKMSG=16777215]="WORKMSG",e[e.HANDSHAKE=16777214]="HANDSHAKE"}(i=i||(i={}));const s="undefined"!=typeof SQLITE_DEBUG&&SQLITE_DEBUG||void 0!==(null===(r=void 0==={env:{RLAYERS_DEBUG:void 0}}?void 0:{RLAYERS_DEBUG:void 0})||void 0===r?void 0:r.SQLITE_DEBUG)&&{RLAYERS_DEBUG:void 0}.SQLITE_DEBUG||"",a=["threads","vfs","cache","http"],l={};for(const e of a)l[e]=s.includes(e)?console.debug.bind(console):()=>{};!function(){const e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=240,t[1]=13,61453==n[0])return l.threads("System is Big-Endian"),!1;if(3568==n[0])return l.threads("System is Little-Endian"),!0;throw new Error(`Failed determining endianness: ${n}`)}();var u=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};function d(e){let t;return l.threads("Creating new SQLite thread",e),new Promise(((r,o)=>{const i=sqlite3Worker1Promiser({onready:()=>{r(i)},worker:()=>{try{t=new Worker(new URL(n.p+n.u(7985),n.b)),t.onerror=e=>console.error("Worker bootstrap failed",e);const r=null==e?void 0:e.http;return"shared"===(null==r?void 0:r.type)?r.createNewChannel().then((e=>{t.postMessage({httpChannel:e,httpOptions:r.options},[e.port])})):"sync"===(null==r?void 0:r.type)?t.postMessage({httpChannel:!0,httpOptions:r.options}):t.postMessage({}),t}catch(e){console.error("Failed to create SQLite worker",e),o(e)}}})})).then((e=>(e.close=()=>{t.terminate()},e)))}const c='SharedArrayBuffer is not available. If your browser supports it, the webserver must send "Cross-Origin-Opener-Policy: same-origin "and "Cross-Origin-Embedder-Policy: require-corp" headers. Alternatively, if you do not intend to use concurrent connections, pass `sync` to `createHttpBackend` to explicitly create a synchronous HTTP backend and suppress this warning message.';function h(e){var t;return u(this,void 0,void 0,(function*(){const r=function(e){if(l.threads("Creating new HTTP VFS backend thread"),"undefined"==typeof SharedArrayBuffer||"sync"===(null==e?void 0:e.backendType)){if("shared"===(null==e?void 0:e.backendType))throw new Error(c);return"sync"!==(null==e?void 0:e.backendType)&&console.warn(c+" Falling back to the legacy HTTP backend."),{type:"sync",worker:null,options:e,createNewChannel:()=>{throw new Error("Sync backend does not support channels")},close:()=>Promise.resolve(),terminate:()=>{}}}let t=1;const r=new Worker(new URL(n.p+n.u(5806),n.b));r.postMessage({msg:"init",options:e});const i={};return r.onmessage=({data:e})=>{if(l.threads("Received control message reply",e),"ack"===e.msg)return i[e.id]?(l.threads("New HTTP VFS channel created",i),i[e.id].resolve({port:i[e.id].channel.port2,shm:e.shm}),clearTimeout(i[e.id].timeout),delete i[e.id].resolve,void delete i[e.id].timeout):void console.error("Invalid response received from backend",e)},{type:"shared",worker:r,options:e,createNewChannel:function(){l.threads("Creating a new HTTP VFS channel");const n=new MessageChannel,s=t++;return r.postMessage({msg:"handshake",port:n.port1,id:s},[n.port1]),new Promise(((t,r)=>{var a;const l=setTimeout((()=>{delete i[s],r("Timeout while waiting on backend")}),null!==(a=null==e?void 0:e.timeout)&&void 0!==a?a:o.timeout);i[s]={id:s,channel:n,resolve:t,timeout:l}}))},terminate:function(){r.terminate()},close:function(){return l.threads("Closing the HTTP VFS channel"),r.postMessage({msg:"close"}),new Promise(((t,n)=>{var i;const s=setTimeout((()=>{n("Timeout while waiting on backend")}),null!==(i=null==e?void 0:e.timeout)&&void 0!==i?i:o.timeout);r.onmessage=({data:e})=>{l.threads("Received close response",e),"ack"===e.msg&&void 0===e.id&&(t(),clearTimeout(s))}}))}}}(null==e?void 0:e.httpOptions),i=[],s=[];for(let n=0;n<(null!==(t=e.workers)&&void 0!==t?t:1);n++)s.push(d({http:r}).then((e=>i.push({worker:e,busy:null}))).then((()=>{})));return yield Promise.all(s),{backendType:r.type,open:e=>Promise.all(i.map((t=>t.worker("open",{filename:"file:"+encodeURI(e),vfs:"http"})))).then((()=>{})),close:()=>Promise.all(i.map((e=>e.worker.close()))).then((()=>r.close())),exec:function(e,t,n){return u(this,void 0,void 0,(function*(){let r;do{r=i.find((e=>!e.busy)),r||(yield Promise.race(i.map((e=>e.busy))).catch((()=>{})))}while(!r);const o=[];return r.busy=r.worker("exec",{sql:e,bind:t,rowMode:null==n?void 0:n.rowMode,callback:e=>{e.row&&o.push(e)}}).then((()=>{})).finally((()=>{if(!r)throw new Error("Lost worker pool");r.busy=null})),yield r.busy,o}))}}}))}var p,f=n(3407),y=n(915),m=n(6758),v=n(5620),g=n(5335),w=n(4537),x=n(3075),b=n(8217),_=n(5286),k=n(4778),E=n(4087),S=n(8512),P=n(1078);const M="undefined"!=typeof OL_MBTILES_DEBUG&&OL_MBTILES_DEBUG||void 0!==(null===(p=void 0==={env:{RLAYERS_DEBUG:void 0}}?void 0:{RLAYERS_DEBUG:void 0})||void 0===p?void 0:p.OL_MBTILES_DEBUG)&&{RLAYERS_DEBUG:void 0}.OL_MBTILES_DEBUG?console.debug.bind(console):()=>{},T={jpg:{type:"raster",mime:"image/jpeg"},png:{type:"raster",mime:"image/png"},webp:{type:"raster",mime:"image/webp"},pbf:{type:"vector"},mvt:{type:"vector"}};function C(e){var t,n,r;return{workers:null!==(t=null==e?void 0:e.sqlWorkers)&&void 0!==t?t:4,httpOptions:{backendType:null==e?void 0:e.backendType,maxPageSize:null!==(n=null==e?void 0:e.maxSqlPageSize)&&void 0!==n?n:4096,cacheSize:null!==(r=null==e?void 0:e.sqlCacheSize)&&void 0!==r?r:4096}}}function L(e){const t=h(C(e));return t.then((t=>t.open(e.url).then((()=>t)))).then((e=>e.exec("SELECT name,value FROM metadata"))).then((e=>{if(e&&e.length){const t=e.reduce(((e,t)=>(e[t.row[0]]=t.row[1],e)),{});return M("Loaded metadata",t),t}throw new Error("Could not load metadata")})).then((n=>{var r,o,i,s,a,l,u,d,c;const h=Object.assign({},e),p=null===(o=null===(r=n.format)||void 0===r?void 0:r.toLowerCase)||void 0===o?void 0:o.call(r);T[p]||console.warn("Unknown tile format",p),h.projection=null!==(i=e.projection)&&void 0!==i?i:"EPSG:3857",h.attributions=null!==(s=n.attribution)&&void 0!==s?s:n.description,h.maxZoom=null!==(a=e.maxZoom)&&void 0!==a?a:+n.maxzoom,h.minZoom=null!==(l=e.minZoom)&&void 0!==l?l:+n.minzoom;const v=null===(d=null===(u=(0,f.Jt)(h.projection))||void 0===u?void 0:u.getExtent)||void 0===d?void 0:d.call(u),g=n.bounds,w=g?(0,f.DI)(g.split(",").map((e=>+e)),"EPSG:4326",h.projection):v;if("raster"===T[p].type){if(void 0===h.maxZoom||void 0===h.minZoom||void 0===v)throw new Error("Cannot determine tilegrid, need minZoom, maxZoom");const e=[(0,y.RG)(v)/256];for(let t=1;t<=h.maxZoom;t++)e.push(e[e.length-1]/2);const t=null!==(c=T[p].mime)&&void 0!==c?c:p;h.mime=t,h.tileGrid=new m.A({origin:[v[0],v[2]],extent:w,minZoom:h.minZoom,resolutions:e})}else h.extent=v;return h.pool=t,h.url=e.url,h})).catch((e=>t.then((e=>e.close())).then((()=>Promise.reject(e)))))}const B=E.xv.split(".").map((e=>+e)),j=B[0]>8||8===B[0]&&B[1]>=2;class A extends b.Ay{constructor(e){var t,n,r;super(),e=e||{},this.dataProjection=new _.A({code:"",units:"tile-pixels"}),this.featureClass_=e.featureClass?e.featureClass:k.Ay,this.geometryName_=null!==(t=e.geometryName)&&void 0!==t?t:"Geometry",this.layers_=null!==(n=e.layers)&&void 0!==n?n:null,this.idProperty_=e.idProperty,this.extent=null!==(r=e.extent)&&void 0!==r?r:4096,this.supportedMediaTypes=["application/vnd-mbtiles"]}readFeature(e,t){const n=e.properties;let r;this.idProperty_?(r=n[this.idProperty_],delete n[this.idProperty_]):r=e.id;const o=e.loadGeometry(),i=[],s=[],a=A.MBTypes[o.length>1?"multi":"mono"][e.type];if("Unknown"===a)return null;for(let e=0;e`${e.url}#${t[0]}:${t[1]}:${t[2]}`})),this.setTileLoadFunction(this.tileLoader.bind(this)),this.pool=null!==(t=e.pool)&&void 0!==t?t:h(C(e)).then((t=>t.open(e.url).then((()=>t))))}tileLoader(e,t){const n=e;M("loading tile",[n.tileCoord[0],n.tileCoord[1],n.tileCoord[2]]),n.setLoader(((e,t,r)=>{this.pool.then((e=>e.exec("SELECT tile_data FROM tiles WHERE zoom_level = $zoom AND tile_column = $col AND tile_row = $row",{$zoom:n.tileCoord[0],$col:n.tileCoord[1],$row:(1<{if(t&&t[0]&&t[0].row[0]){const o=n.getFormat().readFeatures(t[0].row[0],{extent:e,featureProjection:r});return n.setFeatures(o),void n.onLoad(o,r)}throw new Error(`No data for ${n.tileCoord}`)})).catch((e=>{M(e),n.onError()}))}))}disposeInternal(){return this.pool.then((e=>e.close()))}}class R extends S.A{constructor(e){var t;if(void 0===e.url&&void 0===e.pool)throw new Error("Must specify url");super(Object.assign(Object.assign({},e),{url:void 0,tileUrlFunction:t=>`${e.url}#${t[0]}:${t[1]}:${t[2]}`})),this.setTileLoadFunction(this.tileLoader.bind(this)),this.pool=null!==(t=e.pool)&&void 0!==t?t:h(C(e)).then((t=>t.open(e.url).then((()=>t)))),this.mime=e.mime}tileLoader(e,t){M("loading tile",[e.tileCoord[0],e.tileCoord[1],e.tileCoord[2]]);const n=e.getImage();this.pool.then((t=>t.exec("SELECT tile_data FROM tiles WHERE zoom_level = $zoom AND tile_column = $col AND tile_row = $row",{$zoom:e.tileCoord[0],$col:e.tileCoord[1],$row:(1<{if(!(t&&t[0]&&t[0].row[0]instanceof Uint8Array))throw new Error(`No data for ${e.tileCoord}`);{const e=new Blob([t[0].row[0]],{type:this.mime}),r=URL.createObjectURL(e);n.src=r}})).catch((t=>{M(t),e.setState(P.A.ERROR)}))}disposeInternal(){return this.pool.then((e=>e.close()))}}}}]); \ No newline at end of file +/*! For license information please see 1060.bundle.js.LICENSE.txt */ +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1060],{4748:t=>{"use strict";function e(t,e){this.x=t,this.y=e}t.exports=e,e.prototype={clone:function(){return new e(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(t){return t instanceof e?t:Array.isArray(t)?new e(t[0],t[1]):t}},4537:(t,e,r)=>{t.exports.VectorTile=r(7054),r(8729),r(6241)},7054:(t,e,r)=>{"use strict";var i=r(6241);function n(t,e,r){if(3===t){var n=new i(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}t.exports=function(t,e){this.layers=t.readFields(n,{},e)}},8729:(t,e,r)=>{"use strict";var i=r(4748);function n(t,e,r,i,n){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n,t.readFields(o,this,e)}function o(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos>3}if(o--,1===n||2===n)s+=t.readSVarint(),a+=t.readSVarint(),1===n&&(e&&u.push(e),e=[]),e.push(new i(s,a));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&u.push(e),u},n.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,s=1/0,a=-1/0,u=1/0,h=-1/0;t.pos>3}if(i--,1===r||2===r)(n+=t.readSVarint())a&&(a=n),(o+=t.readSVarint())h&&(h=o);else if(7!==r)throw new Error("unknown command "+r)}return[s,u,a,h]},n.prototype.toGeoJSON=function(t,e,r){var i,o,a=this.extent*Math.pow(2,r),u=this.extent*t,h=this.extent*e,l=this.loadGeometry(),d=n.types[this.type];function c(t){for(var e=0;e{"use strict";var i=r(8729);function n(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(o,this,e),this.length=this._features.length}function o(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(r))}t.exports=n,n.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new i(this._pbf,e,this.extent,this._keys,this._values)}},251:(t,e)=>{e.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,u=(1<>1,l=-7,d=r?n-1:0,c=r?-1:1,f=t[e+d];for(d+=c,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+t[e+d],d+=c,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=i;l>0;s=256*s+t[e+d],d+=c,l-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,i),o-=h}return(f?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var s,a,u,h=8*o-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+d>=1?c/u:c*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(e*u-1)*Math.pow(2,n),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;t[r+f]=255&a,f+=p,a/=256,n-=8);for(s=s<0;t[r+f]=255&s,f+=p,s/=256,h-=8);t[r+f-p]|=128*y}},5335:(t,e,r)=>{"use strict";t.exports=n;var i=r(251);function n(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}n.Varint=0,n.Fixed64=1,n.Bytes=2,n.Fixed32=5;var o=4294967296,s=1/o,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function u(t){return t.type===n.Bytes?t.readVarint()+t.pos:t.pos+1}function h(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function l(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function d(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function F(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=F(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=b(this.buf,this.pos)+b(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=b(this.buf,this.pos)+F(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128)return h(t,i,e);if(i|=(127&(n=o[r.pos++]))<<3,n<128)return h(t,i,e);if(i|=(127&(n=o[r.pos++]))<<10,n<128)return h(t,i,e);if(i|=(127&(n=o[r.pos++]))<<17,n<128)return h(t,i,e);if(i|=(127&(n=o[r.pos++]))<<24,n<128)return h(t,i,e);if(i|=(1&(n=o[r.pos++]))<<31,n<128)return h(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&a?function(t,e,r){return a.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var i="",n=e;n239?4:u>223?3:u>191?2:1;if(n+l>r)break;1===l?u<128&&(h=u):2===l?128==(192&(o=t[n+1]))&&(h=(31&u)<<6|63&o)<=127&&(h=null):3===l?(o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&((h=(15&u)<<12|(63&o)<<6|63&s)<=2047||h>=55296&&h<=57343)&&(h=null)):4===l&&(o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,l=1):h>65535&&(h-=65536,i+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),i+=String.fromCharCode(h),n+=l}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==n.Bytes)return t.push(this.readVarint(e));var r=u(this);for(t=t||[];this.pos127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&l(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&l(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,w,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,m,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},1060:(t,e,r)=>{"use strict";var i;r.r(e),r.d(e,{MBTilesFormat:()=>V,MBTilesRasterSource:()=>C,MBTilesVectorSource:()=>T,importMBTiles:()=>B}),globalThis.sqlite3Worker1Promiser=function t(e=t.defaultConfig){if(1===arguments.length&&"function"==typeof arguments[0]){const r=e;(e=Object.assign(Object.create(null),t.defaultConfig)).onready=r}else e=Object.assign(Object.create(null),t.defaultConfig,e);const r=Object.create(null),i=function(){},n=e.onerror||i,o=e.debug||i,s=e.generateMessageId?void 0:Object.create(null),a=e.generateMessageId||function(t){return t.type+"#"+(s[t.type]=(s[t.type]||0)+1)},u=(...t)=>{throw new Error(t.join(" "))};let h;return e.worker||(e.worker=t.defaultConfig.worker),"function"==typeof e.worker&&(e.worker=e.worker()),e.worker.onmessage=function(t){t=t.data,o("worker1.onmessage",t);let i=r[t.messageId];if(!i)return t&&"sqlite3-api"===t.type&&"worker1-ready"===t.result?void(e.onready&&e.onready()):(i=r[t.type],i&&i.onrow?void i.onrow(t):void(e.onunhandled?e.onunhandled(arguments[0]):n("sqlite3Worker1Promiser() unhandled worker message:",t)));switch(delete r[t.messageId],t.type){case"error":return void i.reject(t);case"open":h||(h=t.dbId);break;case"close":t.dbId===h&&(h=void 0)}try{i.resolve(t)}catch(t){i.reject(t)}},function(){let t;1===arguments.length?t=arguments[0]:2===arguments.length?(t=Object.create(null),t.type=arguments[0],t.args=arguments[1]):u("Invalid arugments for sqlite3Worker1Promiser()-created factory."),t.dbId||(t.dbId=h),t.messageId=a(t),t.departureTime=performance.now();const i=Object.create(null);let n;i.message=t,"exec"===t.type&&t.args&&("function"==typeof t.args.callback?(n=t.messageId+":row",i.onrow=t.args.callback,t.args.callback=n,r[n]=i):"string"==typeof t.args.callback&&u("exec callback may not be a string when using the Promise interface."));let s=new Promise((function(n,s){i.resolve=n,i.reject=s,r[t.messageId]=i,o("Posting",t.type,"message to Worker dbId="+(h||"default")+":",t),e.worker.postMessage(t)}));return n&&(s=s.finally((()=>delete r[n]))),s}},globalThis.sqlite3Worker1Promiser.defaultConfig={worker:function(){return new Worker(new URL(r.p+r.u(1901),r.b),{type:void 0})},onerror:(...t)=>console.error("worker1 promiser error",...t)};const n={timeout:2e4,maxPageSize:4096,cacheSize:1024,headers:{}};var o;!function(t){t[t.WORKMSG=16777215]="WORKMSG",t[t.HANDSHAKE=16777214]="HANDSHAKE"}(o=o||(o={}));const s="undefined"!=typeof SQLITE_DEBUG&&SQLITE_DEBUG||void 0!==(null===(i=void 0==={env:{RLAYERS_DEBUG:void 0}}?void 0:{RLAYERS_DEBUG:void 0})||void 0===i?void 0:i.SQLITE_DEBUG)&&{RLAYERS_DEBUG:void 0}.SQLITE_DEBUG||"",a=["threads","vfs","cache","http"],u={};for(const t of a)u[t]=s.includes(t)?console.debug.bind(console):()=>{};!function(){const t=new ArrayBuffer(2),e=new Uint8Array(t),r=new Uint16Array(t);if(e[0]=240,e[1]=13,61453==r[0])return u.threads("System is Big-Endian"),!1;if(3568==r[0])return u.threads("System is Little-Endian"),!0;throw new Error(`Failed determining endianness: ${r}`)}();var h=function(t,e,r,i){return new(r||(r=Promise))((function(n,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((i=i.apply(t,e||[])).next())}))};function l(t){let e;return u.threads("Creating new SQLite thread",t),new Promise(((i,n)=>{const o=sqlite3Worker1Promiser({onready:()=>{i(o)},worker:()=>{try{e=new Worker(new URL(r.p+r.u(7985),r.b)),e.onerror=t=>console.error("Worker bootstrap failed",t);const i=null==t?void 0:t.http;return"shared"===(null==i?void 0:i.type)?i.createNewChannel().then((t=>{e.postMessage({httpChannel:t,httpOptions:i.options},[t.port])})):"sync"===(null==i?void 0:i.type)?e.postMessage({httpChannel:!0,httpOptions:i.options}):e.postMessage({}),e}catch(t){console.error("Failed to create SQLite worker",t),n(t)}}})})).then((t=>(t.close=()=>{e.terminate()},t)))}const d='SharedArrayBuffer is not available. If your browser supports it, the webserver must send "Cross-Origin-Opener-Policy: same-origin "and "Cross-Origin-Embedder-Policy: require-corp" headers. Alternatively, if you do not intend to use concurrent connections, pass `sync` to `createHttpBackend` to explicitly create a synchronous HTTP backend and suppress this warning message.';function c(t){var e;return h(this,void 0,void 0,(function*(){const i=function(t){if(u.threads("Creating new HTTP VFS backend thread"),"undefined"==typeof SharedArrayBuffer||"sync"===(null==t?void 0:t.backendType)){if("shared"===(null==t?void 0:t.backendType))throw new Error(d);return"sync"!==(null==t?void 0:t.backendType)&&console.warn(d+" Falling back to the legacy HTTP backend."),{type:"sync",worker:null,options:t,createNewChannel:()=>{throw new Error("Sync backend does not support channels")},close:()=>Promise.resolve(),terminate:()=>{}}}let e=1;const i=new Worker(new URL(r.p+r.u(5806),r.b));i.postMessage({msg:"init",options:t});const o={};return i.onmessage=({data:t})=>{if(u.threads("Received control message reply",t),"ack"===t.msg)return o[t.id]?(u.threads("New HTTP VFS channel created",o),o[t.id].resolve({port:o[t.id].channel.port2,shm:t.shm}),clearTimeout(o[t.id].timeout),delete o[t.id].resolve,void delete o[t.id].timeout):void console.error("Invalid response received from backend",t)},{type:"shared",worker:i,options:t,createNewChannel:function(){u.threads("Creating a new HTTP VFS channel");const r=new MessageChannel,s=e++;return i.postMessage({msg:"handshake",port:r.port1,id:s},[r.port1]),new Promise(((e,i)=>{var a;const u=setTimeout((()=>{delete o[s],i("Timeout while waiting on backend")}),null!==(a=null==t?void 0:t.timeout)&&void 0!==a?a:n.timeout);o[s]={id:s,channel:r,resolve:e,timeout:u}}))},terminate:function(){i.terminate()},close:function(){return u.threads("Closing the HTTP VFS channel"),i.postMessage({msg:"close"}),new Promise(((e,r)=>{var o;const s=setTimeout((()=>{r("Timeout while waiting on backend")}),null!==(o=null==t?void 0:t.timeout)&&void 0!==o?o:n.timeout);i.onmessage=({data:t})=>{u.threads("Received close response",t),"ack"===t.msg&&void 0===t.id&&(e(),clearTimeout(s))}}))}}}(null==t?void 0:t.httpOptions),o=[],s=[];for(let r=0;r<(null!==(e=t.workers)&&void 0!==e?e:1);r++)s.push(l({http:i}).then((t=>o.push({worker:t,busy:null}))).then((()=>{})));return yield Promise.all(s),{backendType:i.type,open:t=>Promise.all(o.map((e=>e.worker("open",{filename:"file:"+encodeURI(t),vfs:"http"})))).then((()=>{})),close:()=>Promise.all(o.map((t=>t.worker.close()))).then((()=>i.close())),exec:function(t,e,r){return h(this,void 0,void 0,(function*(){let i;do{i=o.find((t=>!t.busy)),i||(yield Promise.race(o.map((t=>t.busy))).catch((()=>{})))}while(!i);const n=[];return i.busy=i.worker("exec",{sql:t,bind:e,rowMode:null==r?void 0:r.rowMode,callback:t=>{t.row&&n.push(t)}}).then((()=>{})).finally((()=>{if(!i)throw new Error("Lost worker pool");i.busy=null})),yield i.busy,n}))}}}))}var f,p=r(3407),y=r(915),w=r(6758),v=r(5620),g=r(5335),m=r(4537),b=r(3075),x=r(8217),F=r(5286),k=r(4778),P=r(8512),S=r(1078);const M="undefined"!=typeof OL_MBTILES_DEBUG&&OL_MBTILES_DEBUG||void 0!==(null===(f=void 0==={env:{RLAYERS_DEBUG:void 0}}?void 0:{RLAYERS_DEBUG:void 0})||void 0===f?void 0:f.OL_MBTILES_DEBUG)&&{RLAYERS_DEBUG:void 0}.OL_MBTILES_DEBUG?console.debug.bind(console):()=>{},_={jpg:{type:"raster",mime:"image/jpeg"},png:{type:"raster",mime:"image/png"},webp:{type:"raster",mime:"image/webp"},pbf:{type:"vector"},mvt:{type:"vector"}};function E(t){var e,r,i;return{workers:null!==(e=null==t?void 0:t.sqlWorkers)&&void 0!==e?e:4,httpOptions:{backendType:null==t?void 0:t.backendType,maxPageSize:null!==(r=null==t?void 0:t.maxSqlPageSize)&&void 0!==r?r:4096,cacheSize:null!==(i=null==t?void 0:t.sqlCacheSize)&&void 0!==i?i:4096}}}function B(t){const e=c(E(t));return e.then((e=>e.open(t.url).then((()=>e)))).then((t=>t.exec("SELECT name,value FROM metadata"))).then((t=>{if(t&&t.length){const e=t.reduce(((t,e)=>(t[e.row[0]]=e.row[1],t)),{});return M("Loaded metadata",e),e}throw new Error("Could not load metadata")})).then((r=>{var i,n,o,s,a,u,h,l,d;const c=Object.assign({},t),f=null===(n=null===(i=r.format)||void 0===i?void 0:i.toLowerCase)||void 0===n?void 0:n.call(i);_[f]||console.warn("Unknown tile format",f),c.projection=null!==(o=t.projection)&&void 0!==o?o:"EPSG:3857",c.attributions=null!==(s=r.attribution)&&void 0!==s?s:r.description,c.maxZoom=null!==(a=t.maxZoom)&&void 0!==a?a:+r.maxzoom,c.minZoom=null!==(u=t.minZoom)&&void 0!==u?u:+r.minzoom;const v=null===(l=null===(h=(0,p.Jt)(c.projection))||void 0===h?void 0:h.getExtent)||void 0===l?void 0:l.call(h),g=r.bounds,m=g?(0,p.DI)(g.split(",").map((t=>+t)),"EPSG:4326",c.projection):v;if("raster"===_[f].type){if(void 0===c.maxZoom||void 0===c.minZoom||void 0===v)throw new Error("Cannot determine tilegrid, need minZoom, maxZoom");const t=[(0,y.RG)(v)/256];for(let e=1;e<=c.maxZoom;e++)t.push(t[t.length-1]/2);const e=null!==(d=_[f].mime)&&void 0!==d?d:f;c.mime=e,c.tileGrid=new w.A({origin:[v[0],v[2]],extent:m,minZoom:c.minZoom,resolutions:t})}else c.extent=v;return c.pool=e,c.url=t.url,c})).catch((t=>e.then((t=>t.close())).then((()=>Promise.reject(t)))))}class V extends x.Ay{constructor(t){var e,r,i;super(),t=t||{},this.dataProjection=new F.A({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:k.Ay,this.geometryName_=null!==(e=t.geometryName)&&void 0!==e?e:"Geometry",this.layers_=null!==(r=t.layers)&&void 0!==r?r:null,this.idProperty_=t.idProperty,this.extent=null!==(i=t.extent)&&void 0!==i?i:4096,this.supportedMediaTypes=["application/vnd-mbtiles"]}readFeature(t,e){const r=t.properties;let i;this.idProperty_?(i=r[this.idProperty_],delete r[this.idProperty_]):i=t.id;const n=t.loadGeometry(),o=[],s=[],a=V.MBTypes[n.length>1?"multi":"mono"][t.type];if("Unknown"===a)return null;for(let t=0;t`${t.url}#${e[0]}:${e[1]}:${e[2]}`})),this.setTileLoadFunction(this.tileLoader.bind(this)),this.pool=null!==(e=t.pool)&&void 0!==e?e:c(E(t)).then((e=>e.open(t.url).then((()=>e))))}tileLoader(t,e){const r=t;M("loading tile",[r.tileCoord[0],r.tileCoord[1],r.tileCoord[2]]),r.setLoader(((t,e,i)=>{this.pool.then((t=>t.exec("SELECT tile_data FROM tiles WHERE zoom_level = $zoom AND tile_column = $col AND tile_row = $row",{$zoom:r.tileCoord[0],$col:r.tileCoord[1],$row:(1<{if(e&&e[0]&&e[0].row[0]){const n=r.getFormat().readFeatures(e[0].row[0],{extent:t,featureProjection:i});return r.setFeatures(n),void r.onLoad(n,i)}throw new Error(`No data for ${r.tileCoord}`)})).catch((t=>{M(t),r.onError()}))}))}disposeInternal(){return this.pool.then((t=>t.close()))}}class C extends P.A{constructor(t){var e;if(void 0===t.url&&void 0===t.pool)throw new Error("Must specify url");super(Object.assign(Object.assign({},t),{url:void 0,tileUrlFunction:e=>`${t.url}#${e[0]}:${e[1]}:${e[2]}`})),this.setTileLoadFunction(this.tileLoader.bind(this)),this.pool=null!==(e=t.pool)&&void 0!==e?e:c(E(t)).then((e=>e.open(t.url).then((()=>e)))),this.mime=t.mime}tileLoader(t,e){M("loading tile",[t.tileCoord[0],t.tileCoord[1],t.tileCoord[2]]);const r=t.getImage();this.pool.then((e=>e.exec("SELECT tile_data FROM tiles WHERE zoom_level = $zoom AND tile_column = $col AND tile_row = $row",{$zoom:t.tileCoord[0],$col:t.tileCoord[1],$row:(1<{if(!(e&&e[0]&&e[0].row[0]instanceof Uint8Array))throw new Error(`No data for ${t.tileCoord}`);{const t=new Blob([e[0].row[0]],{type:this.mime}),i=URL.createObjectURL(t);r.src=i}})).catch((e=>{M(e),t.setState(S.A.ERROR)}))}disposeInternal(){return this.pool.then((t=>t.close()))}}},8217:(t,e,r)=>{"use strict";r.d(e,{Ay:()=>y,Bs:()=>g,hX:()=>w,te:()=>m});var i=r(6717),n=r(4778),o=r(4294),s=r(1217),a=r(1064),u=r(503),h=r(6702),l=r(2871),d=r(4338),c=r(4087),f=r(3407),p=r(3402);const y=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=i.A,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let r=e.dataProjection?(0,f.Jt)(e.dataProjection):this.readProjection(t);e.extent&&r&&"tile-pixels"===r.getUnits()&&(r=(0,f.Jt)(r),r.setWorldExtent(e.extent)),e={dataProjection:r,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return(0,c.b0)()}readFeature(t,e){return(0,c.b0)()}readFeatures(t,e){return(0,c.b0)()}readGeometry(t,e){return(0,c.b0)()}readProjection(t){return(0,c.b0)()}writeFeature(t,e){return(0,c.b0)()}writeFeatures(t,e){return(0,c.b0)()}writeGeometry(t,e){return(0,c.b0)()}};function w(t,e,r){const i=r?(0,f.Jt)(r.featureProjection):null,n=r?(0,f.Jt)(r.dataProjection):null;let o=t;if(i&&n&&!(0,f.tI)(i,n)){e&&(o=t.clone());const r=e?i:n,s=e?n:i;"tile-pixels"===r.getUnits()?o.transform(r,s):o.applyTransform((0,f.RG)(r,s))}if(e&&r&&void 0!==r.decimals){const e=Math.pow(10,r.decimals),i=function(t){for(let r=0,i=t.length;rg({...t,geometry:e}))).flat();const i="MultiPolygon"===r.type?"Polygon":r.type;if("GeometryCollection"===i||"Circle"===i)throw new Error("Unsupported geometry type: "+i);const o=r.layout.length;return w(new n.Ay(i,"Polygon"===i?function(t,e,r){return Array.isArray(e[0])?((0,p.mb)(t,0,e,r)||(t=t.slice(),(0,p.NK)(t,0,e,r)),t):((0,p.PA)(t,0,e,r)||(t=t.slice(),(0,p.ug)(t,0,e,r)),t)}(r.flatCoordinates,r.ends,o):r.flatCoordinates,r.ends?.flat(),o,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function m(t,e){if(!t)return null;if(Array.isArray(t)){const r=t.map((t=>m(t,e)));return new d.A(r)}return w(new(0,v[t.type])(t.flatCoordinates,t.layout,t.ends),!1,e)}}}]); \ No newline at end of file diff --git a/5451.bundle.js.LICENSE.txt b/1060.bundle.js.LICENSE.txt similarity index 100% rename from 5451.bundle.js.LICENSE.txt rename to 1060.bundle.js.LICENSE.txt diff --git a/1346.bundle.js b/1346.bundle.js index d480f77a..68809f7f 100644 --- a/1346.bundle.js +++ b/1346.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1346],{1346:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});const a="import React, {useCallback, useMemo} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport Feature from 'ol/Feature';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Geometry} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerVector, RStyle, RFeature, ROverlay} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n 'https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson';\nconst parser = new GeoJSON({featureProjection: 'EPSG:3857', featureClass: Feature});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n 'https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200';\ntype inputDataType = {records: {fields: {code_departement: string; population: number}}[]};\nconst fetchData = fetch(inputData).then((raw) => raw.json() as Promise);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields.population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({records: []} as inputDataType);\n const [current, setCurrent] = React.useState(null as Feature | null);\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n
\n ({center: fromLonLat([2, 46.5]), zoom: 5.75}), [])}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n \n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless 'current' changes\n * without it you will create a new function at every frame rendered */}\n setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n (\n \n ),\n [data]\n )}\n />\n \n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n \n {current ? (\n
\n \n \n Population in {current.get('nom')} in 2018 is{' '}\n {getData(data, current.get('code'))}\n \n \n
\n ) : null}\n
\n \n
\n );\n}\n"}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1346],{1346:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});const a="import React, {useCallback, useMemo} from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport Feature from 'ol/Feature';\nimport GeoJSON from 'ol/format/GeoJSON';\nimport {Geometry} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, RLayerVector, RStyle, RFeature, ROverlay} from 'rlayers';\nimport RLayerStadia from 'rlayers/layer/RLayerStadia';\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n 'https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson';\nconst parser = new GeoJSON({featureProjection: 'EPSG:3857', featureClass: Feature});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n 'https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200';\ntype inputDataType = {records: {fields: {code_departement: string; population: number}}[]};\nconst fetchData = fetch(inputData).then((raw) => raw.json() as Promise);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields.population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({records: []} as inputDataType);\n const [current, setCurrent] = React.useState(null as Feature | null);\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n
\n ({center: fromLonLat([2, 46.5]), zoom: 5.75}), [])}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n \n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless 'current' changes\n * without it you will create a new function at every frame rendered */}\n setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n (\n \n ),\n [data]\n )}\n />\n \n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n \n {current ? (\n
\n \n \n Population in {current.get('nom')} in 2018 is{' '}\n {getData(data, current.get('code'))}\n \n \n
\n ) : null}\n
\n \n
\n );\n}\n"}}]); \ No newline at end of file diff --git a/1562.bundle.js b/1562.bundle.js index d8c06df5..dc51773d 100644 --- a/1562.bundle.js +++ b/1562.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1562],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),l=e(6314),a=e.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var t=e(5072),r=e.n(t),l=e(7825),a=e.n(l),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),b=e(540),u=e.n(b),p=e(1113),m=e.n(p),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=d(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},1922:n=>{n.exports="data:image/svg+xml,%3csvg width='200px' height='200px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='lds-pacman' style='background: none;'%3e %3cg style='display:block'%3e %3ccircle cx='76.8' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='37.2' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='57' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e%3c/g%3e%3cg ng-attr-transform='translate(%7b%7bconfig.showBeanOffset%7d%7d 0)' transform='translate(-15 0)'%3e %3cpath d='M50 50L20 50A30 30 0 0 0 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3cpath d='M50 50L20 50A30 30 0 0 1 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(-33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;-45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3c/g%3e %3c/svg%3e"},1562:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>d});var t=e(6540),r=e(3407),l=e(4294),a=(e(5045),e(7240)),i=e(1922),c=e.n(i);const s={origin:[2.364,48.82],ArcDeTriomphe:[2.295,48.8737]};function d(){return t.createElement(a.f9,{className:"example-map",initial:{center:(0,r.Rb)(s.origin),zoom:11}},t.createElement(a.ej,null),t.createElement(a.j9,{zIndex:10},t.createElement(a.Dp,{geometry:new l.A((0,r.Rb)(s.ArcDeTriomphe))},t.createElement(a.Rv,{className:"no-interaction"},t.createElement("img",{src:c(),style:{position:"relative",top:-24,left:-24,userSelect:"none",pointerEvents:"none"},width:48,height:48,alt:"animated icon"})))))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1562],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),l=e(6314),a=e.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var t=e(5072),r=e.n(t),l=e(7825),a=e.n(l),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),b=e.n(u),p=e(1113),m=e.n(p),g=e(4096),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=b(),r()(g.A,v),g.A&&g.A.locals&&g.A.locals},1922:n=>{n.exports="data:image/svg+xml,%3csvg width='200px' height='200px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='lds-pacman' style='background: none;'%3e %3cg style='display:block'%3e %3ccircle cx='76.8' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='37.2' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='57' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e%3c/g%3e%3cg ng-attr-transform='translate(%7b%7bconfig.showBeanOffset%7d%7d 0)' transform='translate(-15 0)'%3e %3cpath d='M50 50L20 50A30 30 0 0 0 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3cpath d='M50 50L20 50A30 30 0 0 1 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(-33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;-45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3c/g%3e %3c/svg%3e"},1562:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>d});var t=e(6540),r=e(3407),l=e(4294),a=(e(5045),e(7240)),i=e(1922),c=e.n(i);const s={origin:[2.364,48.82],ArcDeTriomphe:[2.295,48.8737]};function d(){return t.createElement(a.f9,{className:"example-map",initial:{center:(0,r.Rb)(s.origin),zoom:11}},t.createElement(a.ej,null),t.createElement(a.j9,{zIndex:10},t.createElement(a.Dp,{geometry:new l.A((0,r.Rb)(s.ArcDeTriomphe))},t.createElement(a.Rv,{className:"no-interaction"},t.createElement("img",{src:c(),style:{position:"relative",top:-24,left:-24,userSelect:"none",pointerEvents:"none"},width:48,height:48,alt:"animated icon"})))))}}}]); \ No newline at end of file diff --git a/182.bundle.js b/182.bundle.js index 42dbd050..eeb2790f 100644 --- a/182.bundle.js +++ b/182.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[182],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),d=e(540),u=e.n(d),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},182:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>u});var l=e(6540),r=e(3407),t=e(4294),a=e(1064),i=(e(5045),e(7240)),c=e(5111),s=e(4995),p=e.n(s);const d={origin:[2.364,48.82],ArcDeTriomphe:[2.295,48.8737],PlaceDItalie:[2.355,48.831],Bastille:[2.369,48.853],TourEiffel:[2.294,48.858],Montmartre:[2.342,48.887]};function u(){const n=l.useRef();return l.createElement(l.Fragment,null,l.createElement(i.f9,{className:"example-map",initial:{center:(0,r.Rb)(d.origin),zoom:11}},l.createElement(i.ej,null),l.createElement(i.j9,{zIndex:10},l.createElement(i.Dp,{geometry:new t.A((0,r.Rb)(d.ArcDeTriomphe))},l.createElement(c.RStyle,null,l.createElement(c.RIcon,{src:p(),anchor:[.5,.8]})),l.createElement(i.bz,{ref:n,trigger:"click",className:"example-overlay"},l.createElement("div",{className:"card"},l.createElement("p",{className:"card-header"},l.createElement("strong",null,"Arc de Triomphe")),l.createElement("p",{className:"card-body text-center"},"Popup on click")))),l.createElement(i.Dp,{geometry:new a.Ay([[(0,r.Rb)(d.PlaceDItalie),(0,r.Rb)(d.Bastille),(0,r.Rb)(d.TourEiffel),(0,r.Rb)(d.PlaceDItalie)]]),onClick:(0,l.useCallback)((n=>n.map.getView().fit(n.target.getGeometry().getExtent(),{duration:250})),[])},l.createElement(c.RStyle,null,l.createElement(c.RStroke,{color:"yellow",width:4}),l.createElement(c.RFill,{color:"transparent"})),l.createElement(i.bz,{trigger:"hover",className:"example-overlay"},l.createElement("p",null,l.createElement("strong",null,"Les catacombes")),l.createElement("p",null,l.createElement("em",null,"Popup on hover, pan on click")))))),l.createElement("div",null,"Control programmatically:"),l.createElement("div",null,l.createElement("button",{className:"btn btn-primary m-1",onClick:()=>n.current.hide()},"Hide Arc de Triomphe"),l.createElement("button",{className:"btn btn-primary m-1",onClick:()=>n.current.show()},"Show Arc de Triomphe")))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[182],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),d=e(540),u=e.n(d),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},182:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>u});var l=e(6540),r=e(3407),t=e(4294),a=e(1064),i=(e(5045),e(7240)),c=e(5111),s=e(4995),p=e.n(s);const d={origin:[2.364,48.82],ArcDeTriomphe:[2.295,48.8737],PlaceDItalie:[2.355,48.831],Bastille:[2.369,48.853],TourEiffel:[2.294,48.858],Montmartre:[2.342,48.887]};function u(){const n=l.useRef();return l.createElement(l.Fragment,null,l.createElement(i.f9,{className:"example-map",initial:{center:(0,r.Rb)(d.origin),zoom:11}},l.createElement(i.ej,null),l.createElement(i.j9,{zIndex:10},l.createElement(i.Dp,{geometry:new t.A((0,r.Rb)(d.ArcDeTriomphe))},l.createElement(c.RStyle,null,l.createElement(c.RIcon,{src:p(),anchor:[.5,.8]})),l.createElement(i.bz,{ref:n,trigger:"click",className:"example-overlay"},l.createElement("div",{className:"card"},l.createElement("p",{className:"card-header"},l.createElement("strong",null,"Arc de Triomphe")),l.createElement("p",{className:"card-body text-center"},"Popup on click")))),l.createElement(i.Dp,{geometry:new a.Ay([[(0,r.Rb)(d.PlaceDItalie),(0,r.Rb)(d.Bastille),(0,r.Rb)(d.TourEiffel),(0,r.Rb)(d.PlaceDItalie)]]),onClick:(0,l.useCallback)((n=>n.map.getView().fit(n.target.getGeometry().getExtent(),{duration:250})),[])},l.createElement(c.RStyle,null,l.createElement(c.RStroke,{color:"yellow",width:4}),l.createElement(c.RFill,{color:"transparent"})),l.createElement(i.bz,{trigger:"hover",className:"example-overlay"},l.createElement("p",null,l.createElement("strong",null,"Les catacombes")),l.createElement("p",null,l.createElement("em",null,"Popup on hover, pan on click")))))),l.createElement("div",null,"Control programmatically:"),l.createElement("div",null,l.createElement("button",{className:"btn btn-primary m-1",onClick:()=>n.current.hide()},"Hide Arc de Triomphe"),l.createElement("button",{className:"btn btn-primary m-1",onClick:()=>n.current.show()},"Show Arc de Triomphe")))}}}]); \ No newline at end of file diff --git a/1901.bundle.js b/1901.bundle.js index 65a07683..c73ee3c8 100644 --- a/1901.bundle.js +++ b/1901.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see 1901.bundle.js.LICENSE.txt */ -(()=>{"use strict";var e={8168:(e,t,r)=>{e.exports=r.p+"4fb34c1567962ff5a6c9.wasm"}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.m=e,r.u=e=>e+".bundle.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.b=self.location+"",(()=>{var e,t=(e="file:///home/mmom/src/rlayers/node_modules/sqlite-wasm-http/deps/dist/sqlite3-bundler-friendly.mjs",function(t={}){var n,s,i=t;i.ready=new Promise(((e,t)=>{n=e,s=t})),["_malloc","_free","_realloc","_sqlite3_aggregate_context","_sqlite3_auto_extension","_sqlite3_bind_blob","_sqlite3_bind_double","_sqlite3_bind_int","_sqlite3_bind_int64","_sqlite3_bind_null","_sqlite3_bind_parameter_count","_sqlite3_bind_parameter_index","_sqlite3_bind_pointer","_sqlite3_bind_text","_sqlite3_busy_handler","_sqlite3_busy_timeout","_sqlite3_cancel_auto_extension","_sqlite3_changes","_sqlite3_changes64","_sqlite3_clear_bindings","_sqlite3_close_v2","_sqlite3_collation_needed","_sqlite3_column_blob","_sqlite3_column_bytes","_sqlite3_column_count","_sqlite3_column_double","_sqlite3_column_int","_sqlite3_column_int64","_sqlite3_column_name","_sqlite3_column_text","_sqlite3_column_type","_sqlite3_column_value","_sqlite3_commit_hook","_sqlite3_compileoption_get","_sqlite3_compileoption_used","_sqlite3_complete","_sqlite3_context_db_handle","_sqlite3_create_collation","_sqlite3_create_collation_v2","_sqlite3_create_function","_sqlite3_create_function_v2","_sqlite3_create_module","_sqlite3_create_module_v2","_sqlite3_create_window_function","_sqlite3_data_count","_sqlite3_db_filename","_sqlite3_db_handle","_sqlite3_db_name","_sqlite3_db_status","_sqlite3_declare_vtab","_sqlite3_deserialize","_sqlite3_drop_modules","_sqlite3_errcode","_sqlite3_errmsg","_sqlite3_error_offset","_sqlite3_errstr","_sqlite3_exec","_sqlite3_expanded_sql","_sqlite3_extended_errcode","_sqlite3_extended_result_codes","_sqlite3_file_control","_sqlite3_finalize","_sqlite3_free","_sqlite3_get_auxdata","_sqlite3_initialize","_sqlite3_keyword_count","_sqlite3_keyword_name","_sqlite3_keyword_check","_sqlite3_last_insert_rowid","_sqlite3_libversion","_sqlite3_libversion_number","_sqlite3_limit","_sqlite3_malloc","_sqlite3_malloc64","_sqlite3_msize","_sqlite3_open","_sqlite3_open_v2","_sqlite3_overload_function","_sqlite3_prepare_v2","_sqlite3_prepare_v3","_sqlite3_preupdate_blobwrite","_sqlite3_preupdate_count","_sqlite3_preupdate_depth","_sqlite3_preupdate_hook","_sqlite3_preupdate_new","_sqlite3_preupdate_old","_sqlite3_progress_handler","_sqlite3_randomness","_sqlite3_realloc","_sqlite3_realloc64","_sqlite3_reset","_sqlite3_reset_auto_extension","_sqlite3_result_blob","_sqlite3_result_double","_sqlite3_result_error","_sqlite3_result_error_code","_sqlite3_result_error_nomem","_sqlite3_result_error_toobig","_sqlite3_result_int","_sqlite3_result_int64","_sqlite3_result_null","_sqlite3_result_pointer","_sqlite3_result_subtype","_sqlite3_result_text","_sqlite3_result_zeroblob","_sqlite3_result_zeroblob64","_sqlite3_rollback_hook","_sqlite3_serialize","_sqlite3_set_authorizer","_sqlite3_set_auxdata","_sqlite3_set_last_insert_rowid","_sqlite3_shutdown","_sqlite3_sourceid","_sqlite3_sql","_sqlite3_status","_sqlite3_status64","_sqlite3_step","_sqlite3_stmt_isexplain","_sqlite3_stmt_readonly","_sqlite3_stmt_status","_sqlite3_strglob","_sqlite3_stricmp","_sqlite3_strlike","_sqlite3_strnicmp","_sqlite3_table_column_metadata","_sqlite3_total_changes","_sqlite3_total_changes64","_sqlite3_trace_v2","_sqlite3_txn_state","_sqlite3_update_hook","_sqlite3_uri_boolean","_sqlite3_uri_int64","_sqlite3_uri_key","_sqlite3_uri_parameter","_sqlite3_user_data","_sqlite3_value_blob","_sqlite3_value_bytes","_sqlite3_value_double","_sqlite3_value_dup","_sqlite3_value_free","_sqlite3_value_frombind","_sqlite3_value_int","_sqlite3_value_int64","_sqlite3_value_nochange","_sqlite3_value_numeric_type","_sqlite3_value_pointer","_sqlite3_value_subtype","_sqlite3_value_text","_sqlite3_value_type","_sqlite3_vfs_find","_sqlite3_vfs_register","_sqlite3_vfs_unregister","_sqlite3_vtab_collation","_sqlite3_vtab_distinct","_sqlite3_vtab_in","_sqlite3_vtab_in_first","_sqlite3_vtab_in_next","_sqlite3_vtab_nochange","_sqlite3_vtab_on_conflict","_sqlite3_vtab_rhs_value","_sqlite3changegroup_add","_sqlite3changegroup_add_strm","_sqlite3changegroup_delete","_sqlite3changegroup_new","_sqlite3changegroup_output","_sqlite3changegroup_output_strm","_sqlite3changeset_apply","_sqlite3changeset_apply_strm","_sqlite3changeset_apply_v2","_sqlite3changeset_apply_v2_strm","_sqlite3changeset_concat","_sqlite3changeset_concat_strm","_sqlite3changeset_conflict","_sqlite3changeset_finalize","_sqlite3changeset_fk_conflicts","_sqlite3changeset_invert","_sqlite3changeset_invert_strm","_sqlite3changeset_new","_sqlite3changeset_next","_sqlite3changeset_old","_sqlite3changeset_op","_sqlite3changeset_pk","_sqlite3changeset_start","_sqlite3changeset_start_strm","_sqlite3changeset_start_v2","_sqlite3changeset_start_v2_strm","_sqlite3session_attach","_sqlite3session_changeset","_sqlite3session_changeset_size","_sqlite3session_changeset_strm","_sqlite3session_config","_sqlite3session_create","_sqlite3session_delete","_sqlite3session_diff","_sqlite3session_enable","_sqlite3session_indirect","_sqlite3session_isempty","_sqlite3session_memory_used","_sqlite3session_object_config","_sqlite3session_patchset","_sqlite3session_patchset_strm","_sqlite3session_table_filter","_sqlite3_wasm_pstack_ptr","_sqlite3_wasm_pstack_restore","_sqlite3_wasm_pstack_alloc","_sqlite3_wasm_pstack_remaining","_sqlite3_wasm_pstack_quota","_sqlite3_wasm_db_error","_sqlite3_wasm_test_struct","_sqlite3_wasm_enum_json","_sqlite3_wasm_vfs_unlink","_sqlite3_wasm_db_vfs","_sqlite3_wasm_db_reset","_sqlite3_wasm_db_export_chunked","_sqlite3_wasm_db_serialize","_sqlite3_wasm_vfs_create_file","_sqlite3_wasm_posix_create_file","_sqlite3_wasm_kvvfsMakeKeyOnPstack","_sqlite3_wasm_kvvfs_methods","_sqlite3_wasm_vtab_config","_sqlite3_wasm_db_config_ip","_sqlite3_wasm_db_config_pii","_sqlite3_wasm_db_config_s","_sqlite3_wasm_config_i","_sqlite3_wasm_config_ii","_sqlite3_wasm_config_j","_sqlite3_wasm_init_wasmfs","_sqlite3_wasm_test_intptr","_sqlite3_wasm_test_voidptr","_sqlite3_wasm_test_int64_max","_sqlite3_wasm_test_int64_min","_sqlite3_wasm_test_int64_times2","_sqlite3_wasm_test_int64_minmax","_sqlite3_wasm_test_int64ptr","_sqlite3_wasm_test_stack_overflow","_sqlite3_wasm_test_str_hello","_sqlite3_wasm_SQLTester_strglob","___indirect_function_table","_fflush","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(i.ready,e)||Object.defineProperty(i.ready,e,{get:()=>G("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>G("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));const o=globalThis.sqlite3InitModuleState||Object.assign(Object.create(null),{debugModule:()=>{}});delete globalThis.sqlite3InitModuleState,o.debugModule("globalThis.location =",globalThis.location);const a="emscripten-bug-17951";i[a]=function e(t,r){t.env.foo=function(){};const n=i.locateFile(e.uri,void 0===g?"":g);o.debugModule("instantiateWasm() uri =",n);const s=()=>fetch(n,{credentials:"same-origin"});return(WebAssembly.instantiateStreaming?async()=>WebAssembly.instantiateStreaming(s(),t).then((e=>r(e.instance,e.module))):async()=>s().then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,t))).then((e=>r(e.instance,e.module))))(),{}},i[a].uri="sqlite3.wasm";var l=Object.assign({},i),c="./this.program",_="object"==typeof window,u="function"==typeof importScripts,d="object"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions&&"string"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions.node,f=!_&&!d&&!u;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var p,m,h,g="";if(f){if("function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(p=read),h=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let t=read(e,"binary");return O("object"==typeof t),t},m=(e,t,r)=>{setTimeout((()=>t(h(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():G()),"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!_&&!u)throw new Error("environment detection error");if(u?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),e&&(g=e),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");p=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),m=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var b,y,q,w=i.print||console.log.bind(console),E=i.printErr||console.error.bind(console);Object.assign(i,l),l=null,b="fetchSettings",Object.getOwnPropertyDescriptor(i,b)&&G(`\`Module.${b}\` was supplied but \`${b}\` not included in INCOMING_MODULE_JS_API`),i.arguments&&i.arguments,Z("arguments","arguments_"),i.thisProgram&&(c=i.thisProgram),Z("thisProgram","thisProgram"),i.quit&&i.quit,Z("quit","quit_"),O(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),O(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),O(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),O(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),O(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Z("asm","wasmExports"),Z("read","read_"),Z("readAsync","readAsync"),Z("readBinary","readBinary"),Z("setWindowTitle","setWindowTitle"),O(!d,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),O(!f,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),i.wasmBinary&&(y=i.wasmBinary),Z("wasmBinary","wasmBinary"),i.noExitRuntime,Z("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,A,x,T,I,k,F=!1;function O(e,t){e||G("Assertion failed"+(t?": "+t:""))}function P(){var e=q.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=x=new Int16Array(e),i.HEAPU8=A=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAP32=T=new Int32Array(e),i.HEAPU32=I=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e),i.HEAP64=k=new BigInt64Array(e),i.HEAPU64=new BigUint64Array(e)}O(!i.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),O("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var L=i.INITIAL_MEMORY||16777216;function C(){if(!F){var e=We();0==e&&(e+=4);var t=I[e>>2],r=I[e+4>>2];34821223==t&&2310721022==r||G(`Stack overflow! Stack cookie has been overwritten at ${se(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${se(r)} ${se(t)}`),1668509029!=I[0]&&G("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Z("INITIAL_MEMORY","INITIAL_MEMORY"),O(L>=524288,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+L+"! (STACK_SIZE=524288)"),q=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:L/65536,maximum:32768}),P(),O((L=q.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var N=[],D=[],R=[],M=!1;O(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var j=0,U=null,B=null,z={};function W(e){for(var t=e;;){if(!z[e])return e;e=t+Math.random()}}function H(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(!z[e]),z[e]=1,null===U&&"undefined"!=typeof setInterval&&(U=setInterval((()=>{if(F)return clearInterval(U),void(U=null);var e=!1;for(var t in z)e||(e=!0,E("still waiting on run dependencies:")),E(`dependency: ${t}`);e&&E("(end of list)")}),1e4))):E("warning: run dependency added without ID")}function Q(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(z[e]),delete z[e]):E("warning: run dependency removed without ID"),0==j&&(null!==U&&(clearInterval(U),U=null),B)){var t=B;B=null,t()}}function G(e){i.onAbort&&i.onAbort(e),E(e="Aborted("+e+")"),F=!0;var t=new WebAssembly.RuntimeError(e);throw s(t),t}var V,$;function K(e){return e.startsWith("data:application/octet-stream;base64,")}function J(e){return function(){O(M,`native function \`${e}\` called before runtime initialization`);var t=Re[e];return O(t,`exported native function \`${e}\` not found`),t.apply(null,arguments)}}function Y(e){if(e==V&&y)return new Uint8Array(y);if(h)return h(e);throw"both async and sync fetching of the wasm failed"}function X(e,t,r){return function(e){return y||!_&&!u||"function"!=typeof fetch?Promise.resolve().then((()=>Y(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Y(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),V.startsWith("file://")&&E(`warning: Loading from a file URI (${V}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),G(e)}))}function Z(e,t,r=!0){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){G(`\`Module.${e}\` has been replaced by \`${t}\``+(r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ee(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function te(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){ie("`"+e+"` is not longer defined by emscripten. "+t)}})}function re(e){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),G(t)}})}i.locateFile?K(V="sqlite3.wasm")||($=V,V=i.locateFile?i.locateFile($,g):g+$):V=new URL(r(8168),r.b).href,te("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),te("asm","Please use wasmExports instead");var ne=e=>{for(;e.length>0;)e.shift()(i)},se=e=>(O("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),ie=e=>{ie.shown||(ie.shown={}),ie.shown[e]||(ie.shown[e]=1,E(e))},oe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var s=e[n];"."===s?e.splice(n,1):".."===s?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=oe.isAbs(e),r="/"===e.substr(-1);return(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=oe.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=oe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return oe.normalize(e.join("/"))},join2:(e,t)=>oe.normalize(e+"/"+t)},ae=e=>(ae=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);G("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),le={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ee.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=oe.isAbs(n)}return(t?"/":"")+(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=le.resolve(e).substr(1),t=le.resolve(t).substr(1);for(var n=r(e.split("/")),s=r(t.split("/")),i=Math.min(n.length,s.length),o=i,a=0;a{for(var n=t+r,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,s));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i},ue=[],de=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},fe=(e,t,r,n)=>{if(O("string"==typeof e),!(n>0))return 0;for(var s=r,i=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=i)break;t[r++]=a}else if(a<=2047){if(r+1>=i)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=i)break;a>1114111&&ie("Invalid Unicode code point "+se(a)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-s};function pe(e,t,r){var n=r>0?r:de(e)+1,s=new Array(n),i=fe(e,s,0,s.length);return t&&(s.length=i),s}var me,he={ttys:[],init(){},shutdown(){},register(e,t){he.ttys[e]={input:[],output:[],ops:t},Ee.registerDevice(e,he.stream_ops)},stream_ops:{open(e){var t=he.ttys[e.node.rdev];if(!t)throw new Ee.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,s){if(!e.tty||!e.tty.ops.get_char)throw new Ee.ErrnoError(60);for(var i=0,o=0;o(()=>{if(!ue.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ue=pe(e,!0)}return ue.shift()})(),put_char(e,t){null===t||10===t?(w(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(_e(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(E(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(_e(e.output,0)),e.output=[])}}},ge=e=>{e=((e,t)=>(O(t,"alignment argument is required"),Math.ceil(e/t)*t))(e,65536);var t=Be(65536,e);return t?((e,t)=>(A.fill(0,e,e+t),e))(t,e):0},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Ee.isBlkdev(r)||Ee.isFIFO(r))throw new Ee.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:Ee.chrdev_stream_ops}});var s=Ee.createNode(e,t,r,n);return Ee.isDir(s.mode)?(s.node_ops=be.ops_table.dir.node,s.stream_ops=be.ops_table.dir.stream,s.contents={}):Ee.isFile(s.mode)?(s.node_ops=be.ops_table.file.node,s.stream_ops=be.ops_table.file.stream,s.usedBytes=0,s.contents=null):Ee.isLink(s.mode)?(s.node_ops=be.ops_table.link.node,s.stream_ops=be.ops_table.link.stream):Ee.isChrdev(s.mode)&&(s.node_ops=be.ops_table.chrdev.node,s.stream_ops=be.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Ee.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ee.isDir(e.mode)?t.size=4096:Ee.isFile(e.mode)?t.size=e.usedBytes:Ee.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw Ee.genericErrors[44]},mknod:(e,t,r,n)=>be.createNode(e,t,r,n),rename(e,t,r){if(Ee.isDir(e.mode)){var n;try{n=Ee.lookupNode(t,r)}catch(e){}if(n)for(var s in n.contents)throw new Ee.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Ee.lookupNode(e,t);for(var n in r.contents)throw new Ee.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=be.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Ee.isLink(e.mode))throw new Ee.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,s){var i=e.node.contents;if(s>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-s,n);if(O(o>=0),o>8&&i.subarray)t.set(i.subarray(s,s+o),r);else for(var a=0;a0||r+t(be.stream_ops.write(e,t,0,n,r,!1),0)}},ye=i.preloadPlugins||[],qe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},ve={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},we={},Ee={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=le.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Ee.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Ee.root,s="/",i=0;i40)throw new Ee.ErrnoError(32)}}return{path:s,node:n}},getPath(e){for(var t;;){if(Ee.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%Ee.nameTable.length},hashAddNode(e){var t=Ee.hashName(e.parent.id,e.name);e.name_next=Ee.nameTable[t],Ee.nameTable[t]=e},hashRemoveNode(e){var t=Ee.hashName(e.parent.id,e.name);if(Ee.nameTable[t]===e)Ee.nameTable[t]=e.name_next;else for(var r=Ee.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Ee.mayLookup(e);if(r)throw new Ee.ErrnoError(r,e);for(var n=Ee.hashName(e.id,t),s=Ee.nameTable[n];s;s=s.name_next){var i=s.name;if(s.parent.id===e.id&&i===t)return s}return Ee.lookup(e,t)},createNode(e,t,r,n){O("object"==typeof e);var s=new Ee.FSNode(e,t,r,n);return Ee.hashAddNode(s),s},destroyNode(e){Ee.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Ee.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>Ee.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,t){try{return Ee.lookupNode(e,t),20}catch(e){}return Ee.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Ee.lookupNode(e,t)}catch(e){return e.errno}var s=Ee.nodePermissions(e,"wx");if(s)return s;if(r){if(!Ee.isDir(n.mode))return 54;if(Ee.isRoot(n)||Ee.getPath(n)===Ee.cwd())return 10}else if(Ee.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Ee.isLink(e.mode)?32:Ee.isDir(e.mode)&&("r"!==Ee.flagsToPermissionString(t)||512&t)?31:Ee.nodePermissions(e,Ee.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ee.MAX_OPEN_FDS;e++)if(!Ee.streams[e])return e;throw new Ee.ErrnoError(33)},getStreamChecked(e){var t=Ee.getStream(e);if(!t)throw new Ee.ErrnoError(8);return t},getStream:e=>Ee.streams[e],createStream:(e,t=-1)=>(Ee.FSStream||(Ee.FSStream=function(){this.shared={}},Ee.FSStream.prototype={},Object.defineProperties(Ee.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Ee.FSStream,e),-1==t&&(t=Ee.nextfd()),e.fd=t,Ee.streams[t]=e,e),closeStream(e){Ee.streams[e]=null},chrdev_stream_ops:{open(e){var t=Ee.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ee.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Ee.devices[e]={stream_ops:t}},getDevice:e=>Ee.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Ee.syncFSRequests++,Ee.syncFSRequests>1&&E(`warning: ${Ee.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Ee.getMounts(Ee.root.mount),n=0;function s(e){return O(Ee.syncFSRequests>0),Ee.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,s(e));++n>=r.length&&s(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,r){if("string"==typeof e)throw e;var n,s="/"===r,i=!r;if(s&&Ee.root)throw new Ee.ErrnoError(10);if(!s&&!i){var o=Ee.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,Ee.isMountpoint(n))throw new Ee.ErrnoError(10);if(!Ee.isDir(n.mode))throw new Ee.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,s?Ee.root=l:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),l},unmount(e){var t=Ee.lookupPath(e,{follow_mount:!1});if(!Ee.isMountpoint(t.node))throw new Ee.ErrnoError(28);var r=t.node,n=r.mounted,s=Ee.getMounts(n);Object.keys(Ee.nameTable).forEach((e=>{for(var t=Ee.nameTable[e];t;){var r=t.name_next;s.includes(t.mount)&&Ee.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);O(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Ee.lookupPath(e,{parent:!0}).node,s=oe.basename(e);if(!s||"."===s||".."===s)throw new Ee.ErrnoError(28);var i=Ee.mayCreate(n,s);if(i)throw new Ee.ErrnoError(i);if(!n.node_ops.mknod)throw new Ee.ErrnoError(63);return n.node_ops.mknod(n,s,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Ee.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Ee.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",s=0;s(void 0===r&&(r=t,t=438),t|=8192,Ee.mknod(e,t,r)),symlink(e,t){if(!le.resolve(e))throw new Ee.ErrnoError(44);var r=Ee.lookupPath(t,{parent:!0}).node;if(!r)throw new Ee.ErrnoError(44);var n=oe.basename(t),s=Ee.mayCreate(r,n);if(s)throw new Ee.ErrnoError(s);if(!r.node_ops.symlink)throw new Ee.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,s=oe.dirname(e),i=oe.dirname(t),o=oe.basename(e),a=oe.basename(t);if(r=Ee.lookupPath(e,{parent:!0}).node,n=Ee.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ee.ErrnoError(44);if(r.mount!==n.mount)throw new Ee.ErrnoError(75);var l,c=Ee.lookupNode(r,o),_=le.relative(e,i);if("."!==_.charAt(0))throw new Ee.ErrnoError(28);if("."!==(_=le.relative(t,s)).charAt(0))throw new Ee.ErrnoError(55);try{l=Ee.lookupNode(n,a)}catch(e){}if(c!==l){var u=Ee.isDir(c.mode),d=Ee.mayDelete(r,o,u);if(d)throw new Ee.ErrnoError(d);if(d=l?Ee.mayDelete(n,a,u):Ee.mayCreate(n,a))throw new Ee.ErrnoError(d);if(!r.node_ops.rename)throw new Ee.ErrnoError(63);if(Ee.isMountpoint(c)||l&&Ee.isMountpoint(l))throw new Ee.ErrnoError(10);if(n!==r&&(d=Ee.nodePermissions(r,"w")))throw new Ee.ErrnoError(d);Ee.hashRemoveNode(c);try{r.node_ops.rename(c,n,a)}catch(e){throw e}finally{Ee.hashAddNode(c)}}},rmdir(e){var t=Ee.lookupPath(e,{parent:!0}).node,r=oe.basename(e),n=Ee.lookupNode(t,r),s=Ee.mayDelete(t,r,!0);if(s)throw new Ee.ErrnoError(s);if(!t.node_ops.rmdir)throw new Ee.ErrnoError(63);if(Ee.isMountpoint(n))throw new Ee.ErrnoError(10);t.node_ops.rmdir(t,r),Ee.destroyNode(n)},readdir(e){var t=Ee.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ee.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Ee.lookupPath(e,{parent:!0}).node;if(!t)throw new Ee.ErrnoError(44);var r=oe.basename(e),n=Ee.lookupNode(t,r),s=Ee.mayDelete(t,r,!1);if(s)throw new Ee.ErrnoError(s);if(!t.node_ops.unlink)throw new Ee.ErrnoError(63);if(Ee.isMountpoint(n))throw new Ee.ErrnoError(10);t.node_ops.unlink(t,r),Ee.destroyNode(n)},readlink(e){var t=Ee.lookupPath(e).node;if(!t)throw new Ee.ErrnoError(44);if(!t.node_ops.readlink)throw new Ee.ErrnoError(28);return le.resolve(Ee.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Ee.lookupPath(e,{follow:!t}).node;if(!r)throw new Ee.ErrnoError(44);if(!r.node_ops.getattr)throw new Ee.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Ee.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?Ee.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Ee.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Ee.chmod(e,t,!0)},fchmod(e,t){var r=Ee.getStreamChecked(e);Ee.chmod(r.node,t)},chown(e,t,r,n){var s;if(!(s="string"==typeof e?Ee.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Ee.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown(e,t,r){Ee.chown(e,t,r,!0)},fchown(e,t,r){var n=Ee.getStreamChecked(e);Ee.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Ee.ErrnoError(28);var r;if(!(r="string"==typeof e?Ee.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Ee.ErrnoError(63);if(Ee.isDir(r.mode))throw new Ee.ErrnoError(31);if(!Ee.isFile(r.mode))throw new Ee.ErrnoError(28);var n=Ee.nodePermissions(r,"w");if(n)throw new Ee.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Ee.getStreamChecked(e);if(!(2097155&r.flags))throw new Ee.ErrnoError(28);Ee.truncate(r.node,t)},utime(e,t,r){var n=Ee.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Ee.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=oe.normalize(e);try{n=Ee.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new Ee.ErrnoError(20)}else n=Ee.mknod(e,r,0),s=!0;if(!n)throw new Ee.ErrnoError(44);if(Ee.isChrdev(n.mode)&&(t&=-513),65536&t&&!Ee.isDir(n.mode))throw new Ee.ErrnoError(54);if(!s){var o=Ee.mayOpen(n,t);if(o)throw new Ee.ErrnoError(o)}512&t&&!s&&Ee.truncate(n,0),t&=-131713;var a=Ee.createStream({node:n,path:Ee.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(Ee.readFiles||(Ee.readFiles={}),e in Ee.readFiles||(Ee.readFiles[e]=1)),a},close(e){if(Ee.isClosed(e))throw new Ee.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ee.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ee.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ee.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,s){if(O(r>=0),n<0||s<0)throw new Ee.ErrnoError(28);if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(1==(2097155&e.flags))throw new Ee.ErrnoError(8);if(Ee.isDir(e.node.mode))throw new Ee.ErrnoError(31);if(!e.stream_ops.read)throw new Ee.ErrnoError(28);var i=void 0!==s;if(i){if(!e.seekable)throw new Ee.ErrnoError(70)}else s=e.position;var o=e.stream_ops.read(e,t,r,n,s);return i||(e.position+=o),o},write(e,t,r,n,s,i){if(O(r>=0),n<0||s<0)throw new Ee.ErrnoError(28);if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(!(2097155&e.flags))throw new Ee.ErrnoError(8);if(Ee.isDir(e.node.mode))throw new Ee.ErrnoError(31);if(!e.stream_ops.write)throw new Ee.ErrnoError(28);e.seekable&&1024&e.flags&&Ee.llseek(e,0,2);var o=void 0!==s;if(o){if(!e.seekable)throw new Ee.ErrnoError(70)}else s=e.position;var a=e.stream_ops.write(e,t,r,n,s,i);return o||(e.position+=a),a},allocate(e,t,r){if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(t<0||r<=0)throw new Ee.ErrnoError(28);if(!(2097155&e.flags))throw new Ee.ErrnoError(8);if(!Ee.isFile(e.node.mode)&&!Ee.isDir(e.node.mode))throw new Ee.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ee.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,s){if(2&n&&!(2&s)&&2!=(2097155&e.flags))throw new Ee.ErrnoError(2);if(1==(2097155&e.flags))throw new Ee.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ee.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,s)},msync:(e,t,r,n,s)=>(O(r>=0),e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,s):0),munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Ee.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Ee.open(e,t.flags),s=Ee.stat(e).size,i=new Uint8Array(s);return Ee.read(n,i,0,s,0),"utf8"===t.encoding?r=_e(i,0):"binary"===t.encoding&&(r=i),Ee.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=Ee.open(e,r.flags,r.mode);if("string"==typeof t){var s=new Uint8Array(de(t)+1),i=fe(t,s,0,s.length);Ee.write(n,s,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ee.write(n,t,0,t.byteLength,void 0,r.canOwn)}Ee.close(n)},cwd:()=>Ee.currentPath,chdir(e){var t=Ee.lookupPath(e,{follow:!0});if(null===t.node)throw new Ee.ErrnoError(44);if(!Ee.isDir(t.node.mode))throw new Ee.ErrnoError(54);var r=Ee.nodePermissions(t.node,"x");if(r)throw new Ee.ErrnoError(r);Ee.currentPath=t.path},createDefaultDirectories(){Ee.mkdir("/tmp"),Ee.mkdir("/home"),Ee.mkdir("/home/web_user")},createDefaultDevices(){Ee.mkdir("/dev"),Ee.registerDevice(Ee.makedev(1,3),{read:()=>0,write:(e,t,r,n,s)=>n}),Ee.mkdev("/dev/null",Ee.makedev(1,3)),he.register(Ee.makedev(5,0),he.default_tty_ops),he.register(Ee.makedev(6,0),he.default_tty1_ops),Ee.mkdev("/dev/tty",Ee.makedev(5,0)),Ee.mkdev("/dev/tty1",Ee.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ae(e).byteLength),e[--t]);Ee.createDevice("/dev","random",r),Ee.createDevice("/dev","urandom",r),Ee.mkdir("/dev/shm"),Ee.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ee.mkdir("/proc");var e=Ee.mkdir("/proc/self");Ee.mkdir("/proc/self/fd"),Ee.mount({mount(){var t=Ee.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Ee.getStreamChecked(r),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?Ee.createDevice("/dev","stdin",i.stdin):Ee.symlink("/dev/tty","/dev/stdin"),i.stdout?Ee.createDevice("/dev","stdout",null,i.stdout):Ee.symlink("/dev/tty","/dev/stdout"),i.stderr?Ee.createDevice("/dev","stderr",null,i.stderr):Ee.symlink("/dev/tty1","/dev/stderr");var e=Ee.open("/dev/stdin",0),t=Ee.open("/dev/stdout",1),r=Ee.open("/dev/stderr",1);O(0===e.fd,`invalid handle for stdin (${e.fd})`),O(1===t.fd,`invalid handle for stdout (${t.fd})`),O(2===r.fd,`invalid handle for stderr (${r.fd})`)},ensureErrnoError(){Ee.ErrnoError||(Ee.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){for(var t in this.errno=e,we)if(we[t]===e){this.code=t;break}},this.setErrno(e),this.message=ve[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=this.stack.replace(/\b_Z[\w\d_]+/g,(function(e){var t,r=(t=e,ie("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),t);return e===r?e:r+" ["+e+"]"})))},Ee.ErrnoError.prototype=new Error,Ee.ErrnoError.prototype.constructor=Ee.ErrnoError,[44].forEach((e=>{Ee.genericErrors[e]=new Ee.ErrnoError(e),Ee.genericErrors[e].stack=""})))},staticInit(){Ee.ensureErrnoError(),Ee.nameTable=new Array(4096),Ee.mount(be,{},"/"),Ee.createDefaultDirectories(),Ee.createDefaultDevices(),Ee.createSpecialDirectories(),Ee.filesystems={MEMFS:be}},init(e,t,r){O(!Ee.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Ee.init.initialized=!0,Ee.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,Ee.createStandardStreams()},quit(){Ee.init.initialized=!1,Ue(0);for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),s=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;s||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,s=(e+1)*o-1;if(s=Math.min(s,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",r,!1),n!==o&&s.setRequestHeader("Range","bytes="+e+"-"+t),s.responseType="arraybuffer",s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(s.status>=200&&s.status<300||304===s.status))throw new Error("Couldn't load "+r+". Status: "+s.status);return void 0!==s.response?new Uint8Array(s.response||[]):pe(s.responseText||"",!0)})(t,s)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!i&&n||(o=n=1,n=this.getter(0).length,o=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new i;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var l=Ee.createFile(e,t,a,n,s);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={};function _(e,t,r,n,s){var i=e.node.contents;if(s>=i.length)return 0;var o=Math.min(i.length-s,n);if(O(o>=0),i.slice)for(var a=0;a{var t=l.stream_ops[e];c[e]=function(){return Ee.forceLoadFile(l),t.apply(null,arguments)}})),c.read=(e,t,r,n,s)=>(Ee.forceLoadFile(l),_(e,t,r,n,s)),c.mmap=(e,t,r,n,s)=>{Ee.forceLoadFile(l);var i=ge(t);if(!i)throw new Ee.ErrnoError(48);return _(e,S,i,t,r),{ptr:i,allocated:!0}},l.stream_ops=c,l},absolutePath(){G("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){G("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){G("FS.createLink has been removed; use FS.symlink instead")},joinPath(){G("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){G("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){G("FS.standardizePath has been removed; use PATH.normalize instead")}},Se={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(oe.isAbs(t))return t;var n;if(n=-100===e?Ee.cwd():Se.getStreamFromFD(e).path,0==t.length){if(!r)throw new Ee.ErrnoError(44);return n}return oe.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&oe.normalize(t)!==oe.normalize(Ee.getPath(e.node)))return-54;throw e}T[r>>2]=n.dev,T[r+4>>2]=n.mode,I[r+8>>2]=n.nlink,T[r+12>>2]=n.uid,T[r+16>>2]=n.gid,T[r+20>>2]=n.rdev,k[r+24>>3]=BigInt(n.size),T[r+32>>2]=4096,T[r+36>>2]=n.blocks;var s=n.atime.getTime(),i=n.mtime.getTime(),o=n.ctime.getTime();return k[r+40>>3]=BigInt(Math.floor(s/1e3)),I[r+48>>2]=s%1e3*1e3,k[r+56>>3]=BigInt(Math.floor(i/1e3)),I[r+64>>2]=i%1e3*1e3,k[r+72>>3]=BigInt(Math.floor(o/1e3)),I[r+80>>2]=o%1e3*1e3,k[r+88>>3]=BigInt(n.ino),0},doMsync(e,t,r,n,s){if(!Ee.isFile(t.node.mode))throw new Ee.ErrnoError(43);if(2&n)return 0;var i=A.slice(e,e+r);Ee.msync(t,i,s,r,n)},varargs:void 0,get(){O(null!=Se.varargs);var e=T[+Se.varargs>>2];return Se.varargs+=4,e},getp:()=>Se.get(),getStr(e){var t=((e,t)=>(O("number"==typeof e),e?_e(A,e,void 0):""))(e);return t},getStreamFromFD:e=>Ee.getStreamChecked(e)},Ae=e=>e<-9007199254740992||e>9007199254740992?NaN:Number(e),xe=(e,t,r)=>(O("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),fe(e,A,t,r)),Te=e=>I[e>>2]+4294967296*T[e+4>>2],Ie=[0,31,60,91,121,152,182,213,244,274,305,335],ke=[0,31,59,90,120,151,181,212,243,273,304,334],Fe=e=>{var t=de(e)+1,r=je(t);return r&&xe(e,r,t),r};me=()=>performance.now();var Oe=e=>{var t=q.buffer,r=(e-t.byteLength+65535)/65536;try{return q.grow(r),P(),1}catch(r){E(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${r}`)}},Pe={},Le=()=>{if(!Le.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var t in Pe)void 0===Pe[t]?delete e[t]:e[t]=Pe[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Le.strings=r}return Le.strings},Ce=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ee.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Ce.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Ee.isDir(this.mode)}},isDevice:{get:function(){return Ee.isChrdev(this.mode)}}}),Ee.FSNode=Ce,Ee.createPreloadedFile=(e,t,r,n,s,i,o,a,l,c)=>{var _=t?le.resolve(oe.join2(e,t)):e,u=W(`cp ${_}`);function d(r){function d(r){c&&c(),a||((e,t,r,n,s,i)=>{Ee.createDataFile(e,t,r,n,s,i)})(e,t,r,n,s,l),i&&i(),Q(u)}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var s=!1;return ye.forEach((i=>{s||i.canHandle(t)&&(i.handle(e,t,r,n),s=!0)})),s})(r,_,d,(()=>{o&&o(),Q(u)}))||d(r)}H(u),"string"==typeof r?((e,t,r,n)=>{var s=W(`al ${e}`);m(e,(t=>{O(t,`Loading data file "${e}" failed (no arrayBuffer).`),d(new Uint8Array(t)),s&&Q(s)}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),s&&H(s)})(r,0,o):d(r)},Ee.staticInit(),we={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Ne,De={__syscall_chmod:function(e,t){try{return e=Se.getStr(e),Ee.chmod(e,t),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_faccessat:function(e,t,r,n){try{if(t=Se.getStr(t),O(0===n),t=Se.calculateAt(e,t),-8&r)return-28;var s=Ee.lookupPath(t,{follow:!0}).node;if(!s)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&&Ee.nodePermissions(s,i)?-2:0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchmod:function(e,t){try{return Ee.fchmod(e,t),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchown32:function(e,t,r){try{return Ee.fchown(e,t,r),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fcntl64:function(e,t,r){Se.varargs=r;try{var n=Se.getStreamFromFD(e);switch(t){case 0:if((s=Se.get())<0)return-28;for(;Ee.streams[s];)s++;return Ee.createStream(n,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var s=Se.get();return n.flags|=s,0;case 5:return s=Se.getp(),x[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return 28,T[Me()>>2]=28,-1}}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){try{var r=Se.getStreamFromFD(e);return Se.doStat(Ee.stat,r.path,t)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t){t=Ae(t);try{return isNaN(t)?61:(Ee.ftruncate(e,t),0)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getcwd:function(e,t){try{if(0===t)return-28;var r=Ee.cwd(),n=de(r)+1;return t>2]=s.c_iflag||0,T[i+4>>2]=s.c_oflag||0,T[i+8>>2]=s.c_cflag||0,T[i+12>>2]=s.c_lflag||0;for(var o=0;o<32;o++)S[i+o+17|0]=s.c_cc[o]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){i=Se.getp();var a=T[i>>2],l=T[i+4>>2],c=T[i+8>>2],_=T[i+12>>2],u=[];for(o=0;o<32;o++)u.push(S[i+o+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:a,c_oflag:l,c_cflag:c,c_lflag:_,c_cc:u})}return 0;case 21519:return n.tty?(i=Se.getp(),T[i>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return i=Se.getp(),Ee.ioctl(n,t,i);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var d=n.tty.ops.ioctl_tiocgwinsz(n.tty);i=Se.getp(),x[i>>1]=d[0],x[i+2>>1]=d[1]}return 0;default:return-28}}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(Ee.lstat,e,t)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_mkdirat:function(e,t,r){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),"/"===(t=oe.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),Ee.mkdir(t,r,0),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,r,n){try{t=Se.getStr(t);var s=256&n,i=4096&n;return O(!(n&=-6401),`unknown flags in __syscall_newfstatat: ${n}`),t=Se.calculateAt(e,t,i),Se.doStat(s?Ee.lstat:Ee.stat,t,r)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,r,n){Se.varargs=n;try{t=Se.getStr(t),t=Se.calculateAt(e,t);var s=n?Se.get():0;return Ee.open(t,r,s).fd}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_readlinkat:function(e,t,r,n){try{if(t=Se.getStr(t),t=Se.calculateAt(e,t),n<=0)return-28;var s=Ee.readlink(t),i=Math.min(n,de(s)),o=S[r+i];return xe(s,r,n+1),S[r+i]=o,i}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){try{return e=Se.getStr(e),Ee.rmdir(e),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(Ee.stat,e,t)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,r){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),0===r?Ee.unlink(t):512===r?Ee.rmdir(t):G("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_utimensat:function(e,t,r,n){try{if(t=Se.getStr(t),O(0===n),t=Se.calculateAt(e,t,!0),r){var s=Te(r),i=T[r+8>>2];o=1e3*s+i/1e6,a=1e3*(s=Te(r+=16))+(i=T[r+8>>2])/1e6}else var o=Date.now(),a=o;return Ee.utime(t,o,a),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},_emscripten_get_now_is_monotonic:()=>!0,_localtime_js:function(e,t){e=Ae(e);var r=new Date(1e3*e);T[t>>2]=r.getSeconds(),T[t+4>>2]=r.getMinutes(),T[t+8>>2]=r.getHours(),T[t+12>>2]=r.getDate(),T[t+16>>2]=r.getMonth(),T[t+20>>2]=r.getFullYear()-1900,T[t+24>>2]=r.getDay();var n=0|(e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?ke:Ie)[e.getMonth()]+e.getDate()-1})(r);T[t+28>>2]=n,T[t+36>>2]=-60*r.getTimezoneOffset();var s=new Date(r.getFullYear(),0,1),i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),o=s.getTimezoneOffset(),a=0|(i!=o&&r.getTimezoneOffset()==Math.min(o,i));T[t+32>>2]=a},_mmap_js:function(e,t,r,n,s,i,o){s=Ae(s);try{if(isNaN(s))return 61;var a=Se.getStreamFromFD(n),l=Ee.mmap(a,e,s,t,r),c=l.ptr;return T[i>>2]=l.allocated,I[o>>2]=c,0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,r,n,s,i){i=Ae(i);try{if(isNaN(i))return 61;var o=Se.getStreamFromFD(s);2&r&&Se.doMsync(e,o,t,n,i),Ee.munmap(o)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:(e,t,r)=>{var n=(new Date).getFullYear(),s=new Date(n,0,1),i=new Date(n,6,1),o=s.getTimezoneOffset(),a=i.getTimezoneOffset(),l=Math.max(o,a);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[e>>2]=60*l,T[t>>2]=Number(o!=a);var _=c(s),u=c(i),d=Fe(_),f=Fe(u);a>2]=d,I[r+4>>2]=f):(I[r>>2]=f,I[r+4>>2]=d)},emscripten_date_now:()=>Date.now(),emscripten_get_now:me,emscripten_memcpy_js:(e,t,r)=>A.copyWithin(e,t,t+r),emscripten_resize_heap:e=>{var t=A.length;O((e>>>=0)>t);var r=2147483648;if(e>r)return E(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var n,s=1;s<=4;s*=2){var i=t*(1+.2/s);i=Math.min(i,e+100663296);var o=Math.min(r,(n=Math.max(e,i))+(65536-n%65536)%65536);if(Oe(o))return!0}return E(`Failed to grow the heap from ${t} bytes to ${o} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var r=0;return Le().forEach(((n,s)=>{var i=t+r;I[e+4*s>>2]=i,((e,t)=>{for(var r=0;r{var r=Le();I[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),I[t>>2]=n,0},fd_close:function(e){try{var t=Se.getStreamFromFD(e);return Ee.close(t),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var r=Se.getStreamFromFD(e),n=r.tty?2:Ee.isDir(r.mode)?3:Ee.isLink(r.mode)?7:4;return S[0|t]=n,x[t+2>>1]=0,k[t+8>>3]=BigInt(0),k[t+16>>3]=BigInt(0),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,r,n){try{var s=((e,t,r,n)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=Ee.read(e,S,o,a,n);if(l<0)return-1;if(s+=l,l>2]=s,0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,r,n){t=Ae(t);try{if(isNaN(t))return 61;var s=Se.getStreamFromFD(e);return Ee.llseek(s,t,r),k[n>>3]=BigInt(s.position),s.getdents&&0===t&&0===r&&(s.getdents=null),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=Se.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?t.stream_ops.fsync(t):0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,r,n){try{var s=((e,t,r,n)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=Ee.write(e,S,o,a,n);if(l<0)return-1;s+=l,void 0!==n&&(n+=l)}return s})(Se.getStreamFromFD(e),t,r);return I[n>>2]=s,0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},memory:q},Re=function(){var e={env:De,wasi_snapshot_preview1:De};function t(e,t){var r;return r=(Re=e.exports).__wasm_call_ctors,D.unshift(r),Q("wasm-instantiate"),Re}H("wasm-instantiate");var r,n,o,a,l=i;if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),s(e)}return(r=y,n=V,o=e,a=function(e){O(i===l,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),l=null,t(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||K(n)||"function"!=typeof fetch?X(n,o,a):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),X(n,o,a)}))))).catch(s),{}}(),Me=(J("__wasm_call_ctors"),i._sqlite3_status64=J("sqlite3_status64"),i._sqlite3_status=J("sqlite3_status"),i._sqlite3_db_status=J("sqlite3_db_status"),i._sqlite3_msize=J("sqlite3_msize"),i._sqlite3_vfs_find=J("sqlite3_vfs_find"),i._sqlite3_initialize=J("sqlite3_initialize"),i._sqlite3_vfs_register=J("sqlite3_vfs_register"),i._sqlite3_vfs_unregister=J("sqlite3_vfs_unregister"),i._sqlite3_malloc=J("sqlite3_malloc"),i._sqlite3_malloc64=J("sqlite3_malloc64"),i._sqlite3_free=J("sqlite3_free"),i._sqlite3_realloc=J("sqlite3_realloc"),i._sqlite3_realloc64=J("sqlite3_realloc64"),i._sqlite3_value_int64=J("sqlite3_value_int64"),i._sqlite3_value_double=J("sqlite3_value_double"),i._sqlite3_value_text=J("sqlite3_value_text"),i._sqlite3_randomness=J("sqlite3_randomness"),i._sqlite3_stricmp=J("sqlite3_stricmp"),i._sqlite3_strnicmp=J("sqlite3_strnicmp"),J("__errno_location")),je=(i._sqlite3_serialize=J("sqlite3_serialize"),i._sqlite3_prepare_v2=J("sqlite3_prepare_v2"),i._sqlite3_step=J("sqlite3_step"),i._sqlite3_column_int64=J("sqlite3_column_int64"),i._sqlite3_column_int=J("sqlite3_column_int"),i._sqlite3_finalize=J("sqlite3_finalize"),i._sqlite3_file_control=J("sqlite3_file_control"),i._sqlite3_reset=J("sqlite3_reset"),i._sqlite3_value_int=J("sqlite3_value_int"),i._sqlite3_deserialize=J("sqlite3_deserialize"),i._sqlite3_clear_bindings=J("sqlite3_clear_bindings"),i._sqlite3_value_blob=J("sqlite3_value_blob"),i._sqlite3_value_bytes=J("sqlite3_value_bytes"),i._sqlite3_value_subtype=J("sqlite3_value_subtype"),i._sqlite3_value_pointer=J("sqlite3_value_pointer"),i._sqlite3_value_type=J("sqlite3_value_type"),i._sqlite3_value_nochange=J("sqlite3_value_nochange"),i._sqlite3_value_frombind=J("sqlite3_value_frombind"),i._sqlite3_value_dup=J("sqlite3_value_dup"),i._sqlite3_value_free=J("sqlite3_value_free"),i._sqlite3_result_blob=J("sqlite3_result_blob"),i._sqlite3_result_error_toobig=J("sqlite3_result_error_toobig"),i._sqlite3_result_error_nomem=J("sqlite3_result_error_nomem"),i._sqlite3_result_double=J("sqlite3_result_double"),i._sqlite3_result_error=J("sqlite3_result_error"),i._sqlite3_result_int=J("sqlite3_result_int"),i._sqlite3_result_int64=J("sqlite3_result_int64"),i._sqlite3_result_null=J("sqlite3_result_null"),i._sqlite3_result_pointer=J("sqlite3_result_pointer"),i._sqlite3_result_subtype=J("sqlite3_result_subtype"),i._sqlite3_result_text=J("sqlite3_result_text"),i._sqlite3_result_zeroblob=J("sqlite3_result_zeroblob"),i._sqlite3_result_zeroblob64=J("sqlite3_result_zeroblob64"),i._sqlite3_result_error_code=J("sqlite3_result_error_code"),i._sqlite3_sql=J("sqlite3_sql"),i._sqlite3_user_data=J("sqlite3_user_data"),i._sqlite3_context_db_handle=J("sqlite3_context_db_handle"),i._sqlite3_vtab_nochange=J("sqlite3_vtab_nochange"),i._sqlite3_vtab_in_first=J("sqlite3_vtab_in_first"),i._sqlite3_vtab_in_next=J("sqlite3_vtab_in_next"),i._sqlite3_aggregate_context=J("sqlite3_aggregate_context"),i._sqlite3_get_auxdata=J("sqlite3_get_auxdata"),i._sqlite3_set_auxdata=J("sqlite3_set_auxdata"),i._sqlite3_column_count=J("sqlite3_column_count"),i._sqlite3_data_count=J("sqlite3_data_count"),i._sqlite3_column_blob=J("sqlite3_column_blob"),i._sqlite3_column_bytes=J("sqlite3_column_bytes"),i._sqlite3_column_double=J("sqlite3_column_double"),i._sqlite3_column_text=J("sqlite3_column_text"),i._sqlite3_column_value=J("sqlite3_column_value"),i._sqlite3_column_type=J("sqlite3_column_type"),i._sqlite3_column_name=J("sqlite3_column_name"),i._sqlite3_bind_blob=J("sqlite3_bind_blob"),i._sqlite3_bind_double=J("sqlite3_bind_double"),i._sqlite3_bind_int=J("sqlite3_bind_int"),i._sqlite3_bind_int64=J("sqlite3_bind_int64"),i._sqlite3_bind_null=J("sqlite3_bind_null"),i._sqlite3_bind_pointer=J("sqlite3_bind_pointer"),i._sqlite3_bind_text=J("sqlite3_bind_text"),i._sqlite3_bind_parameter_count=J("sqlite3_bind_parameter_count"),i._sqlite3_bind_parameter_index=J("sqlite3_bind_parameter_index"),i._sqlite3_db_handle=J("sqlite3_db_handle"),i._sqlite3_stmt_readonly=J("sqlite3_stmt_readonly"),i._sqlite3_stmt_isexplain=J("sqlite3_stmt_isexplain"),i._sqlite3_stmt_status=J("sqlite3_stmt_status"),i._sqlite3_expanded_sql=J("sqlite3_expanded_sql"),i._sqlite3_preupdate_old=J("sqlite3_preupdate_old"),i._sqlite3_preupdate_count=J("sqlite3_preupdate_count"),i._sqlite3_preupdate_depth=J("sqlite3_preupdate_depth"),i._sqlite3_preupdate_blobwrite=J("sqlite3_preupdate_blobwrite"),i._sqlite3_preupdate_new=J("sqlite3_preupdate_new"),i._sqlite3_value_numeric_type=J("sqlite3_value_numeric_type"),i._sqlite3_errmsg=J("sqlite3_errmsg"),i._sqlite3_set_authorizer=J("sqlite3_set_authorizer"),i._sqlite3_strglob=J("sqlite3_strglob"),i._sqlite3_strlike=J("sqlite3_strlike"),i._sqlite3_exec=J("sqlite3_exec"),i._sqlite3_auto_extension=J("sqlite3_auto_extension"),i._sqlite3_cancel_auto_extension=J("sqlite3_cancel_auto_extension"),i._sqlite3_reset_auto_extension=J("sqlite3_reset_auto_extension"),i._sqlite3_prepare_v3=J("sqlite3_prepare_v3"),i._sqlite3_create_module=J("sqlite3_create_module"),i._sqlite3_create_module_v2=J("sqlite3_create_module_v2"),i._sqlite3_drop_modules=J("sqlite3_drop_modules"),i._sqlite3_declare_vtab=J("sqlite3_declare_vtab"),i._sqlite3_vtab_on_conflict=J("sqlite3_vtab_on_conflict"),i._sqlite3_vtab_collation=J("sqlite3_vtab_collation"),i._sqlite3_vtab_in=J("sqlite3_vtab_in"),i._sqlite3_vtab_rhs_value=J("sqlite3_vtab_rhs_value"),i._sqlite3_vtab_distinct=J("sqlite3_vtab_distinct"),i._sqlite3_keyword_name=J("sqlite3_keyword_name"),i._sqlite3_keyword_count=J("sqlite3_keyword_count"),i._sqlite3_keyword_check=J("sqlite3_keyword_check"),i._sqlite3_complete=J("sqlite3_complete"),i._sqlite3_libversion=J("sqlite3_libversion"),i._sqlite3_libversion_number=J("sqlite3_libversion_number"),i._sqlite3_shutdown=J("sqlite3_shutdown"),i._sqlite3_last_insert_rowid=J("sqlite3_last_insert_rowid"),i._sqlite3_set_last_insert_rowid=J("sqlite3_set_last_insert_rowid"),i._sqlite3_changes64=J("sqlite3_changes64"),i._sqlite3_changes=J("sqlite3_changes"),i._sqlite3_total_changes64=J("sqlite3_total_changes64"),i._sqlite3_total_changes=J("sqlite3_total_changes"),i._sqlite3_txn_state=J("sqlite3_txn_state"),i._sqlite3_close_v2=J("sqlite3_close_v2"),i._sqlite3_busy_handler=J("sqlite3_busy_handler"),i._sqlite3_progress_handler=J("sqlite3_progress_handler"),i._sqlite3_busy_timeout=J("sqlite3_busy_timeout"),i._sqlite3_create_function=J("sqlite3_create_function"),i._sqlite3_create_function_v2=J("sqlite3_create_function_v2"),i._sqlite3_create_window_function=J("sqlite3_create_window_function"),i._sqlite3_overload_function=J("sqlite3_overload_function"),i._sqlite3_trace_v2=J("sqlite3_trace_v2"),i._sqlite3_commit_hook=J("sqlite3_commit_hook"),i._sqlite3_update_hook=J("sqlite3_update_hook"),i._sqlite3_rollback_hook=J("sqlite3_rollback_hook"),i._sqlite3_preupdate_hook=J("sqlite3_preupdate_hook"),i._sqlite3_error_offset=J("sqlite3_error_offset"),i._sqlite3_errcode=J("sqlite3_errcode"),i._sqlite3_extended_errcode=J("sqlite3_extended_errcode"),i._sqlite3_errstr=J("sqlite3_errstr"),i._sqlite3_limit=J("sqlite3_limit"),i._sqlite3_open=J("sqlite3_open"),i._sqlite3_open_v2=J("sqlite3_open_v2"),i._sqlite3_create_collation=J("sqlite3_create_collation"),i._sqlite3_create_collation_v2=J("sqlite3_create_collation_v2"),i._sqlite3_collation_needed=J("sqlite3_collation_needed"),i._sqlite3_table_column_metadata=J("sqlite3_table_column_metadata"),i._sqlite3_extended_result_codes=J("sqlite3_extended_result_codes"),i._sqlite3_uri_parameter=J("sqlite3_uri_parameter"),i._sqlite3_uri_key=J("sqlite3_uri_key"),i._sqlite3_uri_boolean=J("sqlite3_uri_boolean"),i._sqlite3_uri_int64=J("sqlite3_uri_int64"),i._sqlite3_db_name=J("sqlite3_db_name"),i._sqlite3_db_filename=J("sqlite3_db_filename"),i._sqlite3_compileoption_used=J("sqlite3_compileoption_used"),i._sqlite3_compileoption_get=J("sqlite3_compileoption_get"),i._sqlite3session_diff=J("sqlite3session_diff"),i._sqlite3session_attach=J("sqlite3session_attach"),i._sqlite3session_create=J("sqlite3session_create"),i._sqlite3session_delete=J("sqlite3session_delete"),i._sqlite3session_table_filter=J("sqlite3session_table_filter"),i._sqlite3session_changeset=J("sqlite3session_changeset"),i._sqlite3session_changeset_strm=J("sqlite3session_changeset_strm"),i._sqlite3session_patchset_strm=J("sqlite3session_patchset_strm"),i._sqlite3session_patchset=J("sqlite3session_patchset"),i._sqlite3session_enable=J("sqlite3session_enable"),i._sqlite3session_indirect=J("sqlite3session_indirect"),i._sqlite3session_isempty=J("sqlite3session_isempty"),i._sqlite3session_memory_used=J("sqlite3session_memory_used"),i._sqlite3session_object_config=J("sqlite3session_object_config"),i._sqlite3session_changeset_size=J("sqlite3session_changeset_size"),i._sqlite3changeset_start=J("sqlite3changeset_start"),i._sqlite3changeset_start_v2=J("sqlite3changeset_start_v2"),i._sqlite3changeset_start_strm=J("sqlite3changeset_start_strm"),i._sqlite3changeset_start_v2_strm=J("sqlite3changeset_start_v2_strm"),i._sqlite3changeset_next=J("sqlite3changeset_next"),i._sqlite3changeset_op=J("sqlite3changeset_op"),i._sqlite3changeset_pk=J("sqlite3changeset_pk"),i._sqlite3changeset_old=J("sqlite3changeset_old"),i._sqlite3changeset_new=J("sqlite3changeset_new"),i._sqlite3changeset_conflict=J("sqlite3changeset_conflict"),i._sqlite3changeset_fk_conflicts=J("sqlite3changeset_fk_conflicts"),i._sqlite3changeset_finalize=J("sqlite3changeset_finalize"),i._sqlite3changeset_invert=J("sqlite3changeset_invert"),i._sqlite3changeset_invert_strm=J("sqlite3changeset_invert_strm"),i._sqlite3changeset_apply_v2=J("sqlite3changeset_apply_v2"),i._sqlite3changeset_apply=J("sqlite3changeset_apply"),i._sqlite3changeset_apply_v2_strm=J("sqlite3changeset_apply_v2_strm"),i._sqlite3changeset_apply_strm=J("sqlite3changeset_apply_strm"),i._sqlite3changegroup_new=J("sqlite3changegroup_new"),i._sqlite3changegroup_add=J("sqlite3changegroup_add"),i._sqlite3changegroup_output=J("sqlite3changegroup_output"),i._sqlite3changegroup_add_strm=J("sqlite3changegroup_add_strm"),i._sqlite3changegroup_output_strm=J("sqlite3changegroup_output_strm"),i._sqlite3changegroup_delete=J("sqlite3changegroup_delete"),i._sqlite3changeset_concat=J("sqlite3changeset_concat"),i._sqlite3changeset_concat_strm=J("sqlite3changeset_concat_strm"),i._sqlite3session_config=J("sqlite3session_config"),i._sqlite3_sourceid=J("sqlite3_sourceid"),i._sqlite3_wasm_pstack_ptr=J("sqlite3_wasm_pstack_ptr"),i._sqlite3_wasm_pstack_restore=J("sqlite3_wasm_pstack_restore"),i._sqlite3_wasm_pstack_alloc=J("sqlite3_wasm_pstack_alloc"),i._sqlite3_wasm_pstack_remaining=J("sqlite3_wasm_pstack_remaining"),i._sqlite3_wasm_pstack_quota=J("sqlite3_wasm_pstack_quota"),i._sqlite3_wasm_db_error=J("sqlite3_wasm_db_error"),i._sqlite3_wasm_test_struct=J("sqlite3_wasm_test_struct"),i._sqlite3_wasm_enum_json=J("sqlite3_wasm_enum_json"),i._sqlite3_wasm_vfs_unlink=J("sqlite3_wasm_vfs_unlink"),i._sqlite3_wasm_db_vfs=J("sqlite3_wasm_db_vfs"),i._sqlite3_wasm_db_reset=J("sqlite3_wasm_db_reset"),i._sqlite3_wasm_db_export_chunked=J("sqlite3_wasm_db_export_chunked"),i._sqlite3_wasm_db_serialize=J("sqlite3_wasm_db_serialize"),i._sqlite3_wasm_vfs_create_file=J("sqlite3_wasm_vfs_create_file"),i._sqlite3_wasm_posix_create_file=J("sqlite3_wasm_posix_create_file"),i._sqlite3_wasm_kvvfsMakeKeyOnPstack=J("sqlite3_wasm_kvvfsMakeKeyOnPstack"),i._sqlite3_wasm_kvvfs_methods=J("sqlite3_wasm_kvvfs_methods"),i._sqlite3_wasm_vtab_config=J("sqlite3_wasm_vtab_config"),i._sqlite3_wasm_db_config_ip=J("sqlite3_wasm_db_config_ip"),i._sqlite3_wasm_db_config_pii=J("sqlite3_wasm_db_config_pii"),i._sqlite3_wasm_db_config_s=J("sqlite3_wasm_db_config_s"),i._sqlite3_wasm_config_i=J("sqlite3_wasm_config_i"),i._sqlite3_wasm_config_ii=J("sqlite3_wasm_config_ii"),i._sqlite3_wasm_config_j=J("sqlite3_wasm_config_j"),i._sqlite3_wasm_init_wasmfs=J("sqlite3_wasm_init_wasmfs"),i._sqlite3_wasm_test_intptr=J("sqlite3_wasm_test_intptr"),i._sqlite3_wasm_test_voidptr=J("sqlite3_wasm_test_voidptr"),i._sqlite3_wasm_test_int64_max=J("sqlite3_wasm_test_int64_max"),i._sqlite3_wasm_test_int64_min=J("sqlite3_wasm_test_int64_min"),i._sqlite3_wasm_test_int64_times2=J("sqlite3_wasm_test_int64_times2"),i._sqlite3_wasm_test_int64_minmax=J("sqlite3_wasm_test_int64_minmax"),i._sqlite3_wasm_test_int64ptr=J("sqlite3_wasm_test_int64ptr"),i._sqlite3_wasm_test_stack_overflow=J("sqlite3_wasm_test_stack_overflow"),i._sqlite3_wasm_test_str_hello=J("sqlite3_wasm_test_str_hello"),i._sqlite3_wasm_SQLTester_strglob=J("sqlite3_wasm_SQLTester_strglob"),i._malloc=J("malloc")),Ue=(i._free=J("free"),i._realloc=J("realloc"),i._fflush=J("fflush")),Be=J("emscripten_builtin_memalign"),ze=()=>(ze=Re.emscripten_stack_init)(),We=()=>(We=Re.emscripten_stack_get_end)();function He(){function e(){Ne||(Ne=!0,i.calledRun=!0,F||(O(!M),M=!0,C(),i.noFSInit||Ee.init.initialized||Ee.init(),Ee.ignorePermissions=!1,he.init(),ne(D),n(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(C(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),R.unshift(e);var e;ne(R)}()))}var t;j>0||(ze(),O(!(3&(t=We()))),0==t&&(t+=4),I[t>>2]=34821223,I[t+4>>2]=2310721022,I[0]=1668509029,function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),N.unshift(e);var e;ne(N)}(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e(),C()))}if(J("stackSave"),J("stackRestore"),J("stackAlloc"),i.wasmMemory=q,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","exitJS","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","handleAllocatorInit","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",r=e;r.startsWith("_")||(r="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+r+"')",ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ie(t)}}),re(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","keepRuntimeAlive","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","readI53FromI64","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","getExecutableName","asyncLoad","alignMemory","mmapAlloc","wasmTable","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToNewUTF8","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack"].forEach(re),B=function e(){Ne||He(),Ne||(B=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return He(),i.postRun||(i.postRun=[]),i.postRun.push((function(e){if(globalThis.sqlite3ApiBootstrap=function t(r=globalThis.sqlite3ApiConfig||t.defaultConfig){if(t.sqlite3)return console.warn("sqlite3ApiBootstrap() called multiple times.","Config and external initializers are ignored on calls after the first."),t.sqlite3;const n=Object.assign(Object.create(null),{exports:void 0,memory:void 0,bigIntEnabled:void 0!==e?!!e.HEAPU64:!!globalThis.BigInt64Array,debug:console.debug.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),log:console.log.bind(console),wasmfsOpfsDir:"/opfs",useStdAlloc:!1},r||{});Object.assign(n,{allocExportName:n.useStdAlloc?"malloc":"sqlite3_malloc",deallocExportName:n.useStdAlloc?"free":"sqlite3_free",reallocExportName:n.useStdAlloc?"realloc":"sqlite3_realloc"},n),["exports","memory","wasmfsOpfsDir"].forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e]())}));const s=Object.create(null),i=Object.create(null),o=e=>s.sqlite3_js_rc_str&&s.sqlite3_js_rc_str(e)||"Unknown result code #"+e;class a extends Error{constructor(...e){let t;if(e.length)if("number"==typeof(r=e[0])&&r===(0|r))if(t=e[0],1===e.length)super(o(e[0]));else{const r=o(t);"object"==typeof e[1]?super(r,e[1]):(e[0]=r+":",super(e.join(" ")))}else 2===e.length&&"object"==typeof e[1]?super(...e):super(e.join(" "));var r;this.resultCode=t||s.SQLITE_ERROR,this.name="SQLite3Error"}}a.toss=(...e)=>{throw new a(...e)};const l=a.toss;n.wasmfsOpfsDir&&!/^\/[^/]+$/.test(n.wasmfsOpfsDir)&&l("config.wasmfsOpfsDir must be falsy or in the form '/dir-name'.");const c=e=>"bigint"!=typeof e&&!!(e===(0|e)&&e<=2147483647&&e>=-2147483648),_="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,u=e=>e.buffer instanceof _,d=(e,t,r)=>u(e)?e.slice(t,r):e.subarray(t,r),f=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),p=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),m=e=>f(e)||l("Value is not of a supported TypedArray type."),h=new TextDecoder("utf-8"),g=function(e,t,r){return h.decode(d(e,t,r))},b=function(e){return p(e)?g(e instanceof ArrayBuffer?new Uint8Array(e):e):Array.isArray(e)?e.join(""):(i.isPtr(e)&&(e=i.cstrToJs(e)),e)};class y extends Error{constructor(...e){2===e.length&&"object"==typeof e[1]?super(...e):e.length?super(e.join(" ")):super("Allocation failed."),this.resultCode=s.SQLITE_NOMEM,this.name="WasmAllocError"}}y.toss=(...e)=>{throw new y(...e)},Object.assign(s,{sqlite3_bind_blob:void 0,sqlite3_bind_text:void 0,sqlite3_create_function_v2:(e,t,r,n,s,i,o,a,l)=>{},sqlite3_create_function:(e,t,r,n,s,i,o,a)=>{},sqlite3_create_window_function:(e,t,r,n,s,i,o,a,l,c)=>{},sqlite3_prepare_v3:(e,t,r,n,s,i)=>{},sqlite3_prepare_v2:(e,t,r,n,s)=>{},sqlite3_exec:(e,t,r,n,s)=>{},sqlite3_randomness:(e,t)=>{}});const q={affirmBindableTypedArray:m,flexibleString:b,bigIntFits32:e=>e>=-2147483648n&&e<=0x7fffffffn,bigIntFits64:function e(t){return e._max||(e._max=BigInt("0x7fffffffffffffff"),e._min=~e._max),t>=e._min&&t<=e._max},bigIntFitsDouble:function e(t){return e._min||(e._min=Number.MIN_SAFE_INTEGER,e._max=Number.MAX_SAFE_INTEGER),t>=e._min&&t<=e._max},isBindableTypedArray:f,isInt32:c,isSQLableTypedArray:p,isTypedArray:e=>!!(e&&e.constructor&&c(e.constructor.BYTES_PER_ELEMENT))&&e,typedArrayToString:g,isUIThread:()=>globalThis.window===globalThis&&!!globalThis.document,isSharedTypedArray:u,toss:function(...e){throw new Error(e.join(" "))},toss3:l,typedArrayPart:d,affirmDbHeader:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));15>e.byteLength&&l("Input does not contain an SQLite3 database header.");for(let t=0;t<15;++t)"SQLite format 3".charCodeAt(t)!==e[t]&&l("Input does not contain an SQLite3 database header.")},affirmIsDb:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=e.byteLength;(t<512||t%512!=0)&&l("Byte array size",t,"is invalid for an SQLite3 db."),q.affirmDbHeader(e)}};Object.assign(i,{ptrSizeof:n.wasmPtrSizeof||4,ptrIR:n.wasmPtrIR||"i32",bigIntEnabled:!!n.bigIntEnabled,exports:n.exports||l("Missing API config.exports (WASM module exports)."),memory:n.memory||n.exports.memory||l("API config object requires a WebAssembly.Memory object","in either config.exports.memory (exported)","or config.memory (imported)."),alloc:void 0,realloc:void 0,dealloc:void 0}),i.allocFromTypedArray=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e)),m(e);const t=i.alloc(e.byteLength||1);return i.heapForSize(e.constructor).set(e.byteLength?e:[0],t),t};{const e=n.allocExportName,t=n.deallocExportName,r=n.reallocExportName;for(const n of[e,t,r])i.exports[n]instanceof Function||l("Missing required exports[",n,"] function.");i.alloc=function e(t){return e.impl(t)||y.toss("Failed to allocate",t," bytes.")},i.alloc.impl=i.exports[e],i.realloc=function e(t,r){const n=e.impl(t,r);return r?n||y.toss("Failed to reallocate",r," bytes."):0},i.realloc.impl=i.exports[r],i.dealloc=i.exports[t]}let w;if(i.compileOptionUsed=function e(t){if(!arguments.length){if(e._result)return e._result;e._opt||(e._rx=/^([^=]+)=(.+)/,e._rxInt=/^-?\d+$/,e._opt=function(t,r){const n=e._rx.exec(t);r[0]=n?n[1]:t,r[1]=!n||(e._rxInt.test(n[2])?+n[2]:n[2])});const t={},r=[0,0];let n,i=0;for(;n=s.sqlite3_compileoption_get(i++);)e._opt(n,r),t[r[0]]=r[1];return e._result=t}if(Array.isArray(t)){const e={};return t.forEach((t=>{e[t]=s.sqlite3_compileoption_used(t)})),e}return"object"==typeof t?(Object.keys(t).forEach((e=>{t[e]=s.sqlite3_compileoption_used(e)})),t):"string"==typeof t&&!!s.sqlite3_compileoption_used(t)},i.pstack=Object.assign(Object.create(null),{restore:i.exports.sqlite3_wasm_pstack_restore,alloc:function(e){return"string"!=typeof e||(e=i.sizeofIR(e))||y.toss("Invalid value for pstack.alloc(",arguments[0],")"),i.exports.sqlite3_wasm_pstack_alloc(e)||y.toss("Could not allocate",e,"bytes from the pstack.")},allocChunks:function(e,t){"string"!=typeof t||(t=i.sizeofIR(t))||y.toss("Invalid size value for allocChunks(",arguments[1],")");const r=i.pstack.alloc(e*t),n=[];let s=0,o=0;for(;s1===e?i.pstack.alloc(t?8:i.ptrSizeof):i.pstack.allocChunks(e,t?8:i.ptrSizeof),call:function(e){const t=i.pstack.pointer;try{return e(S)}finally{i.pstack.restore(t)}}}),Object.defineProperties(i.pstack,{pointer:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_ptr},quota:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_quota},remaining:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_remaining}}),s.sqlite3_randomness=(...e)=>{if(1===e.length&&q.isTypedArray(e[0])&&1===e[0].BYTES_PER_ELEMENT){const t=e[0];if(0===t.byteLength)return i.exports.sqlite3_randomness(0,0),t;const r=i.pstack.pointer;try{let e=t.byteLength,r=0;const n=i.exports.sqlite3_randomness,s=i.heap8u(),o=e<512?e:512,a=i.pstack.alloc(o);do{const i=e>o?o:e;n(i,a),t.set(d(s,a,a+i),r),e-=i,r+=i}while(e>0)}catch(e){console.error("Highly unexpected (and ignored!) exception in sqlite3_randomness():",e)}finally{i.pstack.restore(r)}return t}i.exports.sqlite3_randomness(...e)},s.sqlite3_wasmfs_opfs_dir=function(){if(void 0!==w)return w;const e=n.wasmfsOpfsDir;if(!(e&&globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle))return w="";try{return w=e&&0===i.xCallWrapped("sqlite3_wasm_init_wasmfs","i32",["string"],e)?e:""}catch(e){return w=""}},s.sqlite3_wasmfs_filename_is_persistent=function(e){const t=s.sqlite3_wasmfs_opfs_dir();return!(!t||!e)&&e.startsWith(t+"/")},s.sqlite3_js_db_uses_vfs=function(e,t,r=0){try{const n=s.sqlite3_vfs_find(t);return!!n&&(e?n===s.sqlite3_js_db_vfs(e,r)&&n:n===s.sqlite3_vfs_find(0)&&n)}catch(e){return!1}},s.sqlite3_js_vfs_list=function(){const e=[];let t=s.sqlite3_vfs_find(0);for(;t;){const r=new s.sqlite3_vfs(t);e.push(i.cstrToJs(r.$zName)),t=r.$pNext,r.dispose()}return e},s.sqlite3_js_db_export=function(e,t=0){(e=i.xWrap.testConvertArg("sqlite3*",e))||l("Invalid sqlite3* argument."),i.bigIntEnabled||l("BigInt64 support is not enabled.");const r=i.scopedAllocPush();let n;try{const r=i.scopedAlloc(8+i.ptrSizeof),s=r+8,o=t?i.isPtr(t)?t:i.scopedAllocCString(""+t):0;let a=i.exports.sqlite3_wasm_db_serialize(e,o,s,r,0);a&&l("Database serialization failed with code",S.capi.sqlite3_js_rc_str(a)),n=i.peekPtr(s);const c=i.peek(r,"i64");return a=c?i.heap8u().slice(n,n+Number(c)):new Uint8Array,a}finally{n&&i.exports.sqlite3_free(n),i.scopedAllocPop(r)}},s.sqlite3_js_db_vfs=(e,t=0)=>i.sqlite3_wasm_db_vfs(e,t),s.sqlite3_js_aggregate_context=(e,t)=>s.sqlite3_aggregate_context(e,t)||(t?y.toss("Cannot allocate",t,"bytes for sqlite3_aggregate_context()"):0),s.sqlite3_js_posix_create_file=function(e,t,r){let n;t&&i.isPtr(t)?n=t:t instanceof ArrayBuffer||t instanceof Uint8Array?(n=i.allocFromTypedArray(t),(arguments.length<3||!q.isInt32(r)||r<0)&&(r=t.byteLength)):a.toss("Invalid 2nd argument for sqlite3_js_posix_create_file().");try{(!q.isInt32(r)||r<0)&&a.toss("Invalid 3rd argument for sqlite3_js_posix_create_file().");const t=i.sqlite3_wasm_posix_create_file(e,n,r);t&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(t))}finally{i.dealloc(n)}},s.sqlite3_js_vfs_create_file=function(e,t,r,o){let l;n.warn("sqlite3_js_vfs_create_file() is deprecated and","should be avoided because it can lead to C-level crashes.","See its documentation for alternative options."),r?(i.isPtr(r)?l=r:r instanceof ArrayBuffer&&(r=new Uint8Array(r)),r instanceof Uint8Array?(l=i.allocFromTypedArray(r),(arguments.length<4||!q.isInt32(o)||o<0)&&(o=r.byteLength)):a.toss("Invalid 3rd argument type for sqlite3_js_vfs_create_file().")):l=0,(!q.isInt32(o)||o<0)&&(i.dealloc(l),a.toss("Invalid 4th argument for sqlite3_js_vfs_create_file()."));try{const r=i.sqlite3_wasm_vfs_create_file(e,t,l,o);r&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(r))}finally{i.dealloc(l)}},s.sqlite3_js_sql_to_string=e=>{if("string"==typeof e)return e;const t=b(v);return t===v?void 0:t},q.isUIThread()){const e=function(e){const t=Object.create(null);return t.prefix="kvvfs-"+e,t.stores=[],"session"!==e&&""!==e||t.stores.push(globalThis.sessionStorage),"local"!==e&&""!==e||t.stores.push(globalThis.localStorage),t};s.sqlite3_js_kvvfs_clear=function(t=""){let r=0;const n=e(t);return n.stores.forEach((e=>{const t=[];let s;for(s=0;se.removeItem(t))),r+=t.length})),r},s.sqlite3_js_kvvfs_size=function(t=""){let r=0;const n=e(t);return n.stores.forEach((e=>{let t;for(t=0;tE(e,t,"sqlite3_preupdate_new"),s.sqlite3_preupdate_old_js=(e,t)=>E(e,t,"sqlite3_preupdate_old"),s.sqlite3changeset_new_js=(e,t)=>E(e,t,"sqlite3changeset_new"),s.sqlite3changeset_old_js=(e,t)=>E(e,t,"sqlite3changeset_old");const S={WasmAllocError:y,SQLite3Error:a,capi:s,util:q,wasm:i,config:n,version:Object.create(null),client:void 0,asyncPostInit:async function e(){if(e.isReady instanceof Promise)return e.isReady;let r=t.initializersAsync;delete t.initializersAsync;const s=async()=>(S.__isUnderTest||(delete S.util,delete S.StructBinder),S),i=e=>{throw n.error("an async sqlite3 initializer failed:",e),e};if(!r||!r.length)return e.isReady=s().catch(i);r=r.map((e=>e instanceof Function?async t=>e(S):e)),r.push(s);let o=Promise.resolve(S);for(;r.length;)o=o.then(r.shift());return e.isReady=o.catch(i)},scriptInfo:void 0};try{t.initializers.forEach((e=>{e(S)}))}catch(e){throw console.error("sqlite3 bootstrap initializer threw:",e),e}return delete t.initializers,t.sqlite3=S,S},globalThis.sqlite3ApiBootstrap.initializers=[],globalThis.sqlite3ApiBootstrap.initializersAsync=[],globalThis.sqlite3ApiBootstrap.defaultConfig=Object.create(null),globalThis.sqlite3ApiBootstrap.sqlite3=void 0,globalThis.WhWasmUtilInstaller=function(e){void 0===e.bigIntEnabled&&(e.bigIntEnabled=!!globalThis.BigInt64Array);const t=(...e)=>{throw new Error(e.join(" "))};e.exports||Object.defineProperty(e,"exports",{enumerable:!0,configurable:!0,get:()=>e.instance&&e.instance.exports});const r=e.pointerIR||"i32",n=e.ptrSizeof="i32"===r?4:"i64"===r?8:t("Unhandled ptrSizeof:",r),s=Object.create(null);s.heapSize=0,s.memory=null,s.freeFuncIndexes=[],s.scopedAlloc=[],s.utf8Decoder=new TextDecoder,s.utf8Encoder=new TextEncoder("utf-8"),e.sizeofIR=e=>{switch(e){case"i8":return 1;case"i16":return 2;case"i32":case"f32":case"float":return 4;case"i64":case"f64":case"double":return 8;case"*":return n;default:return(""+e).endsWith("*")?n:void 0}};const i=function(){if(s.memory){if(s.heapSize===s.memory.buffer.byteLength)return s}else s.memory=e.memory instanceof WebAssembly.Memory?e.memory:e.exports.memory;const t=s.memory.buffer;return s.HEAP8=new Int8Array(t),s.HEAP8U=new Uint8Array(t),s.HEAP16=new Int16Array(t),s.HEAP16U=new Uint16Array(t),s.HEAP32=new Int32Array(t),s.HEAP32U=new Uint32Array(t),e.bigIntEnabled&&(s.HEAP64=new BigInt64Array(t),s.HEAP64U=new BigUint64Array(t)),s.HEAP32F=new Float32Array(t),s.HEAP64F=new Float64Array(t),s.heapSize=t.byteLength,s};e.heap8=()=>i().HEAP8,e.heap8u=()=>i().HEAP8U,e.heap16=()=>i().HEAP16,e.heap16u=()=>i().HEAP16U,e.heap32=()=>i().HEAP32,e.heap32u=()=>i().HEAP32U,e.heapForSize=function(r,n=!0){const o=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();switch(r){case Int8Array:return o.HEAP8;case Uint8Array:return o.HEAP8U;case Int16Array:return o.HEAP16;case Uint16Array:return o.HEAP16U;case Int32Array:return o.HEAP32;case Uint32Array:return o.HEAP32U;case 8:return n?o.HEAP8U:o.HEAP8;case 16:return n?o.HEAP16U:o.HEAP16;case 32:return n?o.HEAP32U:o.HEAP32;case 64:if(o.HEAP64)return n?o.HEAP64U:o.HEAP64;break;default:if(e.bigIntEnabled){if(r===globalThis.BigUint64Array)return o.HEAP64U;if(r===globalThis.BigInt64Array)return o.HEAP64;break}}t("Invalid heapForSize() size: expecting 8, 16, 32,","or (if BigInt is enabled) 64.")},e.functionTable=function(){return e.exports.__indirect_function_table},e.functionEntry=function(t){const r=e.functionTable();return t>7)},rxJSig:/^(\w)\((\w*)\)$/,sigParams:function(t){const r=e._.rxJSig.exec(t);return r?r[2]:t.substr(1)},letterType:r=>e._.sigTypes[r]||t("Invalid signature letter:",r),pushSigType:(t,r)=>t.push(e._.typeCodes[e._.letterType(r)])}),"string"==typeof r){const e=n;n=r,r=e}const s=e._.sigParams(n),i=[1,96];e._.uleb128Encode(i,"push",s.length);for(const t of s)e._.pushSigType(i,t);return"v"===n[0]?i.push(0):(i.push(1),e._.pushSigType(i,n[0])),e._.uleb128Encode(i,"unshift",i.length),i.unshift(0,97,115,109,1,0,0,0,1),i.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array(i)),{e:{f:r}}).exports.f};const o=function(r,n,i){if(i&&!s.scopedAlloc.length&&t("No scopedAllocPush() scope is active."),"string"==typeof r){const e=n;n=r,r=e}"string"==typeof n&&r instanceof Function||t("Invalid arguments: expecting (function,signature) or (signature,function).");const o=e.functionTable(),a=o.length;let l;for(;s.freeFuncIndexes.length&&(l=s.freeFuncIndexes.pop(),o.get(l));)l=null;l||(l=a,o.grow(1));try{return o.set(l,r),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l),l}catch(e){if(!(e instanceof TypeError))throw l===a&&s.freeFuncIndexes.push(a),e}try{const t=e.jsFuncToWasm(r,n);o.set(l,t),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l)}catch(e){throw l===a&&s.freeFuncIndexes.push(a),e}return l};e.installFunction=(e,t)=>o(e,t,!1),e.scopedInstallFunction=(e,t)=>o(e,t,!0),e.uninstallFunction=function(t){if(!t&&0!==t)return;const r=s.freeFuncIndexes,n=e.functionTable();r.push(t);const i=n.get(t);return n.set(t,null),i},e.peek=function(n,o="i8"){o.endsWith("*")&&(o=r);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i(),l=Array.isArray(n)?[]:void 0;let c;do{switch(l&&(n=arguments[0].shift()),o){case"i1":case"i8":c=a.HEAP8[0|n];break;case"i16":c=a.HEAP16[n>>1];break;case"i32":c=a.HEAP32[n>>2];break;case"float":case"f32":c=a.HEAP32F[n>>2];break;case"double":case"f64":c=Number(a.HEAP64F[n>>3]);break;case"i64":if(e.bigIntEnabled){c=BigInt(a.HEAP64[n>>3]);break}default:t("Invalid type for peek():",o)}l&&l.push(c)}while(l&&arguments[0].length);return l||c},e.poke=function(e,n,o="i8"){o.endsWith("*")&&(o=r);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();for(const r of Array.isArray(e)?e:[e])switch(o){case"i1":case"i8":a.HEAP8[0|r]=n;continue;case"i16":a.HEAP16[r>>1]=n;continue;case"i32":a.HEAP32[r>>2]=n;continue;case"float":case"f32":a.HEAP32F[r>>2]=n;continue;case"double":case"f64":a.HEAP64F[r>>3]=n;continue;case"i64":if(a.HEAP64){a.HEAP64[r>>3]=BigInt(n);continue}default:t("Invalid type for poke(): "+o)}return this},e.peekPtr=(...t)=>e.peek(1===t.length?t[0]:t,r),e.pokePtr=(t,n=0)=>e.poke(t,n,r),e.peek8=(...t)=>e.peek(1===t.length?t[0]:t,"i8"),e.poke8=(t,r)=>e.poke(t,r,"i8"),e.peek16=(...t)=>e.peek(1===t.length?t[0]:t,"i16"),e.poke16=(t,r)=>e.poke(t,r,"i16"),e.peek32=(...t)=>e.peek(1===t.length?t[0]:t,"i32"),e.poke32=(t,r)=>e.poke(t,r,"i32"),e.peek64=(...t)=>e.peek(1===t.length?t[0]:t,"i64"),e.poke64=(t,r)=>e.poke(t,r,"i64"),e.peek32f=(...t)=>e.peek(1===t.length?t[0]:t,"f32"),e.poke32f=(t,r)=>e.poke(t,r,"f32"),e.peek64f=(...t)=>e.peek(1===t.length?t[0]:t,"f64"),e.poke64f=(t,r)=>e.poke(t,r,"f64"),e.getMemValue=e.peek,e.getPtrValue=e.peekPtr,e.setMemValue=e.poke,e.setPtrValue=e.pokePtr,e.isPtr32=e=>"number"==typeof e&&e===(0|e)&&e>=0,e.isPtr=e.isPtr32,e.cstrlen=function(t){if(!t||!e.isPtr(t))return null;const r=i().HEAP8U;let n=t;for(;0!==r[n];++n);return n-t};const a="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer;e.cstrToJs=function(t){const r=e.cstrlen(t);return r?(n=i().HEAP8U,o=t,l=t+r,s.utf8Decoder.decode(n.buffer instanceof a?n.slice(o,l):n.subarray(o,l))):null===r?r:"";var n,o,l},e.jstrlen=function(e){if("string"!=typeof e)return null;const t=e.length;let r=0;for(let n=0;n=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++n)),t<=127?++r:r+=t<=2047?2:t<=65535?3:4}return r},e.jstrcpy=function(e,r,n=0,s=-1,i=!0){if(r&&(r instanceof Int8Array||r instanceof Uint8Array)||t("jstrcpy() target must be an Int8Array or Uint8Array."),s<0&&(s=r.length-n),!(s>0&&n>=0))return 0;let o=0,a=e.length;const l=n,c=n+s-(i?1:0);for(;o=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++o)),t<=127){if(n>=c)break;r[n++]=t}else if(t<=2047){if(n+1>=c)break;r[n++]=192|t>>6,r[n++]=128|63&t}else if(t<=65535){if(n+2>=c)break;r[n++]=224|t>>12,r[n++]=128|t>>6&63,r[n++]=128|63&t}else{if(n+3>=c)break;r[n++]=240|t>>18,r[n++]=128|t>>12&63,r[n++]=128|t>>6&63,r[n++]=128|63&t}}return i&&(r[n++]=0),n-l},e.cstrncpy=function(r,n,s){if(r&&n||t("cstrncpy() does not accept NULL strings."),s<0)s=e.cstrlen(strPtr)+1;else if(!(s>0))return 0;const i=e.heap8u();let o,a=0;for(;as.utf8Encoder.encode(t?e+"\0":e);const l=(e,r)=>{e.alloc instanceof Function&&e.dealloc instanceof Function||t("Object is missing alloc() and/or dealloc() function(s)","required by",r+"().")},c=function(t,r,n,o){if(l(e,o),"string"!=typeof t)return null;{const e=s.utf8Encoder.encode(t),o=n(e.length+1),a=i().HEAP8U;return a.set(e,o),a[o+e.length]=0,r?[o,e.length]:o}};e.allocCString=(t,r=!1)=>c(t,r,e.alloc,"allocCString()"),e.scopedAllocPush=function(){l(e,"scopedAllocPush");const t=[];return s.scopedAlloc.push(t),t},e.scopedAllocPop=function(r){l(e,"scopedAllocPop");const n=arguments.length?s.scopedAlloc.indexOf(r):s.scopedAlloc.length-1;n<0&&t("Invalid state object for scopedAllocPop()."),0===arguments.length&&(r=s.scopedAlloc[n]),s.scopedAlloc.splice(n,1);for(let t;t=r.pop();)e.functionEntry(t)?e.uninstallFunction(t):e.dealloc(t)},e.scopedAlloc=function(r){s.scopedAlloc.length||t("No scopedAllocPush() scope is active.");const n=e.alloc(r);return s.scopedAlloc[s.scopedAlloc.length-1].push(n),n},Object.defineProperty(e.scopedAlloc,"level",{configurable:!1,enumerable:!1,get:()=>s.scopedAlloc.length,set:()=>t("The 'active' property is read-only.")}),e.scopedAllocCString=(t,r=!1)=>c(t,r,e.scopedAlloc,"scopedAllocCString()");const _=function(t,r){const n=e[t?"scopedAlloc":"alloc"]((r.length+1)*e.ptrSizeof);let s=0;return r.forEach((r=>{e.pokePtr(n+e.ptrSizeof*s++,e[t?"scopedAllocCString":"allocCString"](""+r))})),e.pokePtr(n+e.ptrSizeof*s,0),n};e.scopedAllocMainArgv=e=>_(!0,e),e.allocMainArgv=e=>_(!1,e),e.cArgvToJs=(t,r)=>{const n=[];for(let s=0;su(e,t,"alloc"),e.scopedAllocPtr=(e=1,t=!0)=>u(e,t,"scopedAlloc"),e.xGet=function(r){return e.exports[r]||t("Cannot find exported symbol:",r)};const d=(e,r)=>t(e+"() requires",r,"argument(s).");e.xCall=function(r,...n){const s=e.xGet(r);return s instanceof Function||t("Exported symbol",r,"is not a function."),s.length!==n.length&&d(r,s.length),2===arguments.length&&Array.isArray(arguments[1])?s.apply(null,arguments[1]):s.apply(null,n)},s.xWrap=Object.create(null),s.xWrap.convert=Object.create(null),s.xWrap.convert.arg=new Map,s.xWrap.convert.result=new Map;const f=s.xWrap.convert.arg,p=s.xWrap.convert.result;e.bigIntEnabled&&f.set("i64",(e=>BigInt(e)));const m="i32"===r?e=>0|e:e=>BigInt(e)|BigInt(0);f.set("i32",m).set("i16",(e=>65535&e)).set("i8",(e=>255&e)).set("f32",(e=>Number(e).valueOf())).set("float",f.get("f32")).set("f64",f.get("f32")).set("double",f.get("f64")).set("int",f.get("i32")).set("null",(e=>e)).set(null,f.get("null")).set("**",m).set("*",m),p.set("*",m).set("pointer",m).set("number",(e=>Number(e))).set("void",(e=>{})).set("null",(e=>e)).set(null,p.get("null"));{const n=["i8","i16","i32","int","f32","float","f64","double"];e.bigIntEnabled&&n.push("i64");const s=f.get(r);for(const e of n)f.set(e+"*",s),p.set(e+"*",s),p.set(e,f.get(e)||t("Missing arg converter:",e))}const h=function(t){return"string"==typeof t?e.scopedAllocCString(t):t?m(t):null};f.set("string",h).set("utf8",h).set("pointer",h),p.set("string",(t=>e.cstrToJs(t))).set("utf8",p.get("string")).set("string:dealloc",(t=>{try{return t?e.cstrToJs(t):null}finally{e.dealloc(t)}})).set("utf8:dealloc",p.get("string:dealloc")).set("json",(t=>JSON.parse(e.cstrToJs(t)))).set("json:dealloc",(t=>{try{return t?JSON.parse(e.cstrToJs(t)):null}finally{e.dealloc(t)}}));const g=class{constructor(e){this.name=e.name||"unnamed adapter"}convertArg(e,r,n){t("AbstractArgAdapter must be subclassed.")}};f.FuncPtrAdapter=class r extends g{constructor(e){super(e),f.FuncPtrAdapter.warnOnUse&&console.warn("xArg.FuncPtrAdapter is an internal-only API","and is not intended to be invoked from","client-level code. Invoked with:",e),this.name=e.name||"unnamed",this.signature=e.signature,e.contextKey instanceof Function&&(this.contextKey=e.contextKey,e.bindScope||(e.bindScope="context")),this.bindScope=e.bindScope||t("FuncPtrAdapter options requires a bindScope (explicit or implied)."),r.bindScopes.indexOf(e.bindScope)<0&&t("Invalid options.bindScope ("+e.bindMod+") for FuncPtrAdapter. Expecting one of: ("+r.bindScopes.join(", ")+")"),this.isTransient="transient"===this.bindScope,this.isContext="context"===this.bindScope,this.isPermanent="permanent"===this.bindScope,this.singleton="singleton"===this.bindScope?[]:void 0,this.callProxy=e.callProxy instanceof Function?e.callProxy:void 0}contextKey(e,t){return this}contextMap(e){const t=this.__cmap||(this.__cmap=new Map);let r=t.get(e);return void 0===r&&t.set(e,r=[]),r}convertArg(t,n,i){let a=this.singleton;if(!a&&this.isContext&&(a=this.contextMap(this.contextKey(n,i))),a&&a[0]===t)return a[1];if(t instanceof Function){this.callProxy&&(t=this.callProxy(t));const e=o(t,this.signature,this.isTransient);if(r.debugFuncInstall&&r.debugOut("FuncPtrAdapter installed",this,this.contextKey(n,i),"@"+e,t),a){if(a[1]){r.debugFuncInstall&&r.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(n,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}}a[0]=t,a[1]=e}return e}if(e.isPtr(t)||null==t){if(a&&a[1]&&a[1]!==t){r.debugFuncInstall&&r.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(n,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}a[0]=a[1]=0|t}return t||0}throw new TypeError("Invalid FuncPtrAdapter argument type. Expecting a function pointer or a "+(this.name?this.name+" ":"")+"function matching signature "+this.signature+".")}},f.FuncPtrAdapter.warnOnUse=!1,f.FuncPtrAdapter.debugFuncInstall=!1,f.FuncPtrAdapter.debugOut=console.debug.bind(console),f.FuncPtrAdapter.bindScopes=["transient","context","singleton","permanent"];const b=e=>f.get(e)||t("Argument adapter not found:",e),y=e=>p.get(e)||t("Result adapter not found:",e);s.xWrap.convertArg=(e,...t)=>b(e)(...t),s.xWrap.convertArgNoCheck=(e,...t)=>f.get(e)(...t),s.xWrap.convertResult=(e,t)=>null===e?t:e?y(e)(t):void 0,s.xWrap.convertResultNoCheck=(e,t)=>null===e?t:e?p.get(e)(t):void 0,e.xWrap=function(r,n,...i){3===arguments.length&&Array.isArray(arguments[2])&&(i=arguments[2]),e.isPtr(r)&&(r=e.functionEntry(r)||t("Function pointer not found in WASM function table."));const o=r instanceof Function,a=o?r:e.xGet(r);if(o&&(r=a.name||"unnamed function"),i.length!==a.length&&d(r,a.length),null===n&&0===a.length)return a;null!=n&&y(n);for(const e of i)e instanceof g?f.set(e,((...t)=>e.convertArg(...t))):b(e);const l=s.xWrap;return 0===a.length?(...e)=>e.length?d(r,a.length):l.convertResult(n,a.call(null)):function(...t){t.length!==a.length&&d(r,a.length);const s=e.scopedAllocPush();try{for(const e in t)t[e]=l.convertArgNoCheck(i[e],t[e],t,e);return l.convertResultNoCheck(n,a.apply(null,t))}finally{e.scopedAllocPop(s)}}};const q=function(e,r,n,s,i,o){if("string"==typeof n){if(1===r)return o.get(n);if(2===r)return s?(s instanceof Function||t(i,"requires a function argument."),o.set(n,s),e):(o.get(n),e)}t("Invalid arguments to",i)};return e.xWrap.resultAdapter=function e(t,r){return q(e,arguments.length,t,r,"resultAdapter()",p)},e.xWrap.argAdapter=function e(t,r){return q(e,arguments.length,t,r,"argAdapter()",f)},e.xWrap.FuncPtrAdapter=f.FuncPtrAdapter,e.xCallWrapped=function(t,r,n,...s){return Array.isArray(arguments[3])&&(s=arguments[3]),e.xWrap(t,r,n||[]).apply(null,s||[])},e.xWrap.testConvertArg=s.xWrap.convertArg,e.xWrap.testConvertResult=s.xWrap.convertResult,e},globalThis.WhWasmUtilInstaller.yawl=function(e){const t=()=>fetch(e.uri,{credentials:"same-origin"}),r=this,n=function(t){if(e.wasmUtilTarget){const n=(...e)=>{throw new Error(e.join(" "))},s=e.wasmUtilTarget;if(s.module=t.module,s.instance=t.instance,s.instance.exports.memory||(s.memory=e.imports&&e.imports.env&&e.imports.env.memory||n("Missing 'memory' object!")),!s.alloc&&t.instance.exports.malloc){const e=t.instance.exports;s.alloc=function(t){return e.malloc(t)||n("Allocation of",t,"bytes failed.")},s.dealloc=function(t){e.free(t)}}r(s)}return e.onload&&e.onload(t,e),t};return WebAssembly.instantiateStreaming?function(){return WebAssembly.instantiateStreaming(t(),e.imports||{}).then(n)}:function(){return t().then((e=>e.arrayBuffer())).then((t=>WebAssembly.instantiate(t,e.imports||{}))).then(n)}}.bind(globalThis.WhWasmUtilInstaller),globalThis.Jaccwabyt=function e(t){const r=(...e)=>{throw new Error(e.join(" "))};t.heap instanceof WebAssembly.Memory||t.heap instanceof Function||r("config.heap must be WebAssembly.Memory instance or a function."),["alloc","dealloc"].forEach((function(e){t[e]instanceof Function||r("Config option '"+e+"' must be a function.")}));const n=e,s=t.heap instanceof Function?t.heap:()=>new Uint8Array(t.heap.buffer),i=t.alloc,o=t.dealloc,a=t.log||console.log.bind(console),l=t.memberPrefix||"",c=t.memberSuffix||"",_=void 0===t.bigIntEnabled?!!globalThis.BigInt64Array:!!t.bigIntEnabled,u=globalThis.BigInt,d=globalThis.BigInt64Array,f=t.ptrSizeof||4,p=t.ptrIR||"i32";n.debugFlags||(n.__makeDebugFlags=function(e=null){e&&e.__flags&&(e=e.__flags);const t=function e(t){return 0===arguments.length?e.__flags:(t<0?(delete e.__flags.getter,delete e.__flags.setter,delete e.__flags.alloc,delete e.__flags.dealloc):(e.__flags.getter=!!(1&t),e.__flags.setter=!!(2&t),e.__flags.alloc=!!(4&t),e.__flags.dealloc=!!(8&t)),e._flags)};return Object.defineProperty(t,"__flags",{iterable:!1,writable:!1,value:Object.create(e)}),e||t(0),t},n.debugFlags=n.__makeDebugFlags());const m=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),h=e=>(e=>"("===e[1])(e)?"p":e[0],g=function(e){switch(h(e)){case"c":case"C":return"i8";case"i":return"i32";case"p":case"P":case"s":return p;case"j":return"i64";case"f":return"float";case"d":return"double"}r("Unhandled signature IR:",e)},b=d?()=>!0:()=>r("BigInt64Array is not available."),y=(e,t)=>e+"::"+t,q=new WeakMap,v="(pointer-is-external)",w=function(e,t,r){if(r||(r=q.get(t)),r){if(q.delete(t),Array.isArray(t.ondispose)){let n;for(;n=t.ondispose.shift();)try{n instanceof Function?n.call(t):n instanceof D?n.dispose():"number"==typeof n&&o(n)}catch(t){console.warn("ondispose() for",e.structName,"@",r,"threw. NOT propagating it.",t)}}else if(t.ondispose instanceof Function)try{t.ondispose()}catch(t){console.warn("ondispose() for",e.structName,"@",r,"threw. NOT propagating it.",t)}delete t.ondispose,e.debugFlags.__flags.dealloc&&a("debug.dealloc:",t[v]?"EXTERNAL":"",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+r),t[v]||o(r)}},E=e=>({configurable:!1,writable:!1,iterable:!1,value:e}),S=function(e,t,n){let o=!n;n?Object.defineProperty(t,v,E(n)):(n=i(e.structInfo.sizeof))||r("Allocation of",e.structName,"structure failed.");try{e.debugFlags.__flags.alloc&&a("debug.alloc:",o?"":"EXTERNAL",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+n),o&&s().fill(0,n,n+e.structInfo.sizeof),q.set(t,n)}catch(r){throw w(e,t,n),r}},A=E((e=>l+e+c)),x=function(e,t,n=!0){let s=e.members[t];if(!s&&(l||c)){for(const r of Object.values(e.members))if(r.key===t){s=r;break}!s&&n&&r(y(e.name,t),"is not a mapped struct member.")}return s},T=function e(t,r,n=!1){e._||(e._=e=>e.replace(/[^vipPsjrdcC]/g,"").replace(/[pPscC]/g,"i"));const s=x(t.structInfo,r,!0);return n?e._(s.signature):s.signature},I={configurable:!1,enumerable:!1,get:function(){return q.get(this)},set:()=>r("Cannot assign the 'pointer' property of a struct.")},k=E((function(){const e=[];for(const t of Object.keys(this.structInfo.members))e.push(this.memberKey(t));return e})),F=new TextDecoder("utf-8"),O=new TextEncoder,P="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,L=function(e){"s"!==e.signature&&r("Invalid member type signature for C-string value:",JSON.stringify(e))},C=function(e,...t){e.ondispose?Array.isArray(e.ondispose)||(e.ondispose=[e.ondispose]):e.ondispose=[],e.ondispose.push(...t)},N=function(e){const t=O.encode(e),n=i(t.length+1);n||r("Allocation error while duplicating string:",e);const o=s();return o.set(t,n),o[n+t.length]=0,n},D=function(e,t){arguments[2]!==E&&r("Do not call the StructType constructor","from client-level code."),Object.defineProperties(this,{structName:E(e),structInfo:E(t)})};D.prototype=Object.create(null,{dispose:E((function(){w(this.constructor,this)})),lookupMember:E((function(e,t=!0){return x(this.structInfo,e,t)})),memberToJsString:E((function(e){return function(e,t){const r=x(e.structInfo,t,!0);L(r);const n=e[r.key];if(!n)return null;let i=n;const o=s();for(;0!==o[i];++i);return n===i?"":(a=o,l=n,c=i,F.decode(a.buffer instanceof P?a.slice(l,c):a.subarray(l,c)));var a,l,c}(this,e)})),memberIsString:E((function(e,t=!0){return function(e,t,r=!1){const n=x(e.structInfo,t,r);return!(!n||1!==n.signature.length||"s"!==n.signature[0])&&n}(this,e,t)})),memberKey:A,memberKeys:k,memberSignature:E((function(e,t=!1){return T(this,e,t)})),memoryDump:E((function(){const e=this.pointer;return e?new Uint8Array(s().slice(e,e+this.structInfo.sizeof)):null})),pointer:I,setMemberCString:E((function(e,t){return function(e,t,r){const n=x(e.structInfo,t,!0);L(n);const s=N(r);return e[n.key]=s,C(e,s),e}(this,e,t)}))}),Object.assign(D.prototype,{addOnDispose:function(...e){return C(this,...e),this}}),Object.defineProperties(D,{allocCString:E(N),isA:E((e=>e instanceof D)),hasExternalPointer:E((e=>e instanceof D&&!!e[v])),memberKey:A});const R=e=>Number.isFinite(e)||e instanceof(u||Number),M=function e(t,n,i){if(!e._){e._={getters:{},setters:{},sw:{}};const t=["i","c","C","p","P","s","f","d","v()"];_&&t.push("j"),t.forEach((function(t){e._.getters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"getInt32";case 8:return b()&&"getBigInt64"}break;case"i":return"getInt32";case"c":return"getInt8";case"C":return"getUint8";case"j":return b()&&"getBigInt64";case"f":return"getFloat32";case"d":return"getFloat64"}r("Unhandled DataView getter for signature:",e)}(t),e._.setters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"setInt32";case 8:return b()&&"setBigInt64"}break;case"i":return"setInt32";case"c":return"setInt8";case"C":return"setUint8";case"j":return b()&&"setBigInt64";case"f":return"setFloat32";case"d":return"setFloat64"}r("Unhandled DataView setter for signature:",e)}(t),e._.sw[t]=function(e){switch(h(e)){case"i":case"f":case"c":case"C":case"d":return Number;case"j":return b()&&u;case"p":case"P":case"s":switch(f){case 4:return Number;case 8:return b()&&u}}r("Unhandled DataView set wrapper for signature:",e)}(t)}));const n=/^[ipPsjfdcC]$/,s=/^[vipPsjfdcC]\([ipPsjfdcC]*\)$/;e.sigCheck=function(e,t,i,o){Object.prototype.hasOwnProperty.call(e,i)&&r(e.structName,"already has a property named",i+"."),n.test(o)||s.test(o)||r("Malformed signature for",y(e.structName,t)+":",o)}}const o=t.memberKey(n);e.sigCheck(t.prototype,n,o,i.signature),i.key=o,i.name=n;const l=h(i.signature),c=y(t.prototype.structName,o),d=t.prototype.debugFlags.__flags,p=Object.create(null);var q,v;p.configurable=!1,p.enumerable=!1,p.get=function(){d.getter&&a("debug.getter:",e._.getters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof);let t=new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.getters[l]](0,m);return d.getter&&a("debug.getter:",c,"result =",t),t},i.readOnly?p.set=(q=t.prototype.structName,v=o,()=>r(y(q,v),"is read-only.")):p.set=function(t){if(d.setter&&a("debug.setter:",e._.setters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof,t),this.pointer||r("Cannot set struct property on disposed instance."),null===t)t=0;else for(;!R(t);){if("P"===i.signature&&t instanceof D){t=t.pointer||0,d.setter&&a("debug.setter:",c,"resolved to",t);break}r("Invalid value for pointer-type",c+".")}new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.setters[l]](0,e._.sw[l](t),m)},Object.defineProperty(t.prototype,o,p)},j=function e(t,s){1===arguments.length?t=(s=t).name:s.name||(s.name=t),t||r("Struct name is required.");let i=!1;Object.keys(s.members).forEach((e=>{const n=s.members[e];n.sizeof?1===n.sizeof?"c"===n.signature||"C"===n.signature||r("Unexpected sizeof==1 member",y(s.name,e),"with signature",n.signature):(0!=n.sizeof%4&&(console.warn("Invalid struct member description =",n,"from",s),r(t,"member",e,"sizeof is not aligned. sizeof="+n.sizeof)),0!=n.offset%4&&(console.warn("Invalid struct member description =",n,"from",s),r(t,"member",e,"offset is not aligned. offset="+n.offset))):r(t,"member",e,"is missing sizeof."),(!i||i.offsete instanceof a)),memberKey:A,memberKeys:k,methodInfoForKey:E((function(e){})),structInfo:E(s),structName:E(t)}),a.prototype=new D(t,s,E),Object.defineProperties(a.prototype,{debugFlags:o,constructor:E(a)}),Object.keys(s.members).forEach((e=>M(a,e,s.members[e]))),a};return j.StructType=D,j.config=t,j.allocCString=N,j.debugFlags||(j.debugFlags=n.__makeDebugFlags(n.debugFlags)),j},globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...e)=>{throw new Error(e.join(" "))},r=(e.SQLite3Error.toss,e.capi),n=e.wasm,s=e.util;if(globalThis.WhWasmUtilInstaller(n),delete globalThis.WhWasmUtilInstaller,n.bindingSignatures=[["sqlite3_aggregate_context","void*","sqlite3_context*","int"],["sqlite3_bind_double","int","sqlite3_stmt*","int","f64"],["sqlite3_bind_int","int","sqlite3_stmt*","int","int"],["sqlite3_bind_null",void 0,"sqlite3_stmt*","int"],["sqlite3_bind_parameter_count","int","sqlite3_stmt*"],["sqlite3_bind_parameter_index","int","sqlite3_stmt*","string"],["sqlite3_bind_pointer","int","sqlite3_stmt*","int","*","string:static","*"],["sqlite3_busy_handler","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({signature:"i(pi)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_busy_timeout","int","sqlite3*","int"],["sqlite3_changes","int","sqlite3*"],["sqlite3_clear_bindings","int","sqlite3_stmt*"],["sqlite3_collation_needed","int","sqlite3*","*","*"],["sqlite3_column_blob","*","sqlite3_stmt*","int"],["sqlite3_column_bytes","int","sqlite3_stmt*","int"],["sqlite3_column_count","int","sqlite3_stmt*"],["sqlite3_column_double","f64","sqlite3_stmt*","int"],["sqlite3_column_int","int","sqlite3_stmt*","int"],["sqlite3_column_name","string","sqlite3_stmt*","int"],["sqlite3_column_text","string","sqlite3_stmt*","int"],["sqlite3_column_type","int","sqlite3_stmt*","int"],["sqlite3_column_value","sqlite3_value*","sqlite3_stmt*","int"],["sqlite3_commit_hook","void*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_commit_hook",signature:"i(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_compileoption_get","string","int"],["sqlite3_compileoption_used","int","string"],["sqlite3_complete","int","string:flexible"],["sqlite3_context_db_handle","sqlite3*","sqlite3_context*"],["sqlite3_data_count","int","sqlite3_stmt*"],["sqlite3_db_filename","string","sqlite3*","string"],["sqlite3_db_handle","sqlite3*","sqlite3_stmt*"],["sqlite3_db_name","string","sqlite3*","int"],["sqlite3_db_status","int","sqlite3*","int","*","*","int"],["sqlite3_errcode","int","sqlite3*"],["sqlite3_errmsg","string","sqlite3*"],["sqlite3_error_offset","int","sqlite3*"],["sqlite3_errstr","string","int"],["sqlite3_exec","int",["sqlite3*","string:flexible",new n.xWrap.FuncPtrAdapter({signature:"i(pipp)",bindScope:"transient",callProxy:e=>{let t;return(s,i,o,a)=>{try{const r=n.cArgvToJs(i,o);return t||(t=n.cArgvToJs(i,a)),0|e(r,t)}catch(e){return e.resultCode||r.SQLITE_ERROR}}}}),"*","**"]],["sqlite3_expanded_sql","string","sqlite3_stmt*"],["sqlite3_extended_errcode","int","sqlite3*"],["sqlite3_extended_result_codes","int","sqlite3*","int"],["sqlite3_file_control","int","sqlite3*","string","int","*"],["sqlite3_finalize","int","sqlite3_stmt*"],["sqlite3_free",void 0,"*"],["sqlite3_get_auxdata","*","sqlite3_context*","int"],["sqlite3_initialize",void 0],["sqlite3_keyword_count","int"],["sqlite3_keyword_name","int",["int","**","*"]],["sqlite3_keyword_check","int",["string","int"]],["sqlite3_libversion","string"],["sqlite3_libversion_number","int"],["sqlite3_limit","int",["sqlite3*","int","int"]],["sqlite3_malloc","*","int"],["sqlite3_open","int","string","*"],["sqlite3_open_v2","int","string","*","int","string"],["sqlite3_progress_handler",void 0,["sqlite3*","int",new n.xWrap.FuncPtrAdapter({name:"xProgressHandler",signature:"i(p)",bindScope:"context",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_realloc","*","*","int"],["sqlite3_reset","int","sqlite3_stmt*"],["sqlite3_result_blob",void 0,"sqlite3_context*","*","int","*"],["sqlite3_result_double",void 0,"sqlite3_context*","f64"],["sqlite3_result_error",void 0,"sqlite3_context*","string","int"],["sqlite3_result_error_code",void 0,"sqlite3_context*","int"],["sqlite3_result_error_nomem",void 0,"sqlite3_context*"],["sqlite3_result_error_toobig",void 0,"sqlite3_context*"],["sqlite3_result_int",void 0,"sqlite3_context*","int"],["sqlite3_result_null",void 0,"sqlite3_context*"],["sqlite3_result_pointer",void 0,"sqlite3_context*","*","string:static","*"],["sqlite3_result_subtype",void 0,"sqlite3_value*","int"],["sqlite3_result_text",void 0,"sqlite3_context*","string","int","*"],["sqlite3_result_zeroblob",void 0,"sqlite3_context*","int"],["sqlite3_rollback_hook","void*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_rollback_hook",signature:"v(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_set_authorizer","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_set_authorizer::xAuth",signature:"i(pissss)",contextKey:(e,t)=>e[0],callProxy:e=>(t,s,i,o,a,l)=>{try{return i=i&&n.cstrToJs(i),o=o&&n.cstrToJs(o),a=a&&n.cstrToJs(a),l=l&&n.cstrToJs(l),e(t,s,i,o,a,l)||0}catch(e){return e.resultCode||r.SQLITE_ERROR}}}),"*"]],["sqlite3_set_auxdata",void 0,["sqlite3_context*","int","*",new n.xWrap.FuncPtrAdapter({name:"xDestroyAuxData",signature:"v(*)",contextKey:(e,t)=>e[0]})]],["sqlite3_shutdown",void 0],["sqlite3_sourceid","string"],["sqlite3_sql","string","sqlite3_stmt*"],["sqlite3_status","int","int","*","*","int"],["sqlite3_step","int","sqlite3_stmt*"],["sqlite3_stmt_isexplain","int",["sqlite3_stmt*"]],["sqlite3_stmt_readonly","int",["sqlite3_stmt*"]],["sqlite3_stmt_status","int","sqlite3_stmt*","int","int"],["sqlite3_strglob","int","string","string"],["sqlite3_stricmp","int","string","string"],["sqlite3_strlike","int","string","string","int"],["sqlite3_strnicmp","int","string","string","int"],["sqlite3_table_column_metadata","int","sqlite3*","string","string","string","**","**","*","*","*"],["sqlite3_total_changes","int","sqlite3*"],["sqlite3_trace_v2","int",["sqlite3*","int",new n.xWrap.FuncPtrAdapter({name:"sqlite3_trace_v2::callback",signature:"i(ippp)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_txn_state","int",["sqlite3*","string"]],["sqlite3_uri_boolean","int","sqlite3_filename","string","int"],["sqlite3_uri_key","string","sqlite3_filename","int"],["sqlite3_uri_parameter","string","sqlite3_filename","string"],["sqlite3_user_data","void*","sqlite3_context*"],["sqlite3_value_blob","*","sqlite3_value*"],["sqlite3_value_bytes","int","sqlite3_value*"],["sqlite3_value_double","f64","sqlite3_value*"],["sqlite3_value_dup","sqlite3_value*","sqlite3_value*"],["sqlite3_value_free",void 0,"sqlite3_value*"],["sqlite3_value_frombind","int","sqlite3_value*"],["sqlite3_value_int","int","sqlite3_value*"],["sqlite3_value_nochange","int","sqlite3_value*"],["sqlite3_value_numeric_type","int","sqlite3_value*"],["sqlite3_value_pointer","*","sqlite3_value*","string:static"],["sqlite3_value_subtype","int","sqlite3_value*"],["sqlite3_value_text","string","sqlite3_value*"],["sqlite3_value_type","int","sqlite3_value*"],["sqlite3_vfs_find","*","string"],["sqlite3_vfs_register","int","sqlite3_vfs*","int"],["sqlite3_vfs_unregister","int","sqlite3_vfs*"]],n.exports.sqlite3_activate_see instanceof Function&&n.bindingSignatures.push(["sqlite3_key","int","sqlite3*","string","int"],["sqlite3_key_v2","int","sqlite3*","string","*","int"],["sqlite3_rekey","int","sqlite3*","string","int"],["sqlite3_rekey_v2","int","sqlite3*","string","*","int"],["sqlite3_activate_see",void 0,"string"]),n.bindingSignatures.int64=[["sqlite3_bind_int64","int",["sqlite3_stmt*","int","i64"]],["sqlite3_changes64","i64",["sqlite3*"]],["sqlite3_column_int64","i64",["sqlite3_stmt*","int"]],["sqlite3_create_module","int",["sqlite3*","string","sqlite3_module*","*"]],["sqlite3_create_module_v2","int",["sqlite3*","string","sqlite3_module*","*","*"]],["sqlite3_declare_vtab","int",["sqlite3*","string:flexible"]],["sqlite3_deserialize","int","sqlite3*","string","*","i64","i64","int"],["sqlite3_drop_modules","int",["sqlite3*","**"]],["sqlite3_last_insert_rowid","i64",["sqlite3*"]],["sqlite3_malloc64","*","i64"],["sqlite3_msize","i64","*"],["sqlite3_overload_function","int",["sqlite3*","string","int"]],["sqlite3_preupdate_blobwrite","int","sqlite3*"],["sqlite3_preupdate_count","int","sqlite3*"],["sqlite3_preupdate_depth","int","sqlite3*"],["sqlite3_preupdate_hook","*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_preupdate_hook",signature:"v(ppippjj)",contextKey:e=>e[0],callProxy:e=>(t,r,s,i,o,a,l)=>{e(t,r,s,n.cstrToJs(i),n.cstrToJs(o),a,l)}}),"*"]],["sqlite3_preupdate_new","int",["sqlite3*","int","**"]],["sqlite3_preupdate_old","int",["sqlite3*","int","**"]],["sqlite3_realloc64","*","*","i64"],["sqlite3_result_int64",void 0,"*","i64"],["sqlite3_result_zeroblob64","int","*","i64"],["sqlite3_serialize","*","sqlite3*","string","*","int"],["sqlite3_set_last_insert_rowid",void 0,["sqlite3*","i64"]],["sqlite3_status64","int","int","*","*","int"],["sqlite3_total_changes64","i64",["sqlite3*"]],["sqlite3_update_hook","*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_update_hook",signature:"v(iippj)",contextKey:e=>e[0],callProxy:e=>(t,r,s,i,o)=>{e(t,r,n.cstrToJs(s),n.cstrToJs(i),o)}}),"*"]],["sqlite3_uri_int64","i64",["sqlite3_filename","string","i64"]],["sqlite3_value_int64","i64","sqlite3_value*"],["sqlite3_vtab_collation","string","sqlite3_index_info*","int"],["sqlite3_vtab_distinct","int","sqlite3_index_info*"],["sqlite3_vtab_in","int","sqlite3_index_info*","int","int"],["sqlite3_vtab_in_first","int","sqlite3_value*","**"],["sqlite3_vtab_in_next","int","sqlite3_value*","**"],["sqlite3_vtab_nochange","int","sqlite3_context*"],["sqlite3_vtab_on_conflict","int","sqlite3*"],["sqlite3_vtab_rhs_value","int","sqlite3_index_info*","int","**"]],n.bigIntEnabled&&n.exports.sqlite3changegroup_add){const e={signature:"i(ps)",callProxy:e=>(t,s)=>{try{return 0|e(t,n.cstrToJs(s))}catch(e){return e.resultCode||r.SQLITE_ERROR}}};n.bindingSignatures.int64.push(["sqlite3changegroup_add","int",["sqlite3_changegroup*","int","void*"]],["sqlite3changegroup_add_strm","int",["sqlite3_changegroup*",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changegroup_delete",void 0,["sqlite3_changegroup*"]],["sqlite3changegroup_new","int",["**"]],["sqlite3changegroup_output","int",["sqlite3_changegroup*","int*","**"]],["sqlite3changegroup_output_strm","int",["sqlite3_changegroup*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply","int",["sqlite3*","int","void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_strm","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_v2","int",["sqlite3*","int","void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_apply_v2_strm","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_concat","int",["int","void*","int","void*","int*","**"]],["sqlite3changeset_concat_strm","int",[new n.xWrap.FuncPtrAdapter({name:"xInputA",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xInputB",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_conflict","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_finalize","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_fk_conflicts","int",["sqlite3_changeset_iter*","int*"]],["sqlite3changeset_invert","int",["int","void*","int*","**"]],["sqlite3changeset_invert_strm","int",[new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_new","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_next","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_old","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_op","int",["sqlite3_changeset_iter*","**","int*","int*","int*"]],["sqlite3changeset_pk","int",["sqlite3_changeset_iter*","**","int*"]],["sqlite3changeset_start","int",["**","int","*"]],["sqlite3changeset_start_strm","int",["**",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changeset_start_v2","int",["**","int","*","int"]],["sqlite3changeset_start_v2_strm","int",["**",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*","int"]],["sqlite3session_attach","int",["sqlite3_session*","string"]],["sqlite3session_changeset","int",["sqlite3_session*","int*","**"]],["sqlite3session_changeset_size","i64",["sqlite3_session*"]],["sqlite3session_changeset_strm","int",["sqlite3_session*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_config","int",["int","void*"]],["sqlite3session_create","int",["sqlite3*","string","**"]],["sqlite3session_diff","int",["sqlite3_session*","string","string","**"]],["sqlite3session_enable","int",["sqlite3_session*","int"]],["sqlite3session_indirect","int",["sqlite3_session*","int"]],["sqlite3session_isempty","int",["sqlite3_session*"]],["sqlite3session_memory_used","i64",["sqlite3_session*"]],["sqlite3session_object_config","int",["sqlite3_session*","int","void*"]],["sqlite3session_patchset","int",["sqlite3_session*","*","**"]],["sqlite3session_patchset_strm","int",["sqlite3_session*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_table_filter",void 0,["sqlite3_session*",new n.xWrap.FuncPtrAdapter({name:"xFilter",...e,contextKey:(e,t)=>e[0]}),"*"]])}n.bindingSignatures.wasm=[["sqlite3_wasm_db_reset","int","sqlite3*"],["sqlite3_wasm_db_vfs","sqlite3_vfs*","sqlite3*","string"],["sqlite3_wasm_vfs_create_file","int","sqlite3_vfs*","string","*","int"],["sqlite3_wasm_posix_create_file","int","string","*","int"],["sqlite3_wasm_vfs_unlink","int","sqlite3_vfs*","string"]],e.StructBinder=globalThis.Jaccwabyt({heap:n.heap8u,alloc:n.alloc,dealloc:n.dealloc,bigIntEnabled:n.bigIntEnabled,memberPrefix:"$"}),delete globalThis.Jaccwabyt;{const i=n.xWrap.argAdapter("string");n.xWrap.argAdapter("string:flexible",(e=>i(s.flexibleString(e)))),n.xWrap.argAdapter("string:static",function(e){return n.isPtr(e)?e:this[e=""+e]||(this[e]=n.allocCString(e))}.bind(Object.create(null)));const o=n.xWrap.argAdapter("*"),a=function(){};n.xWrap.argAdapter("sqlite3_filename",o)("sqlite3_context*",o)("sqlite3_value*",o)("void*",o)("sqlite3_changegroup*",o)("sqlite3_changeset_iter*",o)("sqlite3_session*",o)("sqlite3_stmt*",(t=>o(t instanceof(e?.oo1?.Stmt||a)?t.pointer:t)))("sqlite3*",(t=>o(t instanceof(e?.oo1?.DB||a)?t.pointer:t)))("sqlite3_index_info*",(e=>o(e instanceof(r.sqlite3_index_info||a)?e.pointer:e)))("sqlite3_module*",(e=>o(e instanceof(r.sqlite3_module||a)?e.pointer:e)))("sqlite3_vfs*",(t=>"string"==typeof t?r.sqlite3_vfs_find(t)||e.SQLite3Error.toss(r.SQLITE_NOTFOUND,"Unknown sqlite3_vfs name:",t):o(t instanceof(r.sqlite3_vfs||a)?t.pointer:t)));const l=n.xWrap.resultAdapter("*");n.xWrap.resultAdapter("sqlite3*",l)("sqlite3_context*",l)("sqlite3_stmt*",l)("sqlite3_value*",l)("sqlite3_vfs*",l)("void*",l),0===n.exports.sqlite3_step.length&&(n.xWrap.doArgcCheck=!1,e.config.warn("Disabling sqlite3.wasm.xWrap.doArgcCheck due to environmental quirks."));for(const e of n.bindingSignatures)r[e[0]]=n.xWrap.apply(null,e);for(const e of n.bindingSignatures.wasm)n[e[0]]=n.xWrap.apply(null,e);const c=function(e){return()=>t(e+"() is unavailable due to lack","of BigInt support in this build.")};for(const e of n.bindingSignatures.int64)r[e[0]]=n.bigIntEnabled?n.xWrap.apply(null,e):c(e[0]);if(delete n.bindingSignatures,n.exports.sqlite3_wasm_db_error){const t=n.xWrap("sqlite3_wasm_db_error","int","sqlite3*","int","string");s.sqlite3_wasm_db_error=function(n,s,i){return s instanceof e.WasmAllocError?(s=r.SQLITE_NOMEM,i=0):s instanceof Error&&(i=i||""+s,s=s.resultCode||r.SQLITE_ERROR),n?t(n,s,i):s}}else s.sqlite3_wasm_db_error=function(e,t,r){return console.warn("sqlite3_wasm_db_error() is not exported.",arguments),t}}{const i=n.xCall("sqlite3_wasm_enum_json");i||t("Maintenance required: increase sqlite3_wasm_enum_json()'s","static buffer size!"),n.ctype=JSON.parse(n.cstrToJs(i));const o=["access","authorizer","blobFinalizers","changeset","config","dataTypes","dbConfig","dbStatus","encodings","fcntl","flock","ioCap","limits","openFlags","prepareFlags","resultCodes","sqlite3Status","stmtStatus","syncFlags","trace","txnState","udfFlags","version"];n.bigIntEnabled&&o.push("serialize","session","vtab");for(const e of o)for(const t of Object.entries(n.ctype[e]))r[t[0]]=t[1];n.functionEntry(r.SQLITE_WASM_DEALLOC)||t("Internal error: cannot resolve exported function","entry SQLITE_WASM_DEALLOC (=="+r.SQLITE_WASM_DEALLOC+").");const a=Object.create(null);for(const e of["resultCodes"])for(const t of Object.entries(n.ctype[e]))a[t[1]]=t[0];r.sqlite3_js_rc_str=e=>a[e];const l=Object.assign(Object.create(null),{WasmTestStruct:!0,sqlite3_kvvfs_methods:!s.isUIThread(),sqlite3_index_info:!n.bigIntEnabled,sqlite3_index_constraint:!n.bigIntEnabled,sqlite3_index_orderby:!n.bigIntEnabled,sqlite3_index_constraint_usage:!n.bigIntEnabled});for(const t of n.ctype.structs)l[t.name]||(r[t.name]=e.StructBinder(t));if(r.sqlite3_index_info){for(const e of["sqlite3_index_constraint","sqlite3_index_orderby","sqlite3_index_constraint_usage"])r.sqlite3_index_info[e]=r[e],delete r[e];r.sqlite3_vtab_config=n.xWrap("sqlite3_wasm_vtab_config","int",["sqlite3*","int","int"])}}const i=(e,t,n)=>s.sqlite3_wasm_db_error(e,r.SQLITE_MISUSE,t+"() requires "+n+" argument"+(1===n?"":"s")+"."),o=e=>s.sqlite3_wasm_db_error(e,r.SQLITE_FORMAT,"SQLITE_UTF8 is the only supported encoding."),a=e=>n.xWrap.argAdapter("sqlite3*")(e),l=e=>n.isPtr(e)?n.cstrToJs(e):e,c=function(e,t){e=a(e);let r=this.dbMap.get(e);return t?(!r&&t>0&&this.dbMap.set(e,r=Object.create(null)),r):(this.dbMap.delete(e),r)}.bind(Object.assign(Object.create(null),{dbMap:new Map}));c.addCollation=function(e,t){const r=c(e,1);r.collation||(r.collation=new Set),r.collation.add(l(t).toLowerCase())},c._addUDF=function(e,t,r,n){t=l(t).toLowerCase();let s=n.get(t);s||n.set(t,s=new Set),s.add(r<0?-1:r)},c.addFunction=function(e,t,r){const n=c(e,1);n.udf||(n.udf=new Map),this._addUDF(e,t,r,n.udf)},c.addWindowFunc=function(e,t,r){const n=c(e,1);n.wudf||(n.wudf=new Map),this._addUDF(e,t,r,n.wudf)},c.cleanup=function(e){const t=[e=a(e)];for(const e of["sqlite3_busy_handler","sqlite3_commit_hook","sqlite3_preupdate_hook","sqlite3_progress_handler","sqlite3_rollback_hook","sqlite3_set_authorizer","sqlite3_trace_v2","sqlite3_update_hook"]){const s=n.exports[e];t.length=s.length;try{r[e](...t)}catch(r){console.warn("close-time call of",e+"(",t,") threw:",r)}}const s=c(e,0);if(!s)return;if(s.collation){for(const t of s.collation)try{r.sqlite3_create_collation_v2(e,t,r.SQLITE_UTF8,0,0,0)}catch(e){}delete s.collation}let i;for(i=0;i<2;++i){const t=i?s.wudf:s.udf;if(!t)continue;const n=i?r.sqlite3_create_window_function:r.sqlite3_create_function_v2;for(const s of t){const t=s[0],o=s[1],a=[e,t,0,r.SQLITE_UTF8,0,0,0,0,0];i&&a.push(0);for(const e of o)try{a[2]=e,n.apply(null,a)}catch(e){}o.clear()}t.clear()}delete s.udf,delete s.wudf};{const e=n.xWrap("sqlite3_close_v2","int","sqlite3*");r.sqlite3_close_v2=function(t){if(1!==arguments.length)return i(t,"sqlite3_close_v2",1);if(t)try{c.cleanup(t)}catch(e){}return e(t)}}if(r.sqlite3session_table_filter){const e=n.xWrap("sqlite3session_delete",void 0,["sqlite3_session*"]);r.sqlite3session_delete=function(t){if(1!==arguments.length)return i(pDb,"sqlite3session_delete",1);t&&r.sqlite3session_table_filter(t,0,0),e(t)}}{const e=(e,t)=>"argv["+t+"]:"+e[0]+":"+n.cstrToJs(e[1]).toLowerCase(),t=n.xWrap("sqlite3_create_collation_v2","int",["sqlite3*","string","int","*",new n.xWrap.FuncPtrAdapter({name:"xCompare",signature:"i(pipip)",contextKey:e}),new n.xWrap.FuncPtrAdapter({name:"xDestroy",signature:"v(p)",contextKey:e})]);r.sqlite3_create_collation_v2=function(e,n,a,l,_,u){if(6!==arguments.length)return i(e,"sqlite3_create_collation_v2",6);if(15&a){if(r.SQLITE_UTF8!==(15&a))return o(e)}else a|=r.SQLITE_UTF8;try{const r=t(e,n,a,l,_,u);return 0===r&&_ instanceof Function&&c.addCollation(e,n),r}catch(t){return s.sqlite3_wasm_db_error(e,t)}},r.sqlite3_create_collation=(e,t,n,s,o)=>5===arguments.length?r.sqlite3_create_collation_v2(e,t,n,s,o,0):i(e,"sqlite3_create_collation",5)}{const e=function(e,t){return e[0]+":"+(e[2]<0?-1:e[2])+":"+t+":"+n.cstrToJs(e[1]).toLowerCase()},t=Object.assign(Object.create(null),{xInverseAndStep:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,n,s)=>{try{e(t,...r.sqlite3_values_to_js(n,s))}catch(e){r.sqlite3_result_error_js(t,e)}}},xFinalAndValue:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{r.sqlite3_result_js(t,e(t))}catch(e){r.sqlite3_result_error_js(t,e)}}},xFunc:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,n,s)=>{try{r.sqlite3_result_js(t,e(t,...r.sqlite3_values_to_js(n,s)))}catch(e){r.sqlite3_result_error_js(t,e)}}},xDestroy:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{e(t)}catch(e){console.error("UDF xDestroy method threw:",e)}}}}),a=n.xWrap("sqlite3_create_function_v2","int",["sqlite3*","string","int","int","*",new n.xWrap.FuncPtrAdapter({name:"xFunc",...t.xFunc}),new n.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new n.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new n.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]),l=n.xWrap("sqlite3_create_window_function","int",["sqlite3*","string","int","int","*",new n.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new n.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new n.xWrap.FuncPtrAdapter({name:"xValue",...t.xFinalAndValue}),new n.xWrap.FuncPtrAdapter({name:"xInverse",...t.xInverseAndStep}),new n.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]);r.sqlite3_create_function_v2=function e(t,n,l,_,u,d,f,p,m){if(e.length!==arguments.length)return i(t,"sqlite3_create_function_v2",e.length);if(15&_){if(r.SQLITE_UTF8!==(15&_))return o(t)}else _|=r.SQLITE_UTF8;try{const e=a(t,n,l,_,u,d,f,p,m);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function)&&c.addFunction(t,n,l),e}catch(e){return console.error("sqlite3_create_function_v2() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},r.sqlite3_create_function=function e(t,n,s,o,a,l,c,_){return e.length===arguments.length?r.sqlite3_create_function_v2(t,n,s,o,a,l,c,_,0):i(t,"sqlite3_create_function",e.length)},r.sqlite3_create_window_function=function e(t,n,a,_,u,d,f,p,m,h){if(e.length!==arguments.length)return i(t,"sqlite3_create_window_function",e.length);if(15&_){if(r.SQLITE_UTF8!==(15&_))return o(t)}else _|=r.SQLITE_UTF8;try{const e=l(t,n,a,_,u,d,f,p,m,h);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function||h instanceof Function)&&c.addWindowFunc(t,n,a),e}catch(e){return console.error("sqlite3_create_window_function() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},r.sqlite3_create_function_v2.udfSetResult=r.sqlite3_create_function.udfSetResult=r.sqlite3_create_window_function.udfSetResult=r.sqlite3_result_js,r.sqlite3_create_function_v2.udfConvertArgs=r.sqlite3_create_function.udfConvertArgs=r.sqlite3_create_window_function.udfConvertArgs=r.sqlite3_values_to_js,r.sqlite3_create_function_v2.udfSetError=r.sqlite3_create_function.udfSetError=r.sqlite3_create_window_function.udfSetError=r.sqlite3_result_error_js}{const e=(e,t)=>("string"==typeof e?t=-1:s.isSQLableTypedArray(e)?(t=e.byteLength,e=s.typedArrayToString(e instanceof ArrayBuffer?new Uint8Array(e):e)):Array.isArray(e)&&(e=e.join(""),t=-1),[e,t]),t={basic:n.xWrap("sqlite3_prepare_v3","int",["sqlite3*","string","int","int","**","**"]),full:n.xWrap("sqlite3_prepare_v3","int",["sqlite3*","*","int","int","**","**"])};r.sqlite3_prepare_v3=function n(o,a,l,c,_,u){if(n.length!==arguments.length)return i(o,"sqlite3_prepare_v3",n.length);const[d,f]=e(a,l);switch(typeof d){case"string":return t.basic(o,d,f,c,_,null);case"number":return t.full(o,d,f,c,_,u);default:return s.sqlite3_wasm_db_error(o,r.SQLITE_MISUSE,"Invalid SQL argument type for sqlite3_prepare_v2/v3().")}},r.sqlite3_prepare_v2=function e(t,n,s,o,a){return e.length===arguments.length?r.sqlite3_prepare_v3(t,n,s,0,o,a):i(t,"sqlite3_prepare_v2",e.length)}}{const e=n.xWrap("sqlite3_bind_text","int",["sqlite3_stmt*","int","string","int","*"]),t=n.xWrap("sqlite3_bind_blob","int",["sqlite3_stmt*","int","*","int","*"]);r.sqlite3_bind_text=function t(o,a,l,c,_){if(t.length!==arguments.length)return i(r.sqlite3_db_handle(o),"sqlite3_bind_text",t.length);if(n.isPtr(l)||null===l)return e(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(pMem)&&(l=pMem.join(""));try{if(s.isSQLableTypedArray(l))u=n.allocFromTypedArray(l),d=l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),r.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_text().");[u,d]=n.allocCString(l)}return e(o,a,u,d,r.SQLITE_WASM_DEALLOC)}catch(e){return n.dealloc(u),s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),e)}},r.sqlite3_bind_blob=function e(o,a,l,c,_){if(e.length!==arguments.length)return i(r.sqlite3_db_handle(o),"sqlite3_bind_blob",e.length);if(n.isPtr(l)||null===l)return t(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(l)&&(l=l.join(""));try{if(s.isBindableTypedArray(l))u=n.allocFromTypedArray(l),d=c>=0?c:l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),r.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_blob().");[u,d]=n.allocCString(l)}return t(o,a,u,d,r.SQLITE_WASM_DEALLOC)}catch(e){return n.dealloc(u),s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),e)}}}r.sqlite3_config=function(e,...t){if(arguments.length<2)return r.SQLITE_MISUSE;switch(e){case r.SQLITE_CONFIG_COVERING_INDEX_SCAN:case r.SQLITE_CONFIG_MEMSTATUS:case r.SQLITE_CONFIG_SMALL_MALLOC:case r.SQLITE_CONFIG_SORTERREF_SIZE:case r.SQLITE_CONFIG_STMTJRNL_SPILL:case r.SQLITE_CONFIG_URI:return n.exports.sqlite3_wasm_config_i(e,t[0]);case r.SQLITE_CONFIG_LOOKASIDE:return n.exports.sqlite3_wasm_config_ii(e,t[0],t[1]);case r.SQLITE_CONFIG_MEMDB_MAXSIZE:return n.exports.sqlite3_wasm_config_j(e,t[0]);case r.SQLITE_CONFIG_GETMALLOC:case r.SQLITE_CONFIG_GETMUTEX:case r.SQLITE_CONFIG_GETPCACHE2:case r.SQLITE_CONFIG_GETPCACHE:case r.SQLITE_CONFIG_HEAP:case r.SQLITE_CONFIG_LOG:case r.SQLITE_CONFIG_MALLOC:case r.SQLITE_CONFIG_MMAP_SIZE:case r.SQLITE_CONFIG_MULTITHREAD:case r.SQLITE_CONFIG_MUTEX:case r.SQLITE_CONFIG_PAGECACHE:case r.SQLITE_CONFIG_PCACHE2:case r.SQLITE_CONFIG_PCACHE:case r.SQLITE_CONFIG_PCACHE_HDRSZ:case r.SQLITE_CONFIG_PMASZ:case r.SQLITE_CONFIG_SERIALIZED:case r.SQLITE_CONFIG_SINGLETHREAD:case r.SQLITE_CONFIG_SQLLOG:case r.SQLITE_CONFIG_WIN32_HEAPSIZE:default:return r.SQLITE_NOTFOUND}};{const e=new Set;r.sqlite3_auto_extension=function(t){if(t instanceof Function)t=n.installFunction("i(ppp)",t);else if(1!==arguments.length||!n.isPtr(t))return r.SQLITE_MISUSE;const s=n.exports.sqlite3_auto_extension(t);return t!==arguments[0]&&(0===s?e.add(t):n.uninstallFunction(t)),s},r.sqlite3_cancel_auto_extension=function(e){return e&&1===arguments.length&&n.isPtr(e)?n.exports.sqlite3_cancel_auto_extension(e):0},r.sqlite3_reset_auto_extension=function(){n.exports.sqlite3_reset_auto_extension();for(const t of e)n.uninstallFunction(t);e.clear()}}const _=r.sqlite3_vfs_find("kvvfs");if(_)if(s.isUIThread()){const e=new r.sqlite3_kvvfs_methods(n.exports.sqlite3_wasm_kvvfs_methods());delete r.sqlite3_kvvfs_methods;const t=n.exports.sqlite3_wasm_kvvfsMakeKeyOnPstack,s=n.pstack,i=e=>115===n.peek(e)?sessionStorage:localStorage,o={xRead:(e,r,o,a)=>{const l=s.pointer,c=n.scopedAllocPush();try{const s=t(e,r);if(!s)return-3;const l=n.cstrToJs(s),c=i(e).getItem(l);if(!c)return-1;const _=c.length;if(a<=0)return _;if(1===a)return n.poke(o,0),_;const u=n.scopedAllocCString(c);return a>_+1&&(a=_+1),n.heap8u().copyWithin(o,u,u+a-1),n.poke(o+a-1,0),a-1}catch(e){return console.error("kvstorageRead()",e),-2}finally{s.restore(l),n.scopedAllocPop(c)}},xWrite:(e,o,a)=>{const l=s.pointer;try{const r=t(e,o);if(!r)return 1;const s=n.cstrToJs(r);return i(e).setItem(s,n.cstrToJs(a)),0}catch(e){return console.error("kvstorageWrite()",e),r.SQLITE_IOERR}finally{s.restore(l)}},xDelete:(e,o)=>{const a=s.pointer;try{const r=t(e,o);return r?(i(e).removeItem(n.cstrToJs(r)),0):1}catch(e){return console.error("kvstorageDelete()",e),r.SQLITE_IOERR}finally{s.restore(a)}}};for(const t of Object.keys(o))e[e.memberKey(t)]=n.installFunction(e.memberSignature(t),o[t])}else r.sqlite3_vfs_unregister(_);n.xWrap.FuncPtrAdapter.warnOnUse=!0})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.version={libVersion:"3.44.2",libVersionNumber:3044002,sourceId:"2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f",downloadVersion:3440200}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...t)=>{throw new e.SQLite3Error(...t)},r=e.capi,n=e.wasm,s=e.util,i=new WeakMap,o=new WeakMap,a=(e,t,r)=>{const n=Object.getOwnPropertyDescriptor(e,t);return n?n.value:r},l=function(e,n){return n&&(e instanceof d&&(e=e.pointer),t(n,"sqlite3 result code",n+":",e?r.sqlite3_errmsg(e):r.sqlite3_errstr(n))),arguments[0]},c=n.installFunction("i(ippp)",function(e,t,s,i){r.SQLITE_TRACE_STMT===e&&console.log("SQL TRACE #"+ ++this.counter+" via sqlite3@"+t+":",n.cstrToJs(i))}.bind({counter:0})),_=Object.create(null),u=function s(...a){if(!s._name2vfs){s._name2vfs=Object.create(null);const e="function"==typeof importScripts&&(e=>t("The VFS for",e,"is only available in the main window thread."));s._name2vfs[":localStorage:"]={vfs:"kvvfs",filename:e||(()=>"local")},s._name2vfs[":sessionStorage:"]={vfs:"kvvfs",filename:e||(()=>"session")}}const u=s.normalizeArgs(...a);let d=u.filename,f=u.vfs,p=u.flags;("string"!=typeof d&&"number"!=typeof d||"string"!=typeof p||f&&"string"!=typeof f&&"number"!=typeof f)&&(e.config.error("Invalid DB ctor args",u,arguments),t("Invalid arguments for DB constructor."));let m="number"==typeof d?n.cstrToJs(d):d;const h=s._name2vfs[m];h&&(f=h.vfs,d=m=h.filename(m));let g,b=0;p.indexOf("c")>=0&&(b|=r.SQLITE_OPEN_CREATE|r.SQLITE_OPEN_READWRITE),p.indexOf("w")>=0&&(b|=r.SQLITE_OPEN_READWRITE),0===b&&(b|=r.SQLITE_OPEN_READONLY),b|=r.SQLITE_OPEN_EXRESCODE;const y=n.pstack.pointer;try{const e=n.pstack.allocPtr();let t=r.sqlite3_open_v2(d,e,b,f||0);g=n.peekPtr(e),l(g,t),r.sqlite3_extended_result_codes(g,1),p.indexOf("t")>=0&&r.sqlite3_trace_v2(g,r.SQLITE_TRACE_STMT,c,g)}catch(e){throw g&&r.sqlite3_close_v2(g),e}finally{n.pstack.restore(y)}this.filename=m,i.set(this,g),o.set(this,Object.create(null));try{const n=r.sqlite3_js_db_vfs(g);n||t("Internal error: cannot get VFS for new db handle.");const s=_[n];s instanceof Function?s(this,e):s&&l(g,r.sqlite3_exec(g,s,0,0,0))}catch(e){throw this.close(),e}};u.setVfsPostOpenSql=function(e,t){_[e]=t},u.normalizeArgs=function(e=":memory:",t="c",r=null){const n={};return 1===arguments.length&&arguments[0]&&"object"==typeof arguments[0]?(Object.assign(n,arguments[0]),void 0===n.flags&&(n.flags="c"),void 0===n.vfs&&(n.vfs=null),void 0===n.filename&&(n.filename=":memory:")):(n.filename=e,n.flags=t,n.vfs=r),n};const d=function(...e){u.apply(this,e)};d.dbCtorHelper=u;const f={null:1,number:2,string:3,boolean:4,blob:5};f[void 0],f.null,n.bigIntEnabled&&(f.bigint=f.number);const p=function(){f!==arguments[2]&&t(r.SQLITE_MISUSE,"Do not call the Stmt constructor directly. Use DB.prepare()."),this.db=arguments[0],i.set(this,arguments[1]),this.parameterCount=r.sqlite3_bind_parameter_count(this.pointer)},m=function(e){return e.pointer||t("DB has been closed."),e},h=function(e,r){return(r!==(0|r)||r<0||r>=e.columnCount)&&t("Column index",r,"is out of range."),e},g=(e,t,r,...n)=>{const s=e.prepare(t);try{const e=s.bind(r).step()?s.get(...n):void 0;return s.reset(),e}finally{s.finalize()}},b=(e,t,r,n)=>e.exec({sql:t,bind:r,rowMode:n,returnValue:"resultRows"});d.checkRc=(e,t)=>l(e,t),d.prototype={isOpen:function(){return!!this.pointer},affirmOpen:function(){return m(this)},close:function(){if(this.pointer){if(this.onclose&&this.onclose.before instanceof Function)try{this.onclose.before(this)}catch(e){}const e=this.pointer;if(Object.keys(o.get(this)).forEach(((e,t)=>{if(t&&t.pointer)try{t.finalize()}catch(e){}})),i.delete(this),o.delete(this),r.sqlite3_close_v2(e),this.onclose&&this.onclose.after instanceof Function)try{this.onclose.after(this)}catch(e){}delete this.filename}},changes:function(e=!1,t=!1){const n=m(this).pointer;return e?t?r.sqlite3_total_changes64(n):r.sqlite3_total_changes(n):t?r.sqlite3_changes64(n):r.sqlite3_changes(n)},dbFilename:function(e="main"){return r.sqlite3_db_filename(m(this).pointer,e)},dbName:function(e=0){return r.sqlite3_db_name(m(this).pointer,e)},dbVfsName:function(e=0){let t;const s=r.sqlite3_js_db_vfs(m(this).pointer,e);if(s){const e=new r.sqlite3_vfs(s);try{t=n.cstrToJs(e.$zName)}finally{e.dispose()}}return t},prepare:function(e){m(this);const s=n.pstack.pointer;let i,a;try{i=n.pstack.alloc(8),d.checkRc(this,r.sqlite3_prepare_v2(this.pointer,e,-1,i,null)),a=n.peekPtr(i)}finally{n.pstack.restore(s)}a||t("Cannot prepare empty SQL.");const l=new p(this,a,f);return o.get(this)[a]=l,l},exec:function(){m(this);const e=function(e,n){const i=Object.create(null);switch(i.opt=Object.create(null),n.length){case 1:"string"==typeof n[0]||s.isSQLableTypedArray(n[0])||Array.isArray(n[0])?i.sql=n[0]:n[0]&&"object"==typeof n[0]&&(i.opt=n[0],i.sql=i.opt.sql);break;case 2:i.sql=n[0],i.opt=n[1];break;default:t("Invalid argument count for exec().")}i.sql=s.flexibleString(i.sql),"string"!=typeof i.sql&&t("Missing SQL argument or unsupported SQL value type.");const o=i.opt;switch(o.returnValue){case"resultRows":o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows;break;case"saveSql":o.saveSql||(o.saveSql=[]),i.returnVal=()=>o.saveSql;break;case void 0:case"this":i.returnVal=()=>e;break;default:t("Invalid returnValue value:",o.returnValue)}if(o.callback||o.returnValue||void 0===o.rowMode||(o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows),o.callback||o.resultRows)switch(void 0===o.rowMode?"array":o.rowMode){case"object":i.cbArg=e=>e.get(Object.create(null));break;case"array":i.cbArg=e=>e.get([]);break;case"stmt":Array.isArray(o.resultRows)&&t("exec(): invalid rowMode for a resultRows array: must","be one of 'array', 'object',","a result column number, or column name reference."),i.cbArg=e=>e;break;default:if(s.isInt32(o.rowMode)){i.cbArg=e=>e.get(o.rowMode);break}if("string"==typeof o.rowMode&&o.rowMode.length>1&&"$"===o.rowMode[0]){const e=o.rowMode.substr(1);i.cbArg=n=>{const s=n.get(Object.create(null))[e];return void 0===s?t(r.SQLITE_NOTFOUND,"exec(): unknown result column:",e):s};break}t("Invalid rowMode:",o.rowMode)}return i}(this,arguments);if(!e.sql)return t("exec() requires an SQL string.");const i=e.opt,o=i.callback,a=Array.isArray(i.resultRows)?i.resultRows:void 0;let l,c=i.bind,_=!!(e.cbArg||i.columnNames||a);const u=n.scopedAllocPush(),h=Array.isArray(i.saveSql)?i.saveSql:void 0;try{const t=s.isSQLableTypedArray(e.sql);let u=t?e.sql.byteLength:n.jstrlen(e.sql);const m=n.scopedAlloc(2*n.ptrSizeof+(u+1)),g=m+n.ptrSizeof;let b=g+n.ptrSizeof;const y=b+u;for(t?n.heap8().set(e.sql,b):n.jstrcpy(e.sql,n.heap8(),b,u,!1),n.poke(b+u,0);b&&n.peek(b,"i8");){n.pokePtr([m,g],0),d.checkRc(this,r.sqlite3_prepare_v3(this.pointer,b,u,0,m,g));const t=n.peekPtr(m);if(b=n.peekPtr(g),u=y-b,t){if(h&&h.push(r.sqlite3_sql(t).trim()),l=new p(this,t,f),c&&l.parameterCount&&(l.bind(c),c=null),_&&l.columnCount){let t=Array.isArray(i.columnNames)?0:1;if(_=!1,e.cbArg||a){for(;l.step();l._lockedByExec=!1){0==t++&&l.getColumnNames(i.columnNames),l._lockedByExec=!0;const r=e.cbArg(l);if(a&&a.push(r),o&&!1===o.call(i,r,l))break}l._lockedByExec=!1}0===t&&l.getColumnNames(i.columnNames)}else l.step();l.reset().finalize(),l=null}}}finally{n.scopedAllocPop(u),l&&(delete l._lockedByExec,l.finalize())}return e.returnVal()},createFunction:function(e,n,i){const o=e=>e instanceof Function;switch(arguments.length){case 1:e=(i=e).name,n=i.xFunc||0;break;case 2:o(n)||(n=(i=n).xFunc||0)}i||(i={}),"string"!=typeof e&&t("Invalid arguments: missing function name.");let l=i.xStep||0,c=i.xFinal||0;const _=i.xValue||0,u=i.xInverse||0;let f;o(n)?(f=!1,(o(l)||o(c))&&t("Ambiguous arguments: scalar or aggregate?"),l=c=null):o(l)?(o(c)||t("Missing xFinal() callback for aggregate or window UDF."),n=null):o(c)?t("Missing xStep() callback for aggregate or window UDF."):t("Missing function-type properties."),!1===f?(o(_)||o(u))&&t("xValue and xInverse are not permitted for non-window UDFs."):o(_)?(o(u)||t("xInverse must be provided if xValue is."),f=!0):o(u)&&t("xValue must be provided if xInverse is.");const p=i.pApp;null==p||"number"==typeof p&&s.isInt32(p)||t("Invalid value for pApp property. Must be a legal WASM pointer value.");const m=i.xDestroy||0;m&&!o(m)&&t("xDestroy property must be a function.");let h=0;a(i,"deterministic")&&(h|=r.SQLITE_DETERMINISTIC),a(i,"directOnly")&&(h|=r.SQLITE_DIRECTONLY),a(i,"innocuous")&&(h|=r.SQLITE_INNOCUOUS),e=e.toLowerCase();const g=n||l,b=a(i,"arity"),y="number"==typeof b?b:g.length?g.length-1:0;let q;return q=f?r.sqlite3_create_window_function(this.pointer,e,y,r.SQLITE_UTF8|h,p||0,l,c,_,u,m):r.sqlite3_create_function_v2(this.pointer,e,y,r.SQLITE_UTF8|h,p||0,n,l,c,m),d.checkRc(this,q),this},selectValue:function(e,t,r){return g(this,e,t,0,r)},selectValues:function(e,t,r){const n=this.prepare(e),s=[];try{for(n.bind(t);n.step();)s.push(n.get(0,r));n.reset()}finally{n.finalize()}return s},selectArray:function(e,t){return g(this,e,t,[])},selectObject:function(e,t){return g(this,e,t,{})},selectArrays:function(e,t){return b(this,e,t,"array")},selectObjects:function(e,t){return b(this,e,t,"object")},openStatementCount:function(){return this.pointer?Object.keys(o.get(this)).length:0},transaction:function(e){let n="BEGIN";arguments.length>1&&(/[^a-zA-Z]/.test(arguments[0])&&t(r.SQLITE_MISUSE,"Invalid argument for BEGIN qualifier."),n+=" "+arguments[0],e=arguments[1]),m(this).exec(n);try{const t=e(this);return this.exec("COMMIT"),t}catch(e){throw this.exec("ROLLBACK"),e}},savepoint:function(e){m(this).exec("SAVEPOINT oo1");try{const t=e(this);return this.exec("RELEASE oo1"),t}catch(e){throw this.exec("ROLLBACK to SAVEPOINT oo1; RELEASE SAVEPOINT oo1"),e}},checkRc:function(e){return l(this,e)}};const y=function(e){return e.pointer||t("Stmt has been closed."),e},q=function(e){return function(e){let t=f[null==e?"null":typeof e];switch(t){case f.boolean:case f.null:case f.number:case f.string:return t;case f.bigint:if(n.bigIntEnabled)return t;default:return s.isBindableTypedArray(e)?f.blob:void 0}}(e)||t("Unsupported bind() argument type:",typeof e)},v=function(e,r){return e._lockedByExec&&t("Operation is illegal when statement is locked:",r),e},w=function i(o,a,l,c){v(y(o),"bind()"),i._||(i._tooBigInt=e=>t("BigInt value is too big to store without precision loss:",e),i._={string:function(e,t,s,i){const[o,a]=n.allocCString(s,!0);return(i?r.sqlite3_bind_blob:r.sqlite3_bind_text)(e.pointer,t,o,a,r.SQLITE_WASM_DEALLOC)}}),q(c),a=function(e,n){const i="number"==typeof n?n:r.sqlite3_bind_parameter_index(e.pointer,n);return 0!==i&&s.isInt32(i)?(i<1||i>e.parameterCount)&&t("Bind index",n,"is out of range."):t("Invalid bind() parameter name: "+n),i}(o,a);let _=0;switch(null==c?f.null:l){case f.null:_=r.sqlite3_bind_null(o.pointer,a);break;case f.string:_=i._.string(o,a,c,!1);break;case f.number:{let e;s.isInt32(c)?e=r.sqlite3_bind_int:"bigint"==typeof c?s.bigIntFits64(c)?n.bigIntEnabled?e=r.sqlite3_bind_int64:s.bigIntFitsDouble(c)?(c=Number(c),e=r.sqlite3_bind_double):i._tooBigInt(c):i._tooBigInt(c):(c=Number(c),e=n.bigIntEnabled&&Number.isInteger(c)?r.sqlite3_bind_int64:r.sqlite3_bind_double),_=e(o.pointer,a,c);break}case f.boolean:_=r.sqlite3_bind_int(o.pointer,a,c?1:0);break;case f.blob:{if("string"==typeof c){_=i._.string(o,a,c,!0);break}c instanceof ArrayBuffer?c=new Uint8Array(c):s.isBindableTypedArray(c)||t("Binding a value as a blob requires","that it be a string, Uint8Array, Int8Array, or ArrayBuffer.");const e=n.alloc(c.byteLength||1);n.heap8().set(c.byteLength?c:[0],e),_=r.sqlite3_bind_blob(o.pointer,a,e,c.byteLength,r.SQLITE_WASM_DEALLOC);break}default:e.config.warn("Unsupported bind() argument type:",c),t("Unsupported bind() argument type: "+typeof c)}return _&&d.checkRc(o.db.pointer,_),o._mayGet=!1,o};p.prototype={finalize:function(){if(this.pointer){v(this,"finalize()");const e=r.sqlite3_finalize(this.pointer);return delete o.get(this.db)[this.pointer],i.delete(this),delete this._mayGet,delete this.parameterCount,delete this._lockedByExec,delete this.db,e}},clearBindings:function(){return v(y(this),"clearBindings()"),r.sqlite3_clear_bindings(this.pointer),this._mayGet=!1,this},reset:function(e){v(this,"reset()"),e&&this.clearBindings();const t=r.sqlite3_reset(y(this).pointer);return this._mayGet=!1,l(this.db,t),this},bind:function(){let e,r;switch(y(this),arguments.length){case 1:e=1,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:t("Invalid bind() arguments.")}return void 0===r?this:(this.parameterCount||t("This statement has no bindable parameters."),this._mayGet=!1,null===r?w(this,e,f.null,r):Array.isArray(r)?(1!==arguments.length&&t("When binding an array, an index argument is not permitted."),r.forEach(((e,t)=>w(this,t+1,q(e),e))),this):(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),"object"!=typeof r||s.isBindableTypedArray(r)?w(this,e,q(r),r):(1!==arguments.length&&t("When binding an object, an index argument is not permitted."),Object.keys(r).forEach((e=>w(this,e,q(r[e]),r[e]))),this)))},bindAsBlob:function(e,r){y(this),1===arguments.length&&(r=e,e=1);const n=q(r);return f.string!==n&&f.blob!==n&&f.null!==n&&t("Invalid value type for bindAsBlob()"),w(this,e,f.blob,r)},step:function(){v(this,"step()");const t=r.sqlite3_step(y(this).pointer);switch(t){case r.SQLITE_DONE:return this._mayGet=!1;case r.SQLITE_ROW:return this._mayGet=!0;default:this._mayGet=!1,e.config.warn("sqlite3_step() rc=",t,r.sqlite3_js_rc_str(t),"SQL =",r.sqlite3_sql(this.pointer)),d.checkRc(this.db.pointer,t)}},stepReset:function(){return this.step(),this.reset()},stepFinalize:function(){try{const e=this.step();return this.reset(),e}finally{try{this.finalize()}catch(e){}}},get:function(e,i){if(y(this)._mayGet||t("Stmt.step() has not (recently) returned true."),Array.isArray(e)){let t=0;const r=this.columnCount;for(;t=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t).valueOf():t}{const n=r.sqlite3_column_double(this.pointer,e);return(n>Number.MAX_SAFE_INTEGER||nt("The pointer property is read-only.")};Object.defineProperty(p.prototype,"pointer",e),Object.defineProperty(d.prototype,"pointer",e)}if(Object.defineProperty(p.prototype,"columnCount",{enumerable:!1,get:function(){return r.sqlite3_column_count(this.pointer)},set:()=>t("The columnCount property is read-only.")}),e.oo1={DB:d,Stmt:p},s.isUIThread()){e.oo1.JsStorageDb=function(e="session"){"session"!==e&&"local"!==e&&t("JsStorageDb db name must be one of 'session' or 'local'."),u.call(this,{filename:e,flags:"c",vfs:"kvvfs"})};const n=e.oo1.JsStorageDb;n.prototype=Object.create(d.prototype),n.clearStorage=r.sqlite3_js_kvvfs_clear,n.prototype.clearStorage=function(){return n.clearStorage(m(this).filename)},n.storageSize=r.sqlite3_js_kvvfs_size,n.prototype.storageSize=function(){return n.storageSize(m(this).filename)}}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.initWorker1API=function(){const e=(...e)=>{throw new Error(e.join(" "))};globalThis.WorkerGlobalScope instanceof Function||e("initWorker1API() must be run from a Worker thread.");const t=this.sqlite3||e("Missing this.sqlite3 object."),r=t.oo1.DB,n=function(e){let t=s.idMap.get(e);return t||(t="db#"+ ++s.idSeq+"@"+e.pointer,s.idMap.set(e,t),t)},s={dbList:[],idSeq:0,idMap:new WeakMap,xfer:[],open:function(e){const t=new r(e);return this.dbs[n(t)]=t,this.dbList.indexOf(t)<0&&this.dbList.push(t),t},close:function(e,r){if(e){delete this.dbs[n(e)];const s=e.filename,i=t.wasm.sqlite3_wasm_db_vfs(e.pointer,0);e.close();const o=this.dbList.indexOf(e);o>=0&&this.dbList.splice(o,1),r&&s&&i&&t.wasm.sqlite3_wasm_vfs_unlink(i,s)}},post:function(e,t){t&&t.length?(globalThis.postMessage(e,Array.from(t)),t.length=0):globalThis.postMessage(e)},dbs:Object.create(null),getDb:function(t,r=!0){return this.dbs[t]||(r?e("Unknown (or closed) DB ID:",t):void 0)}},i=function(t,r=!0){const n=s.getDb(t.dbId,!1)||s.dbList[0];return r?function(t=s.dbList[0]){return t&&t.pointer?t:e("DB is not opened.")}(n):n},o={open:function(r){const i=Object.create(null),o=r.args||Object.create(null);o.simulateError&&e("Throwing because of simulateError flag.");const a=Object.create(null);let l,c;var _;if(i.vfs=o.vfs,""===(_=o.filename)||":"===_[0]?i.filename=o.filename||"":(i.filename=o.filename,l=o.byteArray,l&&(c=function(e){const r=/^file:.+(vfs=(\w+))/.exec(e);return t.capi.sqlite3_vfs_find(r?r[2]:0)}(o.filename))),c){let e;try{e=t.wasm.allocFromTypedArray(l);const r=t.wasm.sqlite3_wasm_vfs_create_file(c,i.filename,e,l.byteLength);r&&t.SQLite3Error.toss(r)}catch(e){throw new t.SQLite3Error(e.name+" creating "+o.filename+": "+e.message,{cause:e})}finally{e&&t.wasm.dealloc(e)}}const u=s.open(i);return a.filename=u.filename,a.persistent=!!t.capi.sqlite3_js_db_uses_vfs(u.pointer,"opfs"),a.dbId=n(u),a.vfs=u.dbVfsName(),a},close:function(e){const t=i(e,!1),r={filename:t&&t.filename};if(t){const r=!(!e.args||"object"!=typeof e.args||!e.args.unlink);s.close(t,r)}return r},exec:function(t){const r="string"==typeof t.args?{sql:t.args}:t.args||Object.create(null);"stmt"===r.rowMode?e("Invalid rowMode for 'exec': stmt mode","does not work in the Worker API."):r.sql||e("'exec' requires input SQL.");const n=i(t);(r.callback||Array.isArray(r.resultRows))&&(n._blobXfer=s.xfer);const o=r.callback;let a=0;const l=!!r.columnNames;"string"==typeof o&&(l||(r.columnNames=[]),r.callback=function(e,t){s.post({type:o,columnNames:r.columnNames,rowNumber:++a,row:e},s.xfer)});try{const e=r.countChanges?n.changes(!0,64===r.countChanges):void 0;n.exec(r),void 0!==e&&(r.changeCount=n.changes(!0,64===r.countChanges)-e),r.callback instanceof Function&&(r.callback=o,s.post({type:o,columnNames:r.columnNames,rowNumber:null,row:void 0}))}finally{delete n._blobXfer,r.callback&&(r.callback=o)}return r},"config-get":function(){const e=Object.create(null),r=t.config;return["bigIntEnabled"].forEach((function(t){Object.getOwnPropertyDescriptor(r,t)&&(e[t]=r[t])})),e.version=t.version,e.vfsList=t.capi.sqlite3_js_vfs_list(),e.opfsEnabled=!!t.opfs,e},export:function(e){const r=i(e),n={byteArray:t.capi.sqlite3_js_db_export(r.pointer),filename:r.filename,mimetype:"application/x-sqlite3"};return s.xfer.push(n.byteArray.buffer),n},toss:function(t){e("Testing worker exception")},"opfs-tree":async function(r){return t.opfs||e("OPFS support is unavailable."),await t.opfs.treeList()}};globalThis.onmessage=async function(t){let r,i=(t=t.data).dbId,a=t.type;const l=performance.now();try{o.hasOwnProperty(a)&&o[a]instanceof Function?r=await o[a](t):e("Unknown db worker message type:",t.type)}catch(e){a="error",r={operation:t.type,message:e.message,errorClass:e.name,input:t},e.stack&&(r.stack="string"==typeof e.stack?e.stack.split(/\n\s*/):e.stack)}i||(i=r.dbId||s.dbList[0]&&n(s.dbList[0])),s.post({type:a,dbId:i,messageId:t.messageId,workerReceivedTime:l,workerRespondTime:performance.now(),departureTime:t.departureTime,result:r},s.xfer)},globalThis.postMessage({type:"sqlite3-api",result:"worker1-ready"})}.bind({sqlite3:e})})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.wasm,r=e.capi,n=e.util.toss3,s=Object.create(null),i=Object.create(null),o=e.StructBinder;e.vfs=s,e.vtab=i;const a=r.sqlite3_index_info;a.prototype.nthConstraint=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const r=this.$aConstraint+a.sqlite3_index_constraint.structInfo.sizeof*e;return t?r:new a.sqlite3_index_constraint(r)},a.prototype.nthConstraintUsage=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const r=this.$aConstraintUsage+a.sqlite3_index_constraint_usage.structInfo.sizeof*e;return t?r:new a.sqlite3_index_constraint_usage(r)},a.prototype.nthOrderBy=function(e,t=!1){if(e<0||e>=this.$nOrderBy)return!1;const r=this.$aOrderBy+a.sqlite3_index_orderby.structInfo.sizeof*e;return t?r:new a.sqlite3_index_orderby(r)};const l=function e(r,s,i,a=e.installMethodArgcCheck){if(r instanceof o.StructType?i instanceof Function||t.isPtr(i)||n("Usage errror: expecting a Function or WASM pointer to one."):n("Usage error: target object is-not-a StructType."),1===arguments.length)return(t,n)=>e(r,t,n,a);e.argcProxy||(e.argcProxy=function(e,t,r,s){return function(...i){return r.length!==arguments.length&&n("Argument mismatch for",e.structInfo.name+"::"+t+": Native signature is:",s),r.apply(this,i)}},e.removeFuncList=function(){this.ondispose.__removeFuncList&&(this.ondispose.__removeFuncList.forEach(((e,r)=>{if("number"==typeof e)try{t.uninstallFunction(e)}catch(e){}})),delete this.ondispose.__removeFuncList)});const l=r.memberSignature(s);l.length<2&&n("Member",s,"does not have a function pointer signature:",l);const c=r.memberKey(s),_=a&&!t.isPtr(i)?e.argcProxy(r,c,i,l):i;if(t.isPtr(_))_&&!t.functionEntry(_)&&n("Pointer",_,"is not a WASM function table entry."),r[c]=_;else{const n=t.installFunction(_,r.memberSignature(s,!0));r[c]=n,r.ondispose&&r.ondispose.__removeFuncList||(r.addOnDispose("ondispose.__removeFuncList handler",e.removeFuncList),r.ondispose.__removeFuncList=[]),r.ondispose.__removeFuncList.push(c,n)}return(t,n)=>e(r,t,n,a)};l.installMethodArgcCheck=!1;const c=function(e,t,r=l.installMethodArgcCheck){const n=new Map;for(const s of Object.keys(t)){const i=t[s],o=n.get(i);if(o){const t=e.memberKey(s);e[t]=e[e.memberKey(o)]}else l(e,s,i,r),n.set(i,s)}return e};o.StructType.prototype.installMethod=function(e,t,r=l.installMethodArgcCheck){return arguments.length<3&&e&&"object"==typeof e?c(this,...arguments):l(this,...arguments)},o.StructType.prototype.installMethods=function(e,t=l.installMethodArgcCheck){return c(this,e,t)},r.sqlite3_vfs.prototype.registerVfs=function(t=!1){this instanceof e.capi.sqlite3_vfs||n("Expecting a sqlite3_vfs-type argument.");const s=r.sqlite3_vfs_register(this,t?1:0);return s&&n("sqlite3_vfs_register(",this,") failed with rc",s),this.pointer!==r.sqlite3_vfs_find(this.$zName)&&n("BUG: sqlite3_vfs_find(vfs.$zName) failed for just-installed VFS",this),this},s.installVfs=function(e){let r=0;const s=["io","vfs"];for(const n of s){const s=e[n];s&&(++r,c(s.struct,s.methods,!!s.applyArgcCheck),"vfs"===n&&(s.struct.$zName||"string"!=typeof s.name||s.struct.addOnDispose(s.struct.$zName=t.allocCString(s.name)),s.struct.registerVfs(!!s.asDefault)))}return r||n("Misuse: installVfs() options object requires at least","one of:",s),this};const _=function(r,n){const s=function(r,n){return function(s,i=!1){if(0===arguments.length&&(s=new n),s instanceof n)return this.set(s.pointer,s),s;t.isPtr(s)||e.SQLite3Error.toss("Invalid argument to",r+"()");let o=this.get(s);return i&&this.delete(s),o}.bind(new Map)}(r,n);return Object.assign(Object.create(null),{StructType:n,create:e=>{const r=s();return t.pokePtr(e,r.pointer),r},get:e=>s(e),unget:e=>s(e,!0),dispose:e=>{const t=s(e,!0);t&&t.dispose()}})};i.xVtab=_("xVtab",r.sqlite3_vtab),i.xCursor=_("xCursor",r.sqlite3_vtab_cursor),i.xIndexInfo=e=>new r.sqlite3_index_info(e),i.xError=function t(n,s,i){if(t.errorReporter instanceof Function)try{t.errorReporter("sqlite3_module::"+n+"(): "+s.message)}catch(e){}let o;return s instanceof e.WasmAllocError?o=r.SQLITE_NOMEM:arguments.length>2?o=i:s instanceof e.SQLite3Error&&(o=s.resultCode),o||r.SQLITE_ERROR},i.xError.errorReporter=console.error.bind(console),i.xRowid=(e,r)=>t.poke(e,r,"i64"),i.setupModule=function(s){let o=!1;const a=this instanceof r.sqlite3_module?this:s.struct||(o=new r.sqlite3_module);try{const r=s.methods||n("Missing 'methods' object.");for(const e of Object.entries({xConnect:"xCreate",xDisconnect:"xDestroy"})){const t=e[0],n=e[1];!0===r[t]?r[t]=r[n]:!0===r[n]&&(r[n]=r[t])}if(s.catchExceptions){const n=function(r,n){return["xConnect","xCreate"].indexOf(r)>=0?function(s,o,a,l,c,_){try{return n(...arguments)||0}catch(n){return n instanceof e.WasmAllocError||(t.dealloc(t.peekPtr(_)),t.pokePtr(_,t.allocCString(n.message))),i.xError(r,n)}}:function(...e){try{return n(...e)||0}catch(e){return i.xError(r,e)}}},s=["xCreate","xConnect","xBestIndex","xDisconnect","xDestroy","xOpen","xClose","xFilter","xNext","xEof","xColumn","xRowid","xUpdate","xBegin","xSync","xCommit","xRollback","xFindFunction","xRename","xSavepoint","xRelease","xRollbackTo","xShadowName"],o=Object.create(null);for(const e of s){const t=r[e];t instanceof Function&&("xConnect"===e&&r.xCreate===t?o[e]=r.xCreate:"xCreate"===e&&r.xConnect===t?o[e]=r.xConnect:o[e]=n(e,t))}c(a,o,!1)}else c(a,r,!!s.applyArgcCheck);if(0===a.$iVersion){let e;e="number"==typeof s.iVersion?s.iVersion:a.$xShadowName?3:a.$xSavePoint||a.$xRelease||a.$xRollbackTo?2:1,a.$iVersion=e}}catch(e){throw o&&o.dispose(),e}return a},r.sqlite3_module.prototype.setupModule=function(e){return i.setupModule.call(this,e)}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=function t(n){if(!globalThis.SharedArrayBuffer||!globalThis.Atomics)return Promise.reject(new Error("Cannot install OPFS: Missing SharedArrayBuffer and/or Atomics. The server must emit the COOP/COEP response headers to enable those. See https://sqlite.org/wasm/doc/trunk/persistence.md#coop-coep"));if("undefined"==typeof WorkerGlobalScope)return Promise.reject(new Error("The OPFS sqlite3_vfs cannot run in the main thread because it requires Atomics.wait()."));if(!(globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle&&globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle&&navigator?.storage?.getDirectory))return Promise.reject(new Error("Missing required OPFS APIs."));n&&"object"==typeof n||(n=Object.create(null));const s=new URL(globalThis.location.href).searchParams;if(s.has("opfs-disable"))return Promise.resolve(e);void 0===n.verbose&&(n.verbose=s.has("opfs-verbose")?+s.get("opfs-verbose")||2:1),void 0===n.sanityChecks&&(n.sanityChecks=s.has("opfs-sanity-check")),void 0===n.proxyUri&&(n.proxyUri=t.defaultProxyUri),"function"==typeof n.proxyUri&&(n.proxyUri=n.proxyUri());const i=new Promise((function(t,s){const i=[e.config.error,e.config.warn,e.config.log],o=(e,...t)=>{n.verbose>e&&i[e]("OPFS syncer:",...t)},a=(...e)=>o(2,...e),l=(...e)=>o(1,...e),c=(...e)=>o(0,...e),_=e.util.toss,u=e.capi,d=e.util,f=e.wasm,p=u.sqlite3_vfs,m=u.sqlite3_file,h=u.sqlite3_io_methods,g=Object.create(null);g.metrics={dump:function(){let t,r=0,n=0,s=0;for(t in x.opIds){const e=T[t];r+=e.count,n+=e.time,s+=e.wait,e.avgTime=e.count&&e.time?e.time/e.count:0,e.avgWait=e.count&&e.wait?e.wait/e.count:0}e.config.log(globalThis.location.href,"metrics for",globalThis.location.href,":",T,"\nTotal of",r,"op(s) for",n,"ms (incl. "+s+" ms of waiting on the async side)"),e.config.log("Serialization metrics:",T.s11n),E.postMessage({type:"opfs-async-metrics"})},reset:function(){let e;for(e in x.opIds)(t=T[e]=Object.create(null)).count=t.time=t.wait=0;var t;let r=T.s11n=Object.create(null);r=r.serialize=Object.create(null),r.count=r.time=0,r=T.s11n.deserialize=Object.create(null),r.count=r.time=0}};const b=new h,y=(new p).addOnDispose((()=>b.dispose()));let q;const v=e=>(q=!0,y.dispose(),s(e)),w=()=>(q=!1,t(e)),E=new Worker(new URL(r.p+r.u(892),r.b));setTimeout((()=>{void 0===q&&v(new Error("Timeout while waiting for OPFS async proxy worker."))}),4e3),E._originalOnError=E.onerror,E.onerror=function(e){c("Error initializing OPFS asyncer:",e),v(new Error("Loading OPFS async Worker failed for unknown reasons."))};const S=u.sqlite3_vfs_find(null),A=S?new p(S):null;b.$iVersion=1,y.$iVersion=2,y.$szOsFile=u.sqlite3_file.structInfo.sizeof,y.$mxPathname=1024,y.$zName=f.allocCString("opfs"),y.$xDlOpen=y.$xDlError=y.$xDlSym=y.$xDlClose=null,y.addOnDispose("$zName",y.$zName,"cleanup default VFS wrapper",(()=>A?A.dispose():null));const x=Object.create(null);x.verbose=n.verbose,x.littleEndian=(()=>{const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]})(),x.asyncIdleWaitTime=150,x.asyncS11nExceptions=1,x.fileBufferSize=65536,x.sabS11nOffset=x.fileBufferSize,x.sabS11nSize=2*y.$mxPathname,x.sabIO=new SharedArrayBuffer(x.fileBufferSize+x.sabS11nSize),x.opIds=Object.create(null);const T=Object.create(null);{let e=0;x.opIds.whichOp=e++,x.opIds.rc=e++,x.opIds.xAccess=e++,x.opIds.xClose=e++,x.opIds.xDelete=e++,x.opIds.xDeleteNoWait=e++,x.opIds.xFileSize=e++,x.opIds.xLock=e++,x.opIds.xOpen=e++,x.opIds.xRead=e++,x.opIds.xSleep=e++,x.opIds.xSync=e++,x.opIds.xTruncate=e++,x.opIds.xUnlock=e++,x.opIds.xWrite=e++,x.opIds.mkdir=e++,x.opIds["opfs-async-metrics"]=e++,x.opIds["opfs-async-shutdown"]=e++,x.opIds.retry=e++,x.sabOP=new SharedArrayBuffer(4*e),g.metrics.reset()}x.sq3Codes=Object.create(null),["SQLITE_ACCESS_EXISTS","SQLITE_ACCESS_READWRITE","SQLITE_BUSY","SQLITE_ERROR","SQLITE_IOERR","SQLITE_IOERR_ACCESS","SQLITE_IOERR_CLOSE","SQLITE_IOERR_DELETE","SQLITE_IOERR_FSYNC","SQLITE_IOERR_LOCK","SQLITE_IOERR_READ","SQLITE_IOERR_SHORT_READ","SQLITE_IOERR_TRUNCATE","SQLITE_IOERR_UNLOCK","SQLITE_IOERR_WRITE","SQLITE_LOCK_EXCLUSIVE","SQLITE_LOCK_NONE","SQLITE_LOCK_PENDING","SQLITE_LOCK_RESERVED","SQLITE_LOCK_SHARED","SQLITE_LOCKED","SQLITE_MISUSE","SQLITE_NOTFOUND","SQLITE_OPEN_CREATE","SQLITE_OPEN_DELETEONCLOSE","SQLITE_OPEN_MAIN_DB","SQLITE_OPEN_READONLY"].forEach((e=>{void 0===(x.sq3Codes[e]=u[e])&&_("Maintenance required: not found:",e)})),x.opfsFlags=Object.assign(Object.create(null),{OPFS_UNLOCK_ASAP:1,defaultUnlockAsap:!1});const I=(e,...t)=>{const r=x.opIds[e]||_("Invalid op ID:",e);x.s11n.serialize(...t),Atomics.store(x.sabOPView,x.opIds.rc,-1),Atomics.store(x.sabOPView,x.opIds.whichOp,r),Atomics.notify(x.sabOPView,x.opIds.whichOp);const n=performance.now();Atomics.wait(x.sabOPView,x.opIds.rc,-1);const s=Atomics.load(x.sabOPView,x.opIds.rc);if(T[e].wait+=performance.now()-n,s&&x.asyncS11nExceptions){const t=x.s11n.deserialize();t&&c(e+"() async error:",...t)}return s};g.debug={asyncShutdown:()=>{l("Shutting down OPFS async listener. The OPFS VFS will no longer work."),I("opfs-async-shutdown")},asyncRestart:()=>{l("Attempting to restart OPFS VFS async listener. Might work, might not."),E.postMessage({type:"opfs-async-restart"})}};const k=function e(t=16){e._chars||(e._n=(e._chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012346789").length);const r=[];let n=0;for(;n{O.start=performance.now(),O.op=e,++T[e].count},L=()=>T[O.op].time+=performance.now()-O.start,C={xCheckReservedLock:function(e,t){const r=F[e];return f.poke(t,r.lockType?1:0,"i32"),0},xClose:function(e){P("xClose");let t=0;const r=F[e];return r&&(delete F[e],t=I("xClose",e),r.sq3File&&r.sq3File.dispose()),L(),t},xDeviceCharacteristics:function(e){return u.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,r){return u.SQLITE_NOTFOUND},xFileSize:function(e,t){P("xFileSize");let r=I("xFileSize",e);if(0==r)try{const e=x.s11n.deserialize()[0];f.poke(t,e,"i64")}catch(e){c("Unexpected error reading xFileSize() result:",e),r=x.sq3Codes.SQLITE_IOERR}return L(),r},xLock:function(e,t){P("xLock");const r=F[e];let n=0;return r.lockType?r.lockType=t:(n=I("xLock",e,t),0===n&&(r.lockType=t)),L(),n},xRead:function(e,t,r,n){P("xRead");const s=F[e];let i;try{i=I("xRead",e,r,Number(n)),0!==i&&u.SQLITE_IOERR_SHORT_READ!==i||f.heap8u().set(s.sabView.subarray(0,r),t)}catch(e){c("xRead(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_READ}return L(),i},xSync:function(e,t){P("xSync"),++T.xSync.count;const r=I("xSync",e,t);return L(),r},xTruncate:function(e,t){P("xTruncate");const r=I("xTruncate",e,Number(t));return L(),r},xUnlock:function(e,t){P("xUnlock");const r=F[e];let n=0;return u.SQLITE_LOCK_NONE===t&&r.lockType&&(n=I("xUnlock",e,t)),0===n&&(r.lockType=t),L(),n},xWrite:function(e,t,r,n){P("xWrite");const s=F[e];let i;try{s.sabView.set(f.heap8u().subarray(t,t+r)),i=I("xWrite",e,r,Number(n))}catch(e){c("xWrite(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_WRITE}return L(),i}},N={xAccess:function(e,t,r,n){P("xAccess");const s=I("xAccess",f.cstrToJs(t));return f.poke(n,s?0:1,"i32"),L(),0},xCurrentTime:function(e,t){return f.poke(t,2440587.5+(new Date).getTime()/864e5,"double"),0},xCurrentTimeInt64:function(e,t){return f.poke(t,21086676e7+(new Date).getTime(),"i64"),0},xDelete:function(e,t,r){P("xDelete");const n=I("xDelete",f.cstrToJs(t),r,!1);return L(),n},xFullPathname:function(e,t,r,n){return f.cstrncpy(n,t,r)!!e)):r},g.getDirForFilename=async function(e,t=!1){const r=g.getResolvedPath(e,!0),n=r.pop();let s=g.rootDirectory;for(const e of r)e&&(s=await s.getDirectoryHandle(e,{create:!!t}));return[s,n]},g.mkdir=async function(e){try{return await g.getDirForFilename(e+"/filepart",!0),!0}catch(e){return!1}},g.entryExists=async function(e){try{const[t,r]=await g.getDirForFilename(e);return await t.getFileHandle(r),!0}catch(e){return!1}},g.randomFilename=k,g.registerVfs=(e=!1)=>f.exports.sqlite3_vfs_register(y.pointer,e?1:0),g.treeList=async function(){const e=Object.create(null);return await async function e(t,r){r.name=t.name,r.dirs=[],r.files=[];for await(const n of t.values())if("directory"===n.kind){const t=Object.create(null);r.dirs.push(t),await e(n,t)}else r.files.push(n.name)}(g.rootDirectory,e),e},g.rmfr=async function(){const e=g.rootDirectory,t={recurse:!0};for await(const r of e.values())e.removeEntry(r.name,t)},g.unlink=async function(e,t=!1,r=!1){try{const[r,n]=await g.getDirForFilename(e,!1);return await r.removeEntry(n,{recursive:t}),!0}catch(e){if(r)throw new Error("unlink(",arguments[0],") failed: "+e.message,{cause:e});return!1}},g.traverse=async function(e){const t={recursive:!0,directory:g.rootDirectory};"function"==typeof e&&(e={callback:e}),async function t(r,n){for await(const s of r.values()){if(!1===e.callback(s,r,n))return!1;if(e.recursive&&"directory"===s.kind&&!1===await t(s,n+1))break}}((e=Object.assign(t,e||{})).directory,0)},g.importDb=async function(e,t){if(t instanceof Function)return async function(e,t){const[r,n]=await g.getDirForFilename(e,!0),s=await r.getFileHandle(n,{create:!0});let i,o=await s.createSyncAccessHandle(),a=0,l=!1;try{for(o.truncate(0);void 0!==(i=await t());)i instanceof ArrayBuffer&&(i=new Uint8Array(i)),0===a&&i.byteLength>=15&&(d.affirmDbHeader(i),l=!0),o.write(i,{at:a}),a+=i.byteLength;if((a<512||0!=a%512)&&_("Input size",a,"is not correct for an SQLite database."),!l){const e=new Uint8Array(20);o.read(e,{at:0}),d.affirmDbHeader(e)}return o.write(new Uint8Array([1,1]),{at:18}),a}catch(e){throw await o.close(),o=void 0,await r.removeEntry(n).catch((()=>{})),e}finally{o&&await o.close()}}(e,t);t instanceof ArrayBuffer&&(t=new Uint8Array(t)),d.affirmIsDb(t);const r=t.byteLength,[n,s]=await g.getDirForFilename(e,!0);let i,o=0;try{const e=await n.getFileHandle(s,{create:!0});return i=await e.createSyncAccessHandle(),i.truncate(0),o=i.write(t,{at:0}),o!=r&&_("Expected to write "+r+" bytes but wrote "+o+"."),i.write(new Uint8Array([1,1]),{at:18}),o}catch(e){throw i&&(await i.close(),i=void 0),await n.removeEntry(s).catch((()=>{})),e}finally{i&&await i.close()}},e.oo1){const t=function(...t){const r=e.oo1.DB.dbCtorHelper.normalizeArgs(...t);r.vfs=y.$zName,e.oo1.DB.dbCtorHelper.call(this,r)};t.prototype=Object.create(e.oo1.DB.prototype),e.oo1.OpfsDb=t,t.importDb=g.importDb,e.oo1.DB.dbCtorHelper.setVfsPostOpenSql(y.pointer,(function(e,t){t.capi.sqlite3_busy_timeout(e,1e4),t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}E.onmessage=function({data:t}){switch(t.type){case"opfs-unavailable":v(new Error(t.payload.join(" ")));break;case"opfs-async-loaded":E.postMessage({type:"opfs-async-init",args:x});break;case"opfs-async-inited":if(!0===q)break;try{e.vfs.installVfs({io:{struct:b,methods:C},vfs:{struct:y,methods:N}}),x.sabOPView=new Int32Array(x.sabOP),x.sabFileBufView=new Uint8Array(x.sabIO,0,x.fileBufferSize),x.sabS11nView=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),(()=>{if(x.s11n)return x.s11n;const e=new TextDecoder,t=new TextEncoder("utf-8"),r=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),n=new DataView(x.sabIO,x.sabS11nOffset,x.sabS11nSize);x.s11n=Object.create(null);const s=Object.create(null);s.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},s.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},s.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},s.string={id:4};const i=e=>s[typeof e]||_("Maintenance required: this value type cannot be serialized.",e),o=e=>{switch(e){case s.number.id:return s.number;case s.bigint.id:return s.bigint;case s.boolean.id:return s.boolean;case s.string.id:return s.string;default:_("Invalid type ID:",e)}};x.s11n.deserialize=function(t=!1){++T.s11n.deserialize.count;const s=performance.now(),i=r[0],a=i?[]:null;if(i){const t=[];let s,l,c,_=1;for(s=0;s{E.onerror=E._originalOnError,delete E._originalOnError,e.opfs=g,g.rootDirectory=t,a("End of OPFS sqlite3_vfs setup.",y),w()})).catch(v):w()}catch(e){c(e),v(e)}break;default:{const e="Unexpected message from the OPFS async worker: "+JSON.stringify(t);c(e),v(new Error(e));break}}}}));return i};t.defaultProxyUri="sqlite3-opfs-async-proxy.js",globalThis.sqlite3ApiBootstrap.initializersAsync.push((async e=>{try{let r=t.defaultProxyUri;return e.scriptInfo.sqlite3Dir&&(t.defaultProxyUri=e.scriptInfo.sqlite3Dir+r),t().catch((t=>{e.config.warn("Ignoring inability to install OPFS sqlite3_vfs:",t.message)}))}catch(t){return e.config.error("installOpfsVfs() exception:",t),Promise.reject(t)}}))})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.util.toss,r=e.util.toss3,n=Object.create(null),s=e.capi,i=e.util,o=e.wasm,a=4096,l=s.SQLITE_OPEN_MAIN_DB|s.SQLITE_OPEN_MAIN_JOURNAL|s.SQLITE_OPEN_SUPER_JOURNAL|s.SQLITE_OPEN_WAL,c=".opaque",_=()=>Math.random().toString(36).slice(2),u=new TextDecoder,d=new TextEncoder,f=Object.assign(Object.create(null),{name:"opfs-sahpool",directory:void 0,initialCapacity:6,clearOnInit:!1,verbosity:2}),p=[e.config.error,e.config.warn,e.config.log],m=(e.config.log,e.config.warn),h=(e.config.error,new Map),g=e=>h.get(e),b=(e,t)=>{t?h.set(e,t):h.delete(e)},y=new Map,q=e=>y.get(e),v=(e,t)=>{t?y.set(e,t):y.delete(e)},w={xCheckReservedLock:function(e,t){const r=q(e);return r.log("xCheckReservedLock"),r.storeErr(),o.poke32(t,1),0},xClose:function(e){const t=q(e);t.storeErr();const r=t.getOFileForS3File(e);if(r)try{t.log(`xClose ${r.path}`),t.mapS3FileToOFile(e,!1),r.sah.flush(),r.flags&s.SQLITE_OPEN_DELETEONCLOSE&&t.deletePath(r.path)}catch(e){return t.storeErr(e,s.SQLITE_IOERR)}return 0},xDeviceCharacteristics:function(e){return s.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,r){return s.SQLITE_NOTFOUND},xFileSize:function(e,t){const r=q(e);r.log("xFileSize");const n=r.getOFileForS3File(e).sah.getSize()-a;return o.poke64(t,BigInt(n)),0},xLock:function(e,t){const r=q(e);return r.log(`xLock ${t}`),r.storeErr(),r.getOFileForS3File(e).lockType=t,0},xRead:function(e,t,r,n){const i=q(e);i.storeErr();const l=i.getOFileForS3File(e);i.log(`xRead ${l.path} ${r} @ ${n}`);try{const e=l.sah.read(o.heap8u().subarray(t,t+r),{at:a+Number(n)});return et&&o.poke8(r+t-1,0)}catch(i){return s.SQLITE_NOMEM}finally{o.scopedAllocPop(e)}}return i?i.sqlite3Rc||s.SQLITE_IOERR:0},xOpen:function(e,r,n,i,a){const l=g(e);try{l.log(`xOpen ${o.cstrToJs(r)} ${i}`);const e=r&&o.peek8(r)?l.getPath(r):_();let c=l.getSAHForPath(e);!c&&i&s.SQLITE_OPEN_CREATE&&(l.getFileCount()b(n.pointer,0))),a&&(n.$xRandomness=a.$xRandomness,n.$xSleep=a.$xSleep,a.dispose()),n.$xRandomness||S.xRandomness||(S.xRandomness=function(e,t,r){const n=o.heap8u();let s=0;for(;s0),e.vfs.installVfs({vfs:{struct:n,methods:S}}),n}(this.vfsName),b(this.#c.pointer,this),this.vfsDir=t.directory||"."+this.vfsName,this.#l=new DataView(this.#a.buffer,this.#a.byteOffset),this.isReady=this.reset(!!(t.clearOnInit??f.clearOnInit)).then((()=>{if(this.$error)throw this.$error;return this.getCapacity()?Promise.resolve(void 0):this.addCapacity(t.initialCapacity||f.initialCapacity)}))}#u(e,...t){this.#_>e&&p[e](this.vfsName+":",...t)}log(...e){this.#u(2,...e)}warn(...e){this.#u(1,...e)}error(...e){this.#u(0,...e)}getVfs(){return this.#c}getCapacity(){return this.#n.size}getFileCount(){return this.#s.size}getFileNames(){const e=[],t=this.#s.keys();for(const r of t)e.push(r);return e}async addCapacity(e){for(let t=0;t{try{const n=await r.createSyncAccessHandle();if(this.#n.set(n,t),e)n.truncate(a),this.setAssociatedPath(n,"",0);else{const e=this.getAssociatedPath(n);e?this.#s.set(e,n):this.#i.add(n)}}catch(e){throw this.storeErr(e),this.releaseAccessHandles(),e}})))}getAssociatedPath(e){e.read(this.#a,{at:0});const t=this.#l.getUint32(512);if(this.#a[0]&&(t&s.SQLITE_OPEN_DELETEONCLOSE||!(t&l)))return m(`Removing file with unexpected flags ${t.toString(16)}`,this.#a),this.setAssociatedPath(e,"",0),"";const r=new Uint32Array(2);e.read(r,{at:516});const n=this.computeDigest(this.#a);if(r.every(((e,t)=>e===n[t]))){const t=this.#a.findIndex((e=>0===e));return 0===t&&e.truncate(a),t?u.decode(this.#a.subarray(0,t)):""}return m("Disassociating file with bad digest."),this.setAssociatedPath(e,"",0),""}setAssociatedPath(e,r,n){const s=d.encodeInto(r,this.#a);512<=s.written+1&&t("Path too long:",r),this.#a.fill(0,s.written,512),this.#l.setUint32(512,n);const i=this.computeDigest(this.#a);e.write(this.#a,{at:0}),e.write(i,{at:516}),e.flush(),r?(this.#s.set(r,e),this.#i.delete(e)):(e.truncate(a),this.#i.add(e))}computeDigest(e){let t=3735928559,r=1103547991;for(const n of e)t=31*t+307*n,r=31*r+307*n;return new Uint32Array([t>>>0,r>>>0])}async reset(e){await this.isReady;let t,r=await navigator.storage.getDirectory();for(const e of this.vfsDir.split("/"))e&&(t=r,r=await r.getDirectoryHandle(e,{create:!0}));return this.#e=r,this.#r=t,this.#t=await this.#e.getDirectoryHandle(c,{create:!0}),this.releaseAccessHandles(),this.acquireAccessHandles(e)}getPath(e){return o.isPtr(e)&&(e=o.cstrToJs(e)),(e instanceof URL?e:new URL(e,"file://localhost/")).pathname}deletePath(e){const t=this.#s.get(e);return t&&(this.#s.delete(e),this.setAssociatedPath(t,"",0)),!!t}storeErr(e,t){return e&&(e.sqlite3Rc=t||s.SQLITE_IOERR,this.error(e)),this.$error=e,t}popErr(){const e=this.$error;return this.$error=void 0,e}nextAvailableSAH(){const[e]=this.#i.keys();return e}getOFileForS3File(e){return this.#o.get(e)}mapS3FileToOFile(e,t){t?(this.#o.set(e,t),v(e,this)):(this.#o.delete(e),v(e,!1))}hasFilename(e){return this.#s.has(e)}getSAHForPath(e){return this.#s.get(e)}async removeVfs(){if(!this.#c.pointer||!this.#t)return!1;s.sqlite3_vfs_unregister(this.#c.pointer),this.#c.dispose();try{this.releaseAccessHandles(),await this.#e.removeEntry(c,{recursive:!0}),this.#t=void 0,await this.#r.removeEntry(this.#e.name,{recursive:!0}),this.#e=this.#r=void 0}catch(t){e.config.error(this.vfsName,"removeVfs() failed:",t)}return!0}exportFile(e){const r=this.#s.get(e)||t("File not found:",e),n=r.getSize()-a,s=new Uint8Array(n>0?n:0);if(n>0){const e=r.read(s,{at:a});e!=n&&t("Expected to read "+n+" bytes but read "+e+".")}return s}async importDbChunked(e,r){const n=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to.");n.truncate(0);let o,l=0,c=!1;try{for(;void 0!==(o=await r());)o instanceof ArrayBuffer&&(o=new Uint8Array(o)),0===l&&o.byteLength>=15&&(i.affirmDbHeader(o),c=!0),n.write(o,{at:a+l}),l+=o.byteLength;if((l<512||0!=l%512)&&t("Input size",l,"is not correct for an SQLite database."),!c){const e=new Uint8Array(20);n.read(e,{at:0}),i.affirmDbHeader(e)}n.write(new Uint8Array([1,1]),{at:4114})}catch(e){throw this.setAssociatedPath(n,"",0),e}return this.setAssociatedPath(n,e,s.SQLITE_OPEN_MAIN_DB),l}importDb(e,r){if(r instanceof ArrayBuffer)r=new Uint8Array(r);else if(r instanceof Function)return this.importDbChunked(e,r);const n=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to."),i=r.byteLength;(i<512||i%512!=0)&&t("Byte array size is invalid for an SQLite db.");for(let e=0;e<15;++e)"SQLite format 3".charCodeAt(e)!==r[e]&&t("Input does not contain an SQLite database header.");const o=n.write(r,{at:a});return o!=i?(this.setAssociatedPath(n,"",0),t("Expected to write "+i+" bytes but wrote "+o+".")):(n.write(new Uint8Array([1,1]),{at:4114}),this.setAssociatedPath(n,e,s.SQLITE_OPEN_MAIN_DB)),o}}class x{#d;constructor(e){this.#d=e,this.vfsName=e.vfsName}async addCapacity(e){return this.#d.addCapacity(e)}async reduceCapacity(e){return this.#d.reduceCapacity(e)}getCapacity(){return this.#d.getCapacity(this.#d)}getFileCount(){return this.#d.getFileCount()}getFileNames(){return this.#d.getFileNames()}async reserveMinimumCapacity(e){const t=this.#d.getCapacity();return t{const e=await navigator.storage.getDirectory(),r=".opfs-sahpool-sync-check-"+_(),n=await e.getFileHandle(r,{create:!0}),s=(await n.createSyncAccessHandle()).close();return await s,await e.removeEntry(r),s?.then&&t("The local OPFS API is too old for opfs-sahpool:","it has an async FileSystemSyncAccessHandle.close() method."),!0})().then((async function(){if(r.$testThrowInInit)throw r.$testThrowInInit;const t=new A(r);return t.isReady.then((async()=>{const r=new x(t);if(e.oo1){const n=e.oo1,s=t.getVfs(),i=function(...e){const t=n.DB.dbCtorHelper.normalizeArgs(...e);t.vfs=s.$zName,n.DB.dbCtorHelper.call(this,t)};i.prototype=Object.create(n.DB.prototype),r.OpfsSAHPoolDb=i,n.DB.dbCtorHelper.setVfsPostOpenSql(s.pointer,(function(e,t){t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}return t.log("VFS initialized."),r})).catch((async e=>(await t.removeVfs().catch((()=>{})),e)))})).catch((e=>n[s]=Promise.reject(e))):n[s]=Promise.reject(new Error("Missing required OPFS APIs."))}})),void 0!==e){const t=Object.assign(Object.create(null),{exports:void 0===Re?e.asm:Re,memory:e.wasmMemory},globalThis.sqlite3ApiConfig||{});let r;globalThis.sqlite3ApiConfig=t;try{r=globalThis.sqlite3ApiBootstrap()}catch(e){throw console.error("sqlite3ApiBootstrap() error:",e),e}finally{delete globalThis.sqlite3ApiBootstrap,delete globalThis.sqlite3ApiConfig}e.sqlite3=r}else console.warn("This is not running in an Emscripten module context, so","globalThis.sqlite3ApiBootstrap() is _not_ being called due to lack","of config info for the WASM environment.","It must be called manually.")})),t.ready});const n=function(){const e=t;if(!e)throw new Error("Expecting globalThis.sqlite3InitModule to be defined by the Emscripten build.");const r=globalThis.sqlite3InitModuleState=Object.assign(Object.create(null),{moduleScript:globalThis?.document?.currentScript,isWorker:"undefined"!=typeof WorkerGlobalScope,location:globalThis.location,urlParams:globalThis?.location?.href?new URL(globalThis.location.href).searchParams:new URLSearchParams});if(r.debugModule=r.urlParams.has("sqlite3.debugModule")?(...e)=>console.warn("sqlite3.debugModule:",...e):()=>{},r.urlParams.has("sqlite3.dir"))r.sqlite3Dir=r.urlParams.get("sqlite3.dir")+"/";else if(r.moduleScript){const e=r.moduleScript.src.split("/");e.pop(),r.sqlite3Dir=e.join("/")+"/"}if(globalThis.sqlite3InitModule=function t(...n){return e(...n).then((e=>{const n=e.sqlite3;n.scriptInfo=r,t.__isUnderTest&&(n.__isUnderTest=!0);const s=n.asyncPostInit;return delete n.asyncPostInit,s()})).catch((e=>{throw console.error("Exception loading sqlite3 module:",e),e}))},globalThis.sqlite3InitModule.ready=e.ready,globalThis.sqlite3InitModuleState.moduleScript){const e=globalThis.sqlite3InitModuleState;let t=e.moduleScript.src.split("/");t.pop(),e.scriptDir=t.join("/")+"/"}return r.debugModule("sqlite3InitModuleState =",r),globalThis.sqlite3InitModule}();(t=n)().then((e=>e.initWorker1API()))})()})(); \ No newline at end of file +(()=>{"use strict";var e={8168:(e,t,r)=>{e.exports=r.p+"4fb34c1567962ff5a6c9.wasm"}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.m=e,r.u=e=>e+".bundle.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var s=n.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=n[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.b=self.location+"";var n,s=(n="file:///home/mmom/src/rlayers/node_modules/sqlite-wasm-http/deps/dist/sqlite3-bundler-friendly.mjs",function(e={}){var t,s,i=e;i.ready=new Promise(((e,r)=>{t=e,s=r})),["_malloc","_free","_realloc","_sqlite3_aggregate_context","_sqlite3_auto_extension","_sqlite3_bind_blob","_sqlite3_bind_double","_sqlite3_bind_int","_sqlite3_bind_int64","_sqlite3_bind_null","_sqlite3_bind_parameter_count","_sqlite3_bind_parameter_index","_sqlite3_bind_pointer","_sqlite3_bind_text","_sqlite3_busy_handler","_sqlite3_busy_timeout","_sqlite3_cancel_auto_extension","_sqlite3_changes","_sqlite3_changes64","_sqlite3_clear_bindings","_sqlite3_close_v2","_sqlite3_collation_needed","_sqlite3_column_blob","_sqlite3_column_bytes","_sqlite3_column_count","_sqlite3_column_double","_sqlite3_column_int","_sqlite3_column_int64","_sqlite3_column_name","_sqlite3_column_text","_sqlite3_column_type","_sqlite3_column_value","_sqlite3_commit_hook","_sqlite3_compileoption_get","_sqlite3_compileoption_used","_sqlite3_complete","_sqlite3_context_db_handle","_sqlite3_create_collation","_sqlite3_create_collation_v2","_sqlite3_create_function","_sqlite3_create_function_v2","_sqlite3_create_module","_sqlite3_create_module_v2","_sqlite3_create_window_function","_sqlite3_data_count","_sqlite3_db_filename","_sqlite3_db_handle","_sqlite3_db_name","_sqlite3_db_status","_sqlite3_declare_vtab","_sqlite3_deserialize","_sqlite3_drop_modules","_sqlite3_errcode","_sqlite3_errmsg","_sqlite3_error_offset","_sqlite3_errstr","_sqlite3_exec","_sqlite3_expanded_sql","_sqlite3_extended_errcode","_sqlite3_extended_result_codes","_sqlite3_file_control","_sqlite3_finalize","_sqlite3_free","_sqlite3_get_auxdata","_sqlite3_initialize","_sqlite3_keyword_count","_sqlite3_keyword_name","_sqlite3_keyword_check","_sqlite3_last_insert_rowid","_sqlite3_libversion","_sqlite3_libversion_number","_sqlite3_limit","_sqlite3_malloc","_sqlite3_malloc64","_sqlite3_msize","_sqlite3_open","_sqlite3_open_v2","_sqlite3_overload_function","_sqlite3_prepare_v2","_sqlite3_prepare_v3","_sqlite3_preupdate_blobwrite","_sqlite3_preupdate_count","_sqlite3_preupdate_depth","_sqlite3_preupdate_hook","_sqlite3_preupdate_new","_sqlite3_preupdate_old","_sqlite3_progress_handler","_sqlite3_randomness","_sqlite3_realloc","_sqlite3_realloc64","_sqlite3_reset","_sqlite3_reset_auto_extension","_sqlite3_result_blob","_sqlite3_result_double","_sqlite3_result_error","_sqlite3_result_error_code","_sqlite3_result_error_nomem","_sqlite3_result_error_toobig","_sqlite3_result_int","_sqlite3_result_int64","_sqlite3_result_null","_sqlite3_result_pointer","_sqlite3_result_subtype","_sqlite3_result_text","_sqlite3_result_zeroblob","_sqlite3_result_zeroblob64","_sqlite3_rollback_hook","_sqlite3_serialize","_sqlite3_set_authorizer","_sqlite3_set_auxdata","_sqlite3_set_last_insert_rowid","_sqlite3_shutdown","_sqlite3_sourceid","_sqlite3_sql","_sqlite3_status","_sqlite3_status64","_sqlite3_step","_sqlite3_stmt_isexplain","_sqlite3_stmt_readonly","_sqlite3_stmt_status","_sqlite3_strglob","_sqlite3_stricmp","_sqlite3_strlike","_sqlite3_strnicmp","_sqlite3_table_column_metadata","_sqlite3_total_changes","_sqlite3_total_changes64","_sqlite3_trace_v2","_sqlite3_txn_state","_sqlite3_update_hook","_sqlite3_uri_boolean","_sqlite3_uri_int64","_sqlite3_uri_key","_sqlite3_uri_parameter","_sqlite3_user_data","_sqlite3_value_blob","_sqlite3_value_bytes","_sqlite3_value_double","_sqlite3_value_dup","_sqlite3_value_free","_sqlite3_value_frombind","_sqlite3_value_int","_sqlite3_value_int64","_sqlite3_value_nochange","_sqlite3_value_numeric_type","_sqlite3_value_pointer","_sqlite3_value_subtype","_sqlite3_value_text","_sqlite3_value_type","_sqlite3_vfs_find","_sqlite3_vfs_register","_sqlite3_vfs_unregister","_sqlite3_vtab_collation","_sqlite3_vtab_distinct","_sqlite3_vtab_in","_sqlite3_vtab_in_first","_sqlite3_vtab_in_next","_sqlite3_vtab_nochange","_sqlite3_vtab_on_conflict","_sqlite3_vtab_rhs_value","_sqlite3changegroup_add","_sqlite3changegroup_add_strm","_sqlite3changegroup_delete","_sqlite3changegroup_new","_sqlite3changegroup_output","_sqlite3changegroup_output_strm","_sqlite3changeset_apply","_sqlite3changeset_apply_strm","_sqlite3changeset_apply_v2","_sqlite3changeset_apply_v2_strm","_sqlite3changeset_concat","_sqlite3changeset_concat_strm","_sqlite3changeset_conflict","_sqlite3changeset_finalize","_sqlite3changeset_fk_conflicts","_sqlite3changeset_invert","_sqlite3changeset_invert_strm","_sqlite3changeset_new","_sqlite3changeset_next","_sqlite3changeset_old","_sqlite3changeset_op","_sqlite3changeset_pk","_sqlite3changeset_start","_sqlite3changeset_start_strm","_sqlite3changeset_start_v2","_sqlite3changeset_start_v2_strm","_sqlite3session_attach","_sqlite3session_changeset","_sqlite3session_changeset_size","_sqlite3session_changeset_strm","_sqlite3session_config","_sqlite3session_create","_sqlite3session_delete","_sqlite3session_diff","_sqlite3session_enable","_sqlite3session_indirect","_sqlite3session_isempty","_sqlite3session_memory_used","_sqlite3session_object_config","_sqlite3session_patchset","_sqlite3session_patchset_strm","_sqlite3session_table_filter","_sqlite3_wasm_pstack_ptr","_sqlite3_wasm_pstack_restore","_sqlite3_wasm_pstack_alloc","_sqlite3_wasm_pstack_remaining","_sqlite3_wasm_pstack_quota","_sqlite3_wasm_db_error","_sqlite3_wasm_test_struct","_sqlite3_wasm_enum_json","_sqlite3_wasm_vfs_unlink","_sqlite3_wasm_db_vfs","_sqlite3_wasm_db_reset","_sqlite3_wasm_db_export_chunked","_sqlite3_wasm_db_serialize","_sqlite3_wasm_vfs_create_file","_sqlite3_wasm_posix_create_file","_sqlite3_wasm_kvvfsMakeKeyOnPstack","_sqlite3_wasm_kvvfs_methods","_sqlite3_wasm_vtab_config","_sqlite3_wasm_db_config_ip","_sqlite3_wasm_db_config_pii","_sqlite3_wasm_db_config_s","_sqlite3_wasm_config_i","_sqlite3_wasm_config_ii","_sqlite3_wasm_config_j","_sqlite3_wasm_init_wasmfs","_sqlite3_wasm_test_intptr","_sqlite3_wasm_test_voidptr","_sqlite3_wasm_test_int64_max","_sqlite3_wasm_test_int64_min","_sqlite3_wasm_test_int64_times2","_sqlite3_wasm_test_int64_minmax","_sqlite3_wasm_test_int64ptr","_sqlite3_wasm_test_stack_overflow","_sqlite3_wasm_test_str_hello","_sqlite3_wasm_SQLTester_strglob","___indirect_function_table","_fflush","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(i.ready,e)||Object.defineProperty(i.ready,e,{get:()=>G("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>G("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));const o=globalThis.sqlite3InitModuleState||Object.assign(Object.create(null),{debugModule:()=>{}});delete globalThis.sqlite3InitModuleState,o.debugModule("globalThis.location =",globalThis.location);const a="emscripten-bug-17951";i[a]=function e(t,r){t.env.foo=function(){};const n=i.locateFile(e.uri,void 0===g?"":g);o.debugModule("instantiateWasm() uri =",n);const s=()=>fetch(n,{credentials:"same-origin"});return(WebAssembly.instantiateStreaming?async()=>WebAssembly.instantiateStreaming(s(),t).then((e=>r(e.instance,e.module))):async()=>s().then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,t))).then((e=>r(e.instance,e.module))))(),{}},i[a].uri="sqlite3.wasm";var l=Object.assign({},i),c="./this.program",_="object"==typeof window,u="function"==typeof importScripts,d="object"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions&&"string"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions.node,f=!_&&!d&&!u;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var p,m,h,g="";if(f){if("function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(p=read),h=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let t=read(e,"binary");return O("object"==typeof t),t},m=(e,t,r)=>{setTimeout((()=>t(h(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():G()),"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!_&&!u)throw new Error("environment detection error");if(u?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),n&&(g=n),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");p=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),m=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var b,y,q,w=i.print||console.log.bind(console),E=i.printErr||console.error.bind(console);Object.assign(i,l),l=null,b="fetchSettings",Object.getOwnPropertyDescriptor(i,b)&&G(`\`Module.${b}\` was supplied but \`${b}\` not included in INCOMING_MODULE_JS_API`),i.arguments&&i.arguments,Z("arguments","arguments_"),i.thisProgram&&(c=i.thisProgram),Z("thisProgram","thisProgram"),i.quit&&i.quit,Z("quit","quit_"),O(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),O(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),O(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),O(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),O(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Z("asm","wasmExports"),Z("read","read_"),Z("readAsync","readAsync"),Z("readBinary","readBinary"),Z("setWindowTitle","setWindowTitle"),O(!d,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),O(!f,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),i.wasmBinary&&(y=i.wasmBinary),Z("wasmBinary","wasmBinary"),i.noExitRuntime,Z("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,A,x,T,I,k,F=!1;function O(e,t){e||G("Assertion failed"+(t?": "+t:""))}function P(){var e=q.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=x=new Int16Array(e),i.HEAPU8=A=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAP32=T=new Int32Array(e),i.HEAPU32=I=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e),i.HEAP64=k=new BigInt64Array(e),i.HEAPU64=new BigUint64Array(e)}O(!i.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),O("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var L=i.INITIAL_MEMORY||16777216;function C(){if(!F){var e=We();0==e&&(e+=4);var t=I[e>>2],r=I[e+4>>2];34821223==t&&2310721022==r||G(`Stack overflow! Stack cookie has been overwritten at ${se(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${se(r)} ${se(t)}`),1668509029!=I[0]&&G("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Z("INITIAL_MEMORY","INITIAL_MEMORY"),O(L>=524288,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+L+"! (STACK_SIZE=524288)"),q=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:L/65536,maximum:32768}),P(),O((L=q.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var N=[],D=[],R=[],M=!1;O(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var j=0,U=null,B=null,z={};function W(e){for(var t=e;;){if(!z[e])return e;e=t+Math.random()}}function H(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(!z[e]),z[e]=1,null===U&&"undefined"!=typeof setInterval&&(U=setInterval((()=>{if(F)return clearInterval(U),void(U=null);var e=!1;for(var t in z)e||(e=!0,E("still waiting on run dependencies:")),E(`dependency: ${t}`);e&&E("(end of list)")}),1e4))):E("warning: run dependency added without ID")}function Q(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(z[e]),delete z[e]):E("warning: run dependency removed without ID"),0==j&&(null!==U&&(clearInterval(U),U=null),B)){var t=B;B=null,t()}}function G(e){i.onAbort&&i.onAbort(e),E(e="Aborted("+e+")"),F=!0;var t=new WebAssembly.RuntimeError(e);throw s(t),t}var V,$;function K(e){return e.startsWith("data:application/octet-stream;base64,")}function J(e){return function(){O(M,`native function \`${e}\` called before runtime initialization`);var t=Re[e];return O(t,`exported native function \`${e}\` not found`),t.apply(null,arguments)}}function Y(e){if(e==V&&y)return new Uint8Array(y);if(h)return h(e);throw"both async and sync fetching of the wasm failed"}function X(e,t,r){return function(e){return y||!_&&!u||"function"!=typeof fetch?Promise.resolve().then((()=>Y(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Y(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),V.startsWith("file://")&&E(`warning: Loading from a file URI (${V}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),G(e)}))}function Z(e,t,r=!0){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){G(`\`Module.${e}\` has been replaced by \`${t}\``+(r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ee(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function te(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){ie("`"+e+"` is not longer defined by emscripten. "+t)}})}function re(e){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),G(t)}})}i.locateFile?K(V="sqlite3.wasm")||($=V,V=i.locateFile?i.locateFile($,g):g+$):V=new URL(r(8168),r.b).href,te("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),te("asm","Please use wasmExports instead");var ne=e=>{for(;e.length>0;)e.shift()(i)},se=e=>(O("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),ie=e=>{ie.shown||(ie.shown={}),ie.shown[e]||(ie.shown[e]=1,E(e))},oe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var s=e[n];"."===s?e.splice(n,1):".."===s?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=oe.isAbs(e),r="/"===e.substr(-1);return(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=oe.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=oe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return oe.normalize(e.join("/"))},join2:(e,t)=>oe.normalize(e+"/"+t)},ae=e=>(ae=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);G("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),le={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ee.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=oe.isAbs(n)}return(t?"/":"")+(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=le.resolve(e).substr(1),t=le.resolve(t).substr(1);for(var n=r(e.split("/")),s=r(t.split("/")),i=Math.min(n.length,s.length),o=i,a=0;a{for(var n=t+r,s=t;e[s]&&!(s>=n);)++s;if(s-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,s));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i},ue=[],de=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},fe=(e,t,r,n)=>{if(O("string"==typeof e),!(n>0))return 0;for(var s=r,i=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=i)break;t[r++]=a}else if(a<=2047){if(r+1>=i)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=i)break;a>1114111&&ie("Invalid Unicode code point "+se(a)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-s};function pe(e,t,r){var n=r>0?r:de(e)+1,s=new Array(n),i=fe(e,s,0,s.length);return t&&(s.length=i),s}var me,he={ttys:[],init(){},shutdown(){},register(e,t){he.ttys[e]={input:[],output:[],ops:t},Ee.registerDevice(e,he.stream_ops)},stream_ops:{open(e){var t=he.ttys[e.node.rdev];if(!t)throw new Ee.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,s){if(!e.tty||!e.tty.ops.get_char)throw new Ee.ErrnoError(60);for(var i=0,o=0;o(()=>{if(!ue.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ue=pe(e,!0)}return ue.shift()})(),put_char(e,t){null===t||10===t?(w(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(_e(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(E(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(_e(e.output,0)),e.output=[])}}},ge=e=>{e=((e,t)=>(O(t,"alignment argument is required"),Math.ceil(e/t)*t))(e,65536);var t=Be(65536,e);return t?((e,t)=>(A.fill(0,e,e+t),e))(t,e):0},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Ee.isBlkdev(r)||Ee.isFIFO(r))throw new Ee.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:Ee.chrdev_stream_ops}});var s=Ee.createNode(e,t,r,n);return Ee.isDir(s.mode)?(s.node_ops=be.ops_table.dir.node,s.stream_ops=be.ops_table.dir.stream,s.contents={}):Ee.isFile(s.mode)?(s.node_ops=be.ops_table.file.node,s.stream_ops=be.ops_table.file.stream,s.usedBytes=0,s.contents=null):Ee.isLink(s.mode)?(s.node_ops=be.ops_table.link.node,s.stream_ops=be.ops_table.link.stream):Ee.isChrdev(s.mode)&&(s.node_ops=be.ops_table.chrdev.node,s.stream_ops=be.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Ee.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ee.isDir(e.mode)?t.size=4096:Ee.isFile(e.mode)?t.size=e.usedBytes:Ee.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw Ee.genericErrors[44]},mknod:(e,t,r,n)=>be.createNode(e,t,r,n),rename(e,t,r){if(Ee.isDir(e.mode)){var n;try{n=Ee.lookupNode(t,r)}catch(e){}if(n)for(var s in n.contents)throw new Ee.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Ee.lookupNode(e,t);for(var n in r.contents)throw new Ee.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=be.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Ee.isLink(e.mode))throw new Ee.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,s){var i=e.node.contents;if(s>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-s,n);if(O(o>=0),o>8&&i.subarray)t.set(i.subarray(s,s+o),r);else for(var a=0;a0||r+t(be.stream_ops.write(e,t,0,n,r,!1),0)}},ye=i.preloadPlugins||[],qe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},ve={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},we={},Ee={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=le.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Ee.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Ee.root,s="/",i=0;i40)throw new Ee.ErrnoError(32)}}return{path:s,node:n}},getPath(e){for(var t;;){if(Ee.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%Ee.nameTable.length},hashAddNode(e){var t=Ee.hashName(e.parent.id,e.name);e.name_next=Ee.nameTable[t],Ee.nameTable[t]=e},hashRemoveNode(e){var t=Ee.hashName(e.parent.id,e.name);if(Ee.nameTable[t]===e)Ee.nameTable[t]=e.name_next;else for(var r=Ee.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Ee.mayLookup(e);if(r)throw new Ee.ErrnoError(r,e);for(var n=Ee.hashName(e.id,t),s=Ee.nameTable[n];s;s=s.name_next){var i=s.name;if(s.parent.id===e.id&&i===t)return s}return Ee.lookup(e,t)},createNode(e,t,r,n){O("object"==typeof e);var s=new Ee.FSNode(e,t,r,n);return Ee.hashAddNode(s),s},destroyNode(e){Ee.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Ee.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>Ee.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,t){try{return Ee.lookupNode(e,t),20}catch(e){}return Ee.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Ee.lookupNode(e,t)}catch(e){return e.errno}var s=Ee.nodePermissions(e,"wx");if(s)return s;if(r){if(!Ee.isDir(n.mode))return 54;if(Ee.isRoot(n)||Ee.getPath(n)===Ee.cwd())return 10}else if(Ee.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Ee.isLink(e.mode)?32:Ee.isDir(e.mode)&&("r"!==Ee.flagsToPermissionString(t)||512&t)?31:Ee.nodePermissions(e,Ee.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ee.MAX_OPEN_FDS;e++)if(!Ee.streams[e])return e;throw new Ee.ErrnoError(33)},getStreamChecked(e){var t=Ee.getStream(e);if(!t)throw new Ee.ErrnoError(8);return t},getStream:e=>Ee.streams[e],createStream:(e,t=-1)=>(Ee.FSStream||(Ee.FSStream=function(){this.shared={}},Ee.FSStream.prototype={},Object.defineProperties(Ee.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Ee.FSStream,e),-1==t&&(t=Ee.nextfd()),e.fd=t,Ee.streams[t]=e,e),closeStream(e){Ee.streams[e]=null},chrdev_stream_ops:{open(e){var t=Ee.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ee.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Ee.devices[e]={stream_ops:t}},getDevice:e=>Ee.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Ee.syncFSRequests++,Ee.syncFSRequests>1&&E(`warning: ${Ee.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Ee.getMounts(Ee.root.mount),n=0;function s(e){return O(Ee.syncFSRequests>0),Ee.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,s(e));++n>=r.length&&s(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,r){if("string"==typeof e)throw e;var n,s="/"===r,i=!r;if(s&&Ee.root)throw new Ee.ErrnoError(10);if(!s&&!i){var o=Ee.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,Ee.isMountpoint(n))throw new Ee.ErrnoError(10);if(!Ee.isDir(n.mode))throw new Ee.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,s?Ee.root=l:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),l},unmount(e){var t=Ee.lookupPath(e,{follow_mount:!1});if(!Ee.isMountpoint(t.node))throw new Ee.ErrnoError(28);var r=t.node,n=r.mounted,s=Ee.getMounts(n);Object.keys(Ee.nameTable).forEach((e=>{for(var t=Ee.nameTable[e];t;){var r=t.name_next;s.includes(t.mount)&&Ee.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);O(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Ee.lookupPath(e,{parent:!0}).node,s=oe.basename(e);if(!s||"."===s||".."===s)throw new Ee.ErrnoError(28);var i=Ee.mayCreate(n,s);if(i)throw new Ee.ErrnoError(i);if(!n.node_ops.mknod)throw new Ee.ErrnoError(63);return n.node_ops.mknod(n,s,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Ee.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Ee.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",s=0;s(void 0===r&&(r=t,t=438),t|=8192,Ee.mknod(e,t,r)),symlink(e,t){if(!le.resolve(e))throw new Ee.ErrnoError(44);var r=Ee.lookupPath(t,{parent:!0}).node;if(!r)throw new Ee.ErrnoError(44);var n=oe.basename(t),s=Ee.mayCreate(r,n);if(s)throw new Ee.ErrnoError(s);if(!r.node_ops.symlink)throw new Ee.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,s=oe.dirname(e),i=oe.dirname(t),o=oe.basename(e),a=oe.basename(t);if(r=Ee.lookupPath(e,{parent:!0}).node,n=Ee.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ee.ErrnoError(44);if(r.mount!==n.mount)throw new Ee.ErrnoError(75);var l,c=Ee.lookupNode(r,o),_=le.relative(e,i);if("."!==_.charAt(0))throw new Ee.ErrnoError(28);if("."!==(_=le.relative(t,s)).charAt(0))throw new Ee.ErrnoError(55);try{l=Ee.lookupNode(n,a)}catch(e){}if(c!==l){var u=Ee.isDir(c.mode),d=Ee.mayDelete(r,o,u);if(d)throw new Ee.ErrnoError(d);if(d=l?Ee.mayDelete(n,a,u):Ee.mayCreate(n,a))throw new Ee.ErrnoError(d);if(!r.node_ops.rename)throw new Ee.ErrnoError(63);if(Ee.isMountpoint(c)||l&&Ee.isMountpoint(l))throw new Ee.ErrnoError(10);if(n!==r&&(d=Ee.nodePermissions(r,"w")))throw new Ee.ErrnoError(d);Ee.hashRemoveNode(c);try{r.node_ops.rename(c,n,a)}catch(e){throw e}finally{Ee.hashAddNode(c)}}},rmdir(e){var t=Ee.lookupPath(e,{parent:!0}).node,r=oe.basename(e),n=Ee.lookupNode(t,r),s=Ee.mayDelete(t,r,!0);if(s)throw new Ee.ErrnoError(s);if(!t.node_ops.rmdir)throw new Ee.ErrnoError(63);if(Ee.isMountpoint(n))throw new Ee.ErrnoError(10);t.node_ops.rmdir(t,r),Ee.destroyNode(n)},readdir(e){var t=Ee.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ee.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Ee.lookupPath(e,{parent:!0}).node;if(!t)throw new Ee.ErrnoError(44);var r=oe.basename(e),n=Ee.lookupNode(t,r),s=Ee.mayDelete(t,r,!1);if(s)throw new Ee.ErrnoError(s);if(!t.node_ops.unlink)throw new Ee.ErrnoError(63);if(Ee.isMountpoint(n))throw new Ee.ErrnoError(10);t.node_ops.unlink(t,r),Ee.destroyNode(n)},readlink(e){var t=Ee.lookupPath(e).node;if(!t)throw new Ee.ErrnoError(44);if(!t.node_ops.readlink)throw new Ee.ErrnoError(28);return le.resolve(Ee.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Ee.lookupPath(e,{follow:!t}).node;if(!r)throw new Ee.ErrnoError(44);if(!r.node_ops.getattr)throw new Ee.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Ee.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?Ee.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Ee.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Ee.chmod(e,t,!0)},fchmod(e,t){var r=Ee.getStreamChecked(e);Ee.chmod(r.node,t)},chown(e,t,r,n){var s;if(!(s="string"==typeof e?Ee.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Ee.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown(e,t,r){Ee.chown(e,t,r,!0)},fchown(e,t,r){var n=Ee.getStreamChecked(e);Ee.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Ee.ErrnoError(28);var r;if(!(r="string"==typeof e?Ee.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Ee.ErrnoError(63);if(Ee.isDir(r.mode))throw new Ee.ErrnoError(31);if(!Ee.isFile(r.mode))throw new Ee.ErrnoError(28);var n=Ee.nodePermissions(r,"w");if(n)throw new Ee.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Ee.getStreamChecked(e);if(!(2097155&r.flags))throw new Ee.ErrnoError(28);Ee.truncate(r.node,t)},utime(e,t,r){var n=Ee.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Ee.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=oe.normalize(e);try{n=Ee.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new Ee.ErrnoError(20)}else n=Ee.mknod(e,r,0),s=!0;if(!n)throw new Ee.ErrnoError(44);if(Ee.isChrdev(n.mode)&&(t&=-513),65536&t&&!Ee.isDir(n.mode))throw new Ee.ErrnoError(54);if(!s){var o=Ee.mayOpen(n,t);if(o)throw new Ee.ErrnoError(o)}512&t&&!s&&Ee.truncate(n,0),t&=-131713;var a=Ee.createStream({node:n,path:Ee.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(Ee.readFiles||(Ee.readFiles={}),e in Ee.readFiles||(Ee.readFiles[e]=1)),a},close(e){if(Ee.isClosed(e))throw new Ee.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ee.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ee.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ee.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,s){if(O(r>=0),n<0||s<0)throw new Ee.ErrnoError(28);if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(1==(2097155&e.flags))throw new Ee.ErrnoError(8);if(Ee.isDir(e.node.mode))throw new Ee.ErrnoError(31);if(!e.stream_ops.read)throw new Ee.ErrnoError(28);var i=void 0!==s;if(i){if(!e.seekable)throw new Ee.ErrnoError(70)}else s=e.position;var o=e.stream_ops.read(e,t,r,n,s);return i||(e.position+=o),o},write(e,t,r,n,s,i){if(O(r>=0),n<0||s<0)throw new Ee.ErrnoError(28);if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(!(2097155&e.flags))throw new Ee.ErrnoError(8);if(Ee.isDir(e.node.mode))throw new Ee.ErrnoError(31);if(!e.stream_ops.write)throw new Ee.ErrnoError(28);e.seekable&&1024&e.flags&&Ee.llseek(e,0,2);var o=void 0!==s;if(o){if(!e.seekable)throw new Ee.ErrnoError(70)}else s=e.position;var a=e.stream_ops.write(e,t,r,n,s,i);return o||(e.position+=a),a},allocate(e,t,r){if(Ee.isClosed(e))throw new Ee.ErrnoError(8);if(t<0||r<=0)throw new Ee.ErrnoError(28);if(!(2097155&e.flags))throw new Ee.ErrnoError(8);if(!Ee.isFile(e.node.mode)&&!Ee.isDir(e.node.mode))throw new Ee.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ee.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,s){if(2&n&&!(2&s)&&2!=(2097155&e.flags))throw new Ee.ErrnoError(2);if(1==(2097155&e.flags))throw new Ee.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ee.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,s)},msync:(e,t,r,n,s)=>(O(r>=0),e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,s):0),munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Ee.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Ee.open(e,t.flags),s=Ee.stat(e).size,i=new Uint8Array(s);return Ee.read(n,i,0,s,0),"utf8"===t.encoding?r=_e(i,0):"binary"===t.encoding&&(r=i),Ee.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=Ee.open(e,r.flags,r.mode);if("string"==typeof t){var s=new Uint8Array(de(t)+1),i=fe(t,s,0,s.length);Ee.write(n,s,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ee.write(n,t,0,t.byteLength,void 0,r.canOwn)}Ee.close(n)},cwd:()=>Ee.currentPath,chdir(e){var t=Ee.lookupPath(e,{follow:!0});if(null===t.node)throw new Ee.ErrnoError(44);if(!Ee.isDir(t.node.mode))throw new Ee.ErrnoError(54);var r=Ee.nodePermissions(t.node,"x");if(r)throw new Ee.ErrnoError(r);Ee.currentPath=t.path},createDefaultDirectories(){Ee.mkdir("/tmp"),Ee.mkdir("/home"),Ee.mkdir("/home/web_user")},createDefaultDevices(){Ee.mkdir("/dev"),Ee.registerDevice(Ee.makedev(1,3),{read:()=>0,write:(e,t,r,n,s)=>n}),Ee.mkdev("/dev/null",Ee.makedev(1,3)),he.register(Ee.makedev(5,0),he.default_tty_ops),he.register(Ee.makedev(6,0),he.default_tty1_ops),Ee.mkdev("/dev/tty",Ee.makedev(5,0)),Ee.mkdev("/dev/tty1",Ee.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ae(e).byteLength),e[--t]);Ee.createDevice("/dev","random",r),Ee.createDevice("/dev","urandom",r),Ee.mkdir("/dev/shm"),Ee.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ee.mkdir("/proc");var e=Ee.mkdir("/proc/self");Ee.mkdir("/proc/self/fd"),Ee.mount({mount(){var t=Ee.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Ee.getStreamChecked(r),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?Ee.createDevice("/dev","stdin",i.stdin):Ee.symlink("/dev/tty","/dev/stdin"),i.stdout?Ee.createDevice("/dev","stdout",null,i.stdout):Ee.symlink("/dev/tty","/dev/stdout"),i.stderr?Ee.createDevice("/dev","stderr",null,i.stderr):Ee.symlink("/dev/tty1","/dev/stderr");var e=Ee.open("/dev/stdin",0),t=Ee.open("/dev/stdout",1),r=Ee.open("/dev/stderr",1);O(0===e.fd,`invalid handle for stdin (${e.fd})`),O(1===t.fd,`invalid handle for stdout (${t.fd})`),O(2===r.fd,`invalid handle for stderr (${r.fd})`)},ensureErrnoError(){Ee.ErrnoError||(Ee.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){for(var t in this.errno=e,we)if(we[t]===e){this.code=t;break}},this.setErrno(e),this.message=ve[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=this.stack.replace(/\b_Z[\w\d_]+/g,(function(e){var t,r=(t=e,ie("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),t);return e===r?e:r+" ["+e+"]"})))},Ee.ErrnoError.prototype=new Error,Ee.ErrnoError.prototype.constructor=Ee.ErrnoError,[44].forEach((e=>{Ee.genericErrors[e]=new Ee.ErrnoError(e),Ee.genericErrors[e].stack=""})))},staticInit(){Ee.ensureErrnoError(),Ee.nameTable=new Array(4096),Ee.mount(be,{},"/"),Ee.createDefaultDirectories(),Ee.createDefaultDevices(),Ee.createSpecialDirectories(),Ee.filesystems={MEMFS:be}},init(e,t,r){O(!Ee.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Ee.init.initialized=!0,Ee.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,Ee.createStandardStreams()},quit(){Ee.init.initialized=!1,Ue(0);for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),s=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;s||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,s=(e+1)*o-1;if(s=Math.min(s,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",r,!1),n!==o&&s.setRequestHeader("Range","bytes="+e+"-"+t),s.responseType="arraybuffer",s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(s.status>=200&&s.status<300||304===s.status))throw new Error("Couldn't load "+r+". Status: "+s.status);return void 0!==s.response?new Uint8Array(s.response||[]):pe(s.responseText||"",!0)})(t,s)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!i&&n||(o=n=1,n=this.getter(0).length,o=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new i;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var l=Ee.createFile(e,t,a,n,s);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={};function _(e,t,r,n,s){var i=e.node.contents;if(s>=i.length)return 0;var o=Math.min(i.length-s,n);if(O(o>=0),i.slice)for(var a=0;a{var t=l.stream_ops[e];c[e]=function(){return Ee.forceLoadFile(l),t.apply(null,arguments)}})),c.read=(e,t,r,n,s)=>(Ee.forceLoadFile(l),_(e,t,r,n,s)),c.mmap=(e,t,r,n,s)=>{Ee.forceLoadFile(l);var i=ge(t);if(!i)throw new Ee.ErrnoError(48);return _(e,S,i,t,r),{ptr:i,allocated:!0}},l.stream_ops=c,l},absolutePath(){G("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){G("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){G("FS.createLink has been removed; use FS.symlink instead")},joinPath(){G("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){G("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){G("FS.standardizePath has been removed; use PATH.normalize instead")}},Se={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(oe.isAbs(t))return t;var n;if(n=-100===e?Ee.cwd():Se.getStreamFromFD(e).path,0==t.length){if(!r)throw new Ee.ErrnoError(44);return n}return oe.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&oe.normalize(t)!==oe.normalize(Ee.getPath(e.node)))return-54;throw e}T[r>>2]=n.dev,T[r+4>>2]=n.mode,I[r+8>>2]=n.nlink,T[r+12>>2]=n.uid,T[r+16>>2]=n.gid,T[r+20>>2]=n.rdev,k[r+24>>3]=BigInt(n.size),T[r+32>>2]=4096,T[r+36>>2]=n.blocks;var s=n.atime.getTime(),i=n.mtime.getTime(),o=n.ctime.getTime();return k[r+40>>3]=BigInt(Math.floor(s/1e3)),I[r+48>>2]=s%1e3*1e3,k[r+56>>3]=BigInt(Math.floor(i/1e3)),I[r+64>>2]=i%1e3*1e3,k[r+72>>3]=BigInt(Math.floor(o/1e3)),I[r+80>>2]=o%1e3*1e3,k[r+88>>3]=BigInt(n.ino),0},doMsync(e,t,r,n,s){if(!Ee.isFile(t.node.mode))throw new Ee.ErrnoError(43);if(2&n)return 0;var i=A.slice(e,e+r);Ee.msync(t,i,s,r,n)},varargs:void 0,get(){O(null!=Se.varargs);var e=T[+Se.varargs>>2];return Se.varargs+=4,e},getp:()=>Se.get(),getStr(e){var t=(e=>(O("number"==typeof e),e?_e(A,e,void 0):""))(e);return t},getStreamFromFD:e=>Ee.getStreamChecked(e)},Ae=e=>e<-9007199254740992||e>9007199254740992?NaN:Number(e),xe=(e,t,r)=>(O("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),fe(e,A,t,r)),Te=e=>I[e>>2]+4294967296*T[e+4>>2],Ie=[0,31,60,91,121,152,182,213,244,274,305,335],ke=[0,31,59,90,120,151,181,212,243,273,304,334],Fe=e=>{var t=de(e)+1,r=je(t);return r&&xe(e,r,t),r};me=()=>performance.now();var Oe=e=>{var t=q.buffer,r=(e-t.byteLength+65535)/65536;try{return q.grow(r),P(),1}catch(r){E(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${r}`)}},Pe={},Le=()=>{if(!Le.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var t in Pe)void 0===Pe[t]?delete e[t]:e[t]=Pe[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Le.strings=r}return Le.strings},Ce=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ee.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Ce.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Ee.isDir(this.mode)}},isDevice:{get:function(){return Ee.isChrdev(this.mode)}}}),Ee.FSNode=Ce,Ee.createPreloadedFile=(e,t,r,n,s,i,o,a,l,c)=>{var _=t?le.resolve(oe.join2(e,t)):e,u=W(`cp ${_}`);function d(r){function d(r){c&&c(),a||((e,t,r,n,s,i)=>{Ee.createDataFile(e,t,r,n,s,i)})(e,t,r,n,s,l),i&&i(),Q(u)}((e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var s=!1;return ye.forEach((i=>{s||i.canHandle(t)&&(i.handle(e,t,r,n),s=!0)})),s})(r,_,d,(()=>{o&&o(),Q(u)}))||d(r)}H(u),"string"==typeof r?((e,t,r)=>{var n=W(`al ${e}`);m(e,(t=>{O(t,`Loading data file "${e}" failed (no arrayBuffer).`),d(new Uint8Array(t)),n&&Q(n)}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&H(n)})(r,0,o):d(r)},Ee.staticInit(),we={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Ne,De={__syscall_chmod:function(e,t){try{return e=Se.getStr(e),Ee.chmod(e,t),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_faccessat:function(e,t,r,n){try{if(t=Se.getStr(t),O(0===n),t=Se.calculateAt(e,t),-8&r)return-28;var s=Ee.lookupPath(t,{follow:!0}).node;if(!s)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&&Ee.nodePermissions(s,i)?-2:0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchmod:function(e,t){try{return Ee.fchmod(e,t),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchown32:function(e,t,r){try{return Ee.fchown(e,t,r),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fcntl64:function(e,t,r){Se.varargs=r;try{var n=Se.getStreamFromFD(e);switch(t){case 0:if((s=Se.get())<0)return-28;for(;Ee.streams[s];)s++;return Ee.createStream(n,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var s=Se.get();return n.flags|=s,0;case 5:return s=Se.getp(),x[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return T[Me()>>2]=28,-1}}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){try{var r=Se.getStreamFromFD(e);return Se.doStat(Ee.stat,r.path,t)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t){t=Ae(t);try{return isNaN(t)?61:(Ee.ftruncate(e,t),0)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getcwd:function(e,t){try{if(0===t)return-28;var r=Ee.cwd(),n=de(r)+1;return t>2]=s.c_iflag||0,T[i+4>>2]=s.c_oflag||0,T[i+8>>2]=s.c_cflag||0,T[i+12>>2]=s.c_lflag||0;for(var o=0;o<32;o++)S[i+o+17|0]=s.c_cc[o]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){i=Se.getp();var a=T[i>>2],l=T[i+4>>2],c=T[i+8>>2],_=T[i+12>>2],u=[];for(o=0;o<32;o++)u.push(S[i+o+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:a,c_oflag:l,c_cflag:c,c_lflag:_,c_cc:u})}return 0;case 21519:return n.tty?(i=Se.getp(),T[i>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return i=Se.getp(),Ee.ioctl(n,t,i);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var d=n.tty.ops.ioctl_tiocgwinsz(n.tty);i=Se.getp(),x[i>>1]=d[0],x[i+2>>1]=d[1]}return 0;default:return-28}}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(Ee.lstat,e,t)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_mkdirat:function(e,t,r){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),"/"===(t=oe.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),Ee.mkdir(t,r,0),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,r,n){try{t=Se.getStr(t);var s=256&n,i=4096&n;return O(!(n&=-6401),`unknown flags in __syscall_newfstatat: ${n}`),t=Se.calculateAt(e,t,i),Se.doStat(s?Ee.lstat:Ee.stat,t,r)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,r,n){Se.varargs=n;try{t=Se.getStr(t),t=Se.calculateAt(e,t);var s=n?Se.get():0;return Ee.open(t,r,s).fd}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_readlinkat:function(e,t,r,n){try{if(t=Se.getStr(t),t=Se.calculateAt(e,t),n<=0)return-28;var s=Ee.readlink(t),i=Math.min(n,de(s)),o=S[r+i];return xe(s,r,n+1),S[r+i]=o,i}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){try{return e=Se.getStr(e),Ee.rmdir(e),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(Ee.stat,e,t)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,r){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),0===r?Ee.unlink(t):512===r?Ee.rmdir(t):G("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_utimensat:function(e,t,r,n){try{if(t=Se.getStr(t),O(0===n),t=Se.calculateAt(e,t,!0),r){var s=Te(r),i=T[r+8>>2];o=1e3*s+i/1e6,a=1e3*(s=Te(r+=16))+(i=T[r+8>>2])/1e6}else var o=Date.now(),a=o;return Ee.utime(t,o,a),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},_emscripten_get_now_is_monotonic:()=>!0,_localtime_js:function(e,t){e=Ae(e);var r=new Date(1e3*e);T[t>>2]=r.getSeconds(),T[t+4>>2]=r.getMinutes(),T[t+8>>2]=r.getHours(),T[t+12>>2]=r.getDate(),T[t+16>>2]=r.getMonth(),T[t+20>>2]=r.getFullYear()-1900,T[t+24>>2]=r.getDay();var n=0|(e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?ke:Ie)[e.getMonth()]+e.getDate()-1})(r);T[t+28>>2]=n,T[t+36>>2]=-60*r.getTimezoneOffset();var s=new Date(r.getFullYear(),0,1),i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),o=s.getTimezoneOffset(),a=0|(i!=o&&r.getTimezoneOffset()==Math.min(o,i));T[t+32>>2]=a},_mmap_js:function(e,t,r,n,s,i,o){s=Ae(s);try{if(isNaN(s))return 61;var a=Se.getStreamFromFD(n),l=Ee.mmap(a,e,s,t,r),c=l.ptr;return T[i>>2]=l.allocated,I[o>>2]=c,0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,r,n,s,i){i=Ae(i);try{if(isNaN(i))return 61;var o=Se.getStreamFromFD(s);2&r&&Se.doMsync(e,o,t,n,i),Ee.munmap(o)}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:(e,t,r)=>{var n=(new Date).getFullYear(),s=new Date(n,0,1),i=new Date(n,6,1),o=s.getTimezoneOffset(),a=i.getTimezoneOffset(),l=Math.max(o,a);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[e>>2]=60*l,T[t>>2]=Number(o!=a);var _=c(s),u=c(i),d=Fe(_),f=Fe(u);a>2]=d,I[r+4>>2]=f):(I[r>>2]=f,I[r+4>>2]=d)},emscripten_date_now:()=>Date.now(),emscripten_get_now:me,emscripten_memcpy_js:(e,t,r)=>A.copyWithin(e,t,t+r),emscripten_resize_heap:e=>{var t=A.length;O((e>>>=0)>t);var r=2147483648;if(e>r)return E(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var n,s=1;s<=4;s*=2){var i=t*(1+.2/s);i=Math.min(i,e+100663296);var o=Math.min(r,(n=Math.max(e,i))+(65536-n%65536)%65536);if(Oe(o))return!0}return E(`Failed to grow the heap from ${t} bytes to ${o} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var r=0;return Le().forEach(((n,s)=>{var i=t+r;I[e+4*s>>2]=i,((e,t)=>{for(var r=0;r{var r=Le();I[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),I[t>>2]=n,0},fd_close:function(e){try{var t=Se.getStreamFromFD(e);return Ee.close(t),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var r=Se.getStreamFromFD(e),n=r.tty?2:Ee.isDir(r.mode)?3:Ee.isLink(r.mode)?7:4;return S[0|t]=n,x[t+2>>1]=0,k[t+8>>3]=BigInt(0),k[t+16>>3]=BigInt(0),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,r,n){try{var s=((e,t,r,n)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=Ee.read(e,S,o,a,n);if(l<0)return-1;if(s+=l,l>2]=s,0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,r,n){t=Ae(t);try{if(isNaN(t))return 61;var s=Se.getStreamFromFD(e);return Ee.llseek(s,t,r),k[n>>3]=BigInt(s.position),s.getdents&&0===t&&0===r&&(s.getdents=null),0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=Se.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?t.stream_ops.fsync(t):0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,r,n){try{var s=((e,t,r,n)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=Ee.write(e,S,o,a,n);if(l<0)return-1;s+=l,void 0!==n&&(n+=l)}return s})(Se.getStreamFromFD(e),t,r);return I[n>>2]=s,0}catch(e){if(void 0===Ee||"ErrnoError"!==e.name)throw e;return e.errno}},memory:q},Re=function(){var e={env:De,wasi_snapshot_preview1:De};function t(e,t){var r;return r=(Re=e.exports).__wasm_call_ctors,D.unshift(r),Q("wasm-instantiate"),Re}H("wasm-instantiate");var r,n,o,a,l=i;if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),s(e)}return(r=y,n=V,o=e,a=function(e){O(i===l,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),l=null,t(e.instance)},r||"function"!=typeof WebAssembly.instantiateStreaming||K(n)||"function"!=typeof fetch?X(n,o,a):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),X(n,o,a)}))))).catch(s),{}}(),Me=(J("__wasm_call_ctors"),i._sqlite3_status64=J("sqlite3_status64"),i._sqlite3_status=J("sqlite3_status"),i._sqlite3_db_status=J("sqlite3_db_status"),i._sqlite3_msize=J("sqlite3_msize"),i._sqlite3_vfs_find=J("sqlite3_vfs_find"),i._sqlite3_initialize=J("sqlite3_initialize"),i._sqlite3_vfs_register=J("sqlite3_vfs_register"),i._sqlite3_vfs_unregister=J("sqlite3_vfs_unregister"),i._sqlite3_malloc=J("sqlite3_malloc"),i._sqlite3_malloc64=J("sqlite3_malloc64"),i._sqlite3_free=J("sqlite3_free"),i._sqlite3_realloc=J("sqlite3_realloc"),i._sqlite3_realloc64=J("sqlite3_realloc64"),i._sqlite3_value_int64=J("sqlite3_value_int64"),i._sqlite3_value_double=J("sqlite3_value_double"),i._sqlite3_value_text=J("sqlite3_value_text"),i._sqlite3_randomness=J("sqlite3_randomness"),i._sqlite3_stricmp=J("sqlite3_stricmp"),i._sqlite3_strnicmp=J("sqlite3_strnicmp"),J("__errno_location")),je=(i._sqlite3_serialize=J("sqlite3_serialize"),i._sqlite3_prepare_v2=J("sqlite3_prepare_v2"),i._sqlite3_step=J("sqlite3_step"),i._sqlite3_column_int64=J("sqlite3_column_int64"),i._sqlite3_column_int=J("sqlite3_column_int"),i._sqlite3_finalize=J("sqlite3_finalize"),i._sqlite3_file_control=J("sqlite3_file_control"),i._sqlite3_reset=J("sqlite3_reset"),i._sqlite3_value_int=J("sqlite3_value_int"),i._sqlite3_deserialize=J("sqlite3_deserialize"),i._sqlite3_clear_bindings=J("sqlite3_clear_bindings"),i._sqlite3_value_blob=J("sqlite3_value_blob"),i._sqlite3_value_bytes=J("sqlite3_value_bytes"),i._sqlite3_value_subtype=J("sqlite3_value_subtype"),i._sqlite3_value_pointer=J("sqlite3_value_pointer"),i._sqlite3_value_type=J("sqlite3_value_type"),i._sqlite3_value_nochange=J("sqlite3_value_nochange"),i._sqlite3_value_frombind=J("sqlite3_value_frombind"),i._sqlite3_value_dup=J("sqlite3_value_dup"),i._sqlite3_value_free=J("sqlite3_value_free"),i._sqlite3_result_blob=J("sqlite3_result_blob"),i._sqlite3_result_error_toobig=J("sqlite3_result_error_toobig"),i._sqlite3_result_error_nomem=J("sqlite3_result_error_nomem"),i._sqlite3_result_double=J("sqlite3_result_double"),i._sqlite3_result_error=J("sqlite3_result_error"),i._sqlite3_result_int=J("sqlite3_result_int"),i._sqlite3_result_int64=J("sqlite3_result_int64"),i._sqlite3_result_null=J("sqlite3_result_null"),i._sqlite3_result_pointer=J("sqlite3_result_pointer"),i._sqlite3_result_subtype=J("sqlite3_result_subtype"),i._sqlite3_result_text=J("sqlite3_result_text"),i._sqlite3_result_zeroblob=J("sqlite3_result_zeroblob"),i._sqlite3_result_zeroblob64=J("sqlite3_result_zeroblob64"),i._sqlite3_result_error_code=J("sqlite3_result_error_code"),i._sqlite3_sql=J("sqlite3_sql"),i._sqlite3_user_data=J("sqlite3_user_data"),i._sqlite3_context_db_handle=J("sqlite3_context_db_handle"),i._sqlite3_vtab_nochange=J("sqlite3_vtab_nochange"),i._sqlite3_vtab_in_first=J("sqlite3_vtab_in_first"),i._sqlite3_vtab_in_next=J("sqlite3_vtab_in_next"),i._sqlite3_aggregate_context=J("sqlite3_aggregate_context"),i._sqlite3_get_auxdata=J("sqlite3_get_auxdata"),i._sqlite3_set_auxdata=J("sqlite3_set_auxdata"),i._sqlite3_column_count=J("sqlite3_column_count"),i._sqlite3_data_count=J("sqlite3_data_count"),i._sqlite3_column_blob=J("sqlite3_column_blob"),i._sqlite3_column_bytes=J("sqlite3_column_bytes"),i._sqlite3_column_double=J("sqlite3_column_double"),i._sqlite3_column_text=J("sqlite3_column_text"),i._sqlite3_column_value=J("sqlite3_column_value"),i._sqlite3_column_type=J("sqlite3_column_type"),i._sqlite3_column_name=J("sqlite3_column_name"),i._sqlite3_bind_blob=J("sqlite3_bind_blob"),i._sqlite3_bind_double=J("sqlite3_bind_double"),i._sqlite3_bind_int=J("sqlite3_bind_int"),i._sqlite3_bind_int64=J("sqlite3_bind_int64"),i._sqlite3_bind_null=J("sqlite3_bind_null"),i._sqlite3_bind_pointer=J("sqlite3_bind_pointer"),i._sqlite3_bind_text=J("sqlite3_bind_text"),i._sqlite3_bind_parameter_count=J("sqlite3_bind_parameter_count"),i._sqlite3_bind_parameter_index=J("sqlite3_bind_parameter_index"),i._sqlite3_db_handle=J("sqlite3_db_handle"),i._sqlite3_stmt_readonly=J("sqlite3_stmt_readonly"),i._sqlite3_stmt_isexplain=J("sqlite3_stmt_isexplain"),i._sqlite3_stmt_status=J("sqlite3_stmt_status"),i._sqlite3_expanded_sql=J("sqlite3_expanded_sql"),i._sqlite3_preupdate_old=J("sqlite3_preupdate_old"),i._sqlite3_preupdate_count=J("sqlite3_preupdate_count"),i._sqlite3_preupdate_depth=J("sqlite3_preupdate_depth"),i._sqlite3_preupdate_blobwrite=J("sqlite3_preupdate_blobwrite"),i._sqlite3_preupdate_new=J("sqlite3_preupdate_new"),i._sqlite3_value_numeric_type=J("sqlite3_value_numeric_type"),i._sqlite3_errmsg=J("sqlite3_errmsg"),i._sqlite3_set_authorizer=J("sqlite3_set_authorizer"),i._sqlite3_strglob=J("sqlite3_strglob"),i._sqlite3_strlike=J("sqlite3_strlike"),i._sqlite3_exec=J("sqlite3_exec"),i._sqlite3_auto_extension=J("sqlite3_auto_extension"),i._sqlite3_cancel_auto_extension=J("sqlite3_cancel_auto_extension"),i._sqlite3_reset_auto_extension=J("sqlite3_reset_auto_extension"),i._sqlite3_prepare_v3=J("sqlite3_prepare_v3"),i._sqlite3_create_module=J("sqlite3_create_module"),i._sqlite3_create_module_v2=J("sqlite3_create_module_v2"),i._sqlite3_drop_modules=J("sqlite3_drop_modules"),i._sqlite3_declare_vtab=J("sqlite3_declare_vtab"),i._sqlite3_vtab_on_conflict=J("sqlite3_vtab_on_conflict"),i._sqlite3_vtab_collation=J("sqlite3_vtab_collation"),i._sqlite3_vtab_in=J("sqlite3_vtab_in"),i._sqlite3_vtab_rhs_value=J("sqlite3_vtab_rhs_value"),i._sqlite3_vtab_distinct=J("sqlite3_vtab_distinct"),i._sqlite3_keyword_name=J("sqlite3_keyword_name"),i._sqlite3_keyword_count=J("sqlite3_keyword_count"),i._sqlite3_keyword_check=J("sqlite3_keyword_check"),i._sqlite3_complete=J("sqlite3_complete"),i._sqlite3_libversion=J("sqlite3_libversion"),i._sqlite3_libversion_number=J("sqlite3_libversion_number"),i._sqlite3_shutdown=J("sqlite3_shutdown"),i._sqlite3_last_insert_rowid=J("sqlite3_last_insert_rowid"),i._sqlite3_set_last_insert_rowid=J("sqlite3_set_last_insert_rowid"),i._sqlite3_changes64=J("sqlite3_changes64"),i._sqlite3_changes=J("sqlite3_changes"),i._sqlite3_total_changes64=J("sqlite3_total_changes64"),i._sqlite3_total_changes=J("sqlite3_total_changes"),i._sqlite3_txn_state=J("sqlite3_txn_state"),i._sqlite3_close_v2=J("sqlite3_close_v2"),i._sqlite3_busy_handler=J("sqlite3_busy_handler"),i._sqlite3_progress_handler=J("sqlite3_progress_handler"),i._sqlite3_busy_timeout=J("sqlite3_busy_timeout"),i._sqlite3_create_function=J("sqlite3_create_function"),i._sqlite3_create_function_v2=J("sqlite3_create_function_v2"),i._sqlite3_create_window_function=J("sqlite3_create_window_function"),i._sqlite3_overload_function=J("sqlite3_overload_function"),i._sqlite3_trace_v2=J("sqlite3_trace_v2"),i._sqlite3_commit_hook=J("sqlite3_commit_hook"),i._sqlite3_update_hook=J("sqlite3_update_hook"),i._sqlite3_rollback_hook=J("sqlite3_rollback_hook"),i._sqlite3_preupdate_hook=J("sqlite3_preupdate_hook"),i._sqlite3_error_offset=J("sqlite3_error_offset"),i._sqlite3_errcode=J("sqlite3_errcode"),i._sqlite3_extended_errcode=J("sqlite3_extended_errcode"),i._sqlite3_errstr=J("sqlite3_errstr"),i._sqlite3_limit=J("sqlite3_limit"),i._sqlite3_open=J("sqlite3_open"),i._sqlite3_open_v2=J("sqlite3_open_v2"),i._sqlite3_create_collation=J("sqlite3_create_collation"),i._sqlite3_create_collation_v2=J("sqlite3_create_collation_v2"),i._sqlite3_collation_needed=J("sqlite3_collation_needed"),i._sqlite3_table_column_metadata=J("sqlite3_table_column_metadata"),i._sqlite3_extended_result_codes=J("sqlite3_extended_result_codes"),i._sqlite3_uri_parameter=J("sqlite3_uri_parameter"),i._sqlite3_uri_key=J("sqlite3_uri_key"),i._sqlite3_uri_boolean=J("sqlite3_uri_boolean"),i._sqlite3_uri_int64=J("sqlite3_uri_int64"),i._sqlite3_db_name=J("sqlite3_db_name"),i._sqlite3_db_filename=J("sqlite3_db_filename"),i._sqlite3_compileoption_used=J("sqlite3_compileoption_used"),i._sqlite3_compileoption_get=J("sqlite3_compileoption_get"),i._sqlite3session_diff=J("sqlite3session_diff"),i._sqlite3session_attach=J("sqlite3session_attach"),i._sqlite3session_create=J("sqlite3session_create"),i._sqlite3session_delete=J("sqlite3session_delete"),i._sqlite3session_table_filter=J("sqlite3session_table_filter"),i._sqlite3session_changeset=J("sqlite3session_changeset"),i._sqlite3session_changeset_strm=J("sqlite3session_changeset_strm"),i._sqlite3session_patchset_strm=J("sqlite3session_patchset_strm"),i._sqlite3session_patchset=J("sqlite3session_patchset"),i._sqlite3session_enable=J("sqlite3session_enable"),i._sqlite3session_indirect=J("sqlite3session_indirect"),i._sqlite3session_isempty=J("sqlite3session_isempty"),i._sqlite3session_memory_used=J("sqlite3session_memory_used"),i._sqlite3session_object_config=J("sqlite3session_object_config"),i._sqlite3session_changeset_size=J("sqlite3session_changeset_size"),i._sqlite3changeset_start=J("sqlite3changeset_start"),i._sqlite3changeset_start_v2=J("sqlite3changeset_start_v2"),i._sqlite3changeset_start_strm=J("sqlite3changeset_start_strm"),i._sqlite3changeset_start_v2_strm=J("sqlite3changeset_start_v2_strm"),i._sqlite3changeset_next=J("sqlite3changeset_next"),i._sqlite3changeset_op=J("sqlite3changeset_op"),i._sqlite3changeset_pk=J("sqlite3changeset_pk"),i._sqlite3changeset_old=J("sqlite3changeset_old"),i._sqlite3changeset_new=J("sqlite3changeset_new"),i._sqlite3changeset_conflict=J("sqlite3changeset_conflict"),i._sqlite3changeset_fk_conflicts=J("sqlite3changeset_fk_conflicts"),i._sqlite3changeset_finalize=J("sqlite3changeset_finalize"),i._sqlite3changeset_invert=J("sqlite3changeset_invert"),i._sqlite3changeset_invert_strm=J("sqlite3changeset_invert_strm"),i._sqlite3changeset_apply_v2=J("sqlite3changeset_apply_v2"),i._sqlite3changeset_apply=J("sqlite3changeset_apply"),i._sqlite3changeset_apply_v2_strm=J("sqlite3changeset_apply_v2_strm"),i._sqlite3changeset_apply_strm=J("sqlite3changeset_apply_strm"),i._sqlite3changegroup_new=J("sqlite3changegroup_new"),i._sqlite3changegroup_add=J("sqlite3changegroup_add"),i._sqlite3changegroup_output=J("sqlite3changegroup_output"),i._sqlite3changegroup_add_strm=J("sqlite3changegroup_add_strm"),i._sqlite3changegroup_output_strm=J("sqlite3changegroup_output_strm"),i._sqlite3changegroup_delete=J("sqlite3changegroup_delete"),i._sqlite3changeset_concat=J("sqlite3changeset_concat"),i._sqlite3changeset_concat_strm=J("sqlite3changeset_concat_strm"),i._sqlite3session_config=J("sqlite3session_config"),i._sqlite3_sourceid=J("sqlite3_sourceid"),i._sqlite3_wasm_pstack_ptr=J("sqlite3_wasm_pstack_ptr"),i._sqlite3_wasm_pstack_restore=J("sqlite3_wasm_pstack_restore"),i._sqlite3_wasm_pstack_alloc=J("sqlite3_wasm_pstack_alloc"),i._sqlite3_wasm_pstack_remaining=J("sqlite3_wasm_pstack_remaining"),i._sqlite3_wasm_pstack_quota=J("sqlite3_wasm_pstack_quota"),i._sqlite3_wasm_db_error=J("sqlite3_wasm_db_error"),i._sqlite3_wasm_test_struct=J("sqlite3_wasm_test_struct"),i._sqlite3_wasm_enum_json=J("sqlite3_wasm_enum_json"),i._sqlite3_wasm_vfs_unlink=J("sqlite3_wasm_vfs_unlink"),i._sqlite3_wasm_db_vfs=J("sqlite3_wasm_db_vfs"),i._sqlite3_wasm_db_reset=J("sqlite3_wasm_db_reset"),i._sqlite3_wasm_db_export_chunked=J("sqlite3_wasm_db_export_chunked"),i._sqlite3_wasm_db_serialize=J("sqlite3_wasm_db_serialize"),i._sqlite3_wasm_vfs_create_file=J("sqlite3_wasm_vfs_create_file"),i._sqlite3_wasm_posix_create_file=J("sqlite3_wasm_posix_create_file"),i._sqlite3_wasm_kvvfsMakeKeyOnPstack=J("sqlite3_wasm_kvvfsMakeKeyOnPstack"),i._sqlite3_wasm_kvvfs_methods=J("sqlite3_wasm_kvvfs_methods"),i._sqlite3_wasm_vtab_config=J("sqlite3_wasm_vtab_config"),i._sqlite3_wasm_db_config_ip=J("sqlite3_wasm_db_config_ip"),i._sqlite3_wasm_db_config_pii=J("sqlite3_wasm_db_config_pii"),i._sqlite3_wasm_db_config_s=J("sqlite3_wasm_db_config_s"),i._sqlite3_wasm_config_i=J("sqlite3_wasm_config_i"),i._sqlite3_wasm_config_ii=J("sqlite3_wasm_config_ii"),i._sqlite3_wasm_config_j=J("sqlite3_wasm_config_j"),i._sqlite3_wasm_init_wasmfs=J("sqlite3_wasm_init_wasmfs"),i._sqlite3_wasm_test_intptr=J("sqlite3_wasm_test_intptr"),i._sqlite3_wasm_test_voidptr=J("sqlite3_wasm_test_voidptr"),i._sqlite3_wasm_test_int64_max=J("sqlite3_wasm_test_int64_max"),i._sqlite3_wasm_test_int64_min=J("sqlite3_wasm_test_int64_min"),i._sqlite3_wasm_test_int64_times2=J("sqlite3_wasm_test_int64_times2"),i._sqlite3_wasm_test_int64_minmax=J("sqlite3_wasm_test_int64_minmax"),i._sqlite3_wasm_test_int64ptr=J("sqlite3_wasm_test_int64ptr"),i._sqlite3_wasm_test_stack_overflow=J("sqlite3_wasm_test_stack_overflow"),i._sqlite3_wasm_test_str_hello=J("sqlite3_wasm_test_str_hello"),i._sqlite3_wasm_SQLTester_strglob=J("sqlite3_wasm_SQLTester_strglob"),i._malloc=J("malloc")),Ue=(i._free=J("free"),i._realloc=J("realloc"),i._fflush=J("fflush")),Be=J("emscripten_builtin_memalign"),ze=()=>(ze=Re.emscripten_stack_init)(),We=()=>(We=Re.emscripten_stack_get_end)();function He(){function e(){Ne||(Ne=!0,i.calledRun=!0,F||(O(!M),M=!0,C(),i.noFSInit||Ee.init.initialized||Ee.init(),Ee.ignorePermissions=!1,he.init(),ne(D),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(C(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),R.unshift(e);var e;ne(R)}()))}var r;j>0||(ze(),O(!(3&(r=We()))),0==r&&(r+=4),I[r>>2]=34821223,I[r+4>>2]=2310721022,I[0]=1668509029,function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),N.unshift(e);var e;ne(N)}(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e(),C()))}if(J("stackSave"),J("stackRestore"),J("stackAlloc"),i.wasmMemory=q,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","exitJS","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","handleAllocatorInit","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",r=e;r.startsWith("_")||(r="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+r+"')",ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ie(t)}}),re(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","keepRuntimeAlive","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","readI53FromI64","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","getExecutableName","asyncLoad","alignMemory","mmapAlloc","wasmTable","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToNewUTF8","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack"].forEach(re),B=function e(){Ne||He(),Ne||(B=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return He(),i.postRun||(i.postRun=[]),i.postRun.push((function(e){if(globalThis.sqlite3ApiBootstrap=function t(r=globalThis.sqlite3ApiConfig||t.defaultConfig){if(t.sqlite3)return console.warn("sqlite3ApiBootstrap() called multiple times.","Config and external initializers are ignored on calls after the first."),t.sqlite3;const n=Object.assign(Object.create(null),{exports:void 0,memory:void 0,bigIntEnabled:void 0!==e?!!e.HEAPU64:!!globalThis.BigInt64Array,debug:console.debug.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),log:console.log.bind(console),wasmfsOpfsDir:"/opfs",useStdAlloc:!1},r||{});Object.assign(n,{allocExportName:n.useStdAlloc?"malloc":"sqlite3_malloc",deallocExportName:n.useStdAlloc?"free":"sqlite3_free",reallocExportName:n.useStdAlloc?"realloc":"sqlite3_realloc"},n),["exports","memory","wasmfsOpfsDir"].forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e]())}));const s=Object.create(null),i=Object.create(null),o=e=>s.sqlite3_js_rc_str&&s.sqlite3_js_rc_str(e)||"Unknown result code #"+e;class a extends Error{constructor(...e){let t;if(e.length)if("number"==typeof(r=e[0])&&r===(0|r))if(t=e[0],1===e.length)super(o(e[0]));else{const r=o(t);"object"==typeof e[1]?super(r,e[1]):(e[0]=r+":",super(e.join(" ")))}else 2===e.length&&"object"==typeof e[1]?super(...e):super(e.join(" "));var r;this.resultCode=t||s.SQLITE_ERROR,this.name="SQLite3Error"}}a.toss=(...e)=>{throw new a(...e)};const l=a.toss;n.wasmfsOpfsDir&&!/^\/[^/]+$/.test(n.wasmfsOpfsDir)&&l("config.wasmfsOpfsDir must be falsy or in the form '/dir-name'.");const c=e=>"bigint"!=typeof e&&!!(e===(0|e)&&e<=2147483647&&e>=-2147483648),_="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,u=e=>e.buffer instanceof _,d=(e,t,r)=>u(e)?e.slice(t,r):e.subarray(t,r),f=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),p=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),m=e=>f(e)||l("Value is not of a supported TypedArray type."),h=new TextDecoder("utf-8"),g=function(e,t,r){return h.decode(d(e,t,r))},b=function(e){return p(e)?g(e instanceof ArrayBuffer?new Uint8Array(e):e):Array.isArray(e)?e.join(""):(i.isPtr(e)&&(e=i.cstrToJs(e)),e)};class y extends Error{constructor(...e){2===e.length&&"object"==typeof e[1]?super(...e):e.length?super(e.join(" ")):super("Allocation failed."),this.resultCode=s.SQLITE_NOMEM,this.name="WasmAllocError"}}y.toss=(...e)=>{throw new y(...e)},Object.assign(s,{sqlite3_bind_blob:void 0,sqlite3_bind_text:void 0,sqlite3_create_function_v2:(e,t,r,n,s,i,o,a,l)=>{},sqlite3_create_function:(e,t,r,n,s,i,o,a)=>{},sqlite3_create_window_function:(e,t,r,n,s,i,o,a,l,c)=>{},sqlite3_prepare_v3:(e,t,r,n,s,i)=>{},sqlite3_prepare_v2:(e,t,r,n,s)=>{},sqlite3_exec:(e,t,r,n,s)=>{},sqlite3_randomness:(e,t)=>{}});const q={affirmBindableTypedArray:m,flexibleString:b,bigIntFits32:e=>e>=-2147483648n&&e<=0x7fffffffn,bigIntFits64:function e(t){return e._max||(e._max=BigInt("0x7fffffffffffffff"),e._min=~e._max),t>=e._min&&t<=e._max},bigIntFitsDouble:function e(t){return e._min||(e._min=Number.MIN_SAFE_INTEGER,e._max=Number.MAX_SAFE_INTEGER),t>=e._min&&t<=e._max},isBindableTypedArray:f,isInt32:c,isSQLableTypedArray:p,isTypedArray:e=>!!(e&&e.constructor&&c(e.constructor.BYTES_PER_ELEMENT))&&e,typedArrayToString:g,isUIThread:()=>globalThis.window===globalThis&&!!globalThis.document,isSharedTypedArray:u,toss:function(...e){throw new Error(e.join(" "))},toss3:l,typedArrayPart:d,affirmDbHeader:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));15>e.byteLength&&l("Input does not contain an SQLite3 database header.");for(let t=0;t<15;++t)"SQLite format 3".charCodeAt(t)!==e[t]&&l("Input does not contain an SQLite3 database header.")},affirmIsDb:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=e.byteLength;(t<512||t%512!=0)&&l("Byte array size",t,"is invalid for an SQLite3 db."),q.affirmDbHeader(e)}};Object.assign(i,{ptrSizeof:n.wasmPtrSizeof||4,ptrIR:n.wasmPtrIR||"i32",bigIntEnabled:!!n.bigIntEnabled,exports:n.exports||l("Missing API config.exports (WASM module exports)."),memory:n.memory||n.exports.memory||l("API config object requires a WebAssembly.Memory object","in either config.exports.memory (exported)","or config.memory (imported)."),alloc:void 0,realloc:void 0,dealloc:void 0}),i.allocFromTypedArray=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e)),m(e);const t=i.alloc(e.byteLength||1);return i.heapForSize(e.constructor).set(e.byteLength?e:[0],t),t};{const e=n.allocExportName,t=n.deallocExportName,r=n.reallocExportName;for(const n of[e,t,r])i.exports[n]instanceof Function||l("Missing required exports[",n,"] function.");i.alloc=function e(t){return e.impl(t)||y.toss("Failed to allocate",t," bytes.")},i.alloc.impl=i.exports[e],i.realloc=function e(t,r){const n=e.impl(t,r);return r?n||y.toss("Failed to reallocate",r," bytes."):0},i.realloc.impl=i.exports[r],i.dealloc=i.exports[t]}let w;if(i.compileOptionUsed=function e(t){if(!arguments.length){if(e._result)return e._result;e._opt||(e._rx=/^([^=]+)=(.+)/,e._rxInt=/^-?\d+$/,e._opt=function(t,r){const n=e._rx.exec(t);r[0]=n?n[1]:t,r[1]=!n||(e._rxInt.test(n[2])?+n[2]:n[2])});const t={},r=[0,0];let n,i=0;for(;n=s.sqlite3_compileoption_get(i++);)e._opt(n,r),t[r[0]]=r[1];return e._result=t}if(Array.isArray(t)){const e={};return t.forEach((t=>{e[t]=s.sqlite3_compileoption_used(t)})),e}return"object"==typeof t?(Object.keys(t).forEach((e=>{t[e]=s.sqlite3_compileoption_used(e)})),t):"string"==typeof t&&!!s.sqlite3_compileoption_used(t)},i.pstack=Object.assign(Object.create(null),{restore:i.exports.sqlite3_wasm_pstack_restore,alloc:function(e){return"string"!=typeof e||(e=i.sizeofIR(e))||y.toss("Invalid value for pstack.alloc(",arguments[0],")"),i.exports.sqlite3_wasm_pstack_alloc(e)||y.toss("Could not allocate",e,"bytes from the pstack.")},allocChunks:function(e,t){"string"!=typeof t||(t=i.sizeofIR(t))||y.toss("Invalid size value for allocChunks(",arguments[1],")");const r=i.pstack.alloc(e*t),n=[];let s=0,o=0;for(;s1===e?i.pstack.alloc(t?8:i.ptrSizeof):i.pstack.allocChunks(e,t?8:i.ptrSizeof),call:function(e){const t=i.pstack.pointer;try{return e(S)}finally{i.pstack.restore(t)}}}),Object.defineProperties(i.pstack,{pointer:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_ptr},quota:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_quota},remaining:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_remaining}}),s.sqlite3_randomness=(...e)=>{if(1===e.length&&q.isTypedArray(e[0])&&1===e[0].BYTES_PER_ELEMENT){const t=e[0];if(0===t.byteLength)return i.exports.sqlite3_randomness(0,0),t;const r=i.pstack.pointer;try{let e=t.byteLength,r=0;const n=i.exports.sqlite3_randomness,s=i.heap8u(),o=e<512?e:512,a=i.pstack.alloc(o);do{const i=e>o?o:e;n(i,a),t.set(d(s,a,a+i),r),e-=i,r+=i}while(e>0)}catch(e){console.error("Highly unexpected (and ignored!) exception in sqlite3_randomness():",e)}finally{i.pstack.restore(r)}return t}i.exports.sqlite3_randomness(...e)},s.sqlite3_wasmfs_opfs_dir=function(){if(void 0!==w)return w;const e=n.wasmfsOpfsDir;if(!(e&&globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle))return w="";try{return w=e&&0===i.xCallWrapped("sqlite3_wasm_init_wasmfs","i32",["string"],e)?e:""}catch(e){return w=""}},s.sqlite3_wasmfs_filename_is_persistent=function(e){const t=s.sqlite3_wasmfs_opfs_dir();return!(!t||!e)&&e.startsWith(t+"/")},s.sqlite3_js_db_uses_vfs=function(e,t,r=0){try{const n=s.sqlite3_vfs_find(t);return!!n&&(e?n===s.sqlite3_js_db_vfs(e,r)&&n:n===s.sqlite3_vfs_find(0)&&n)}catch(e){return!1}},s.sqlite3_js_vfs_list=function(){const e=[];let t=s.sqlite3_vfs_find(0);for(;t;){const r=new s.sqlite3_vfs(t);e.push(i.cstrToJs(r.$zName)),t=r.$pNext,r.dispose()}return e},s.sqlite3_js_db_export=function(e,t=0){(e=i.xWrap.testConvertArg("sqlite3*",e))||l("Invalid sqlite3* argument."),i.bigIntEnabled||l("BigInt64 support is not enabled.");const r=i.scopedAllocPush();let n;try{const r=i.scopedAlloc(8+i.ptrSizeof),s=r+8,o=t?i.isPtr(t)?t:i.scopedAllocCString(""+t):0;let a=i.exports.sqlite3_wasm_db_serialize(e,o,s,r,0);a&&l("Database serialization failed with code",S.capi.sqlite3_js_rc_str(a)),n=i.peekPtr(s);const c=i.peek(r,"i64");return a=c?i.heap8u().slice(n,n+Number(c)):new Uint8Array,a}finally{n&&i.exports.sqlite3_free(n),i.scopedAllocPop(r)}},s.sqlite3_js_db_vfs=(e,t=0)=>i.sqlite3_wasm_db_vfs(e,t),s.sqlite3_js_aggregate_context=(e,t)=>s.sqlite3_aggregate_context(e,t)||(t?y.toss("Cannot allocate",t,"bytes for sqlite3_aggregate_context()"):0),s.sqlite3_js_posix_create_file=function(e,t,r){let n;t&&i.isPtr(t)?n=t:t instanceof ArrayBuffer||t instanceof Uint8Array?(n=i.allocFromTypedArray(t),(arguments.length<3||!q.isInt32(r)||r<0)&&(r=t.byteLength)):a.toss("Invalid 2nd argument for sqlite3_js_posix_create_file().");try{(!q.isInt32(r)||r<0)&&a.toss("Invalid 3rd argument for sqlite3_js_posix_create_file().");const t=i.sqlite3_wasm_posix_create_file(e,n,r);t&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(t))}finally{i.dealloc(n)}},s.sqlite3_js_vfs_create_file=function(e,t,r,o){let l;n.warn("sqlite3_js_vfs_create_file() is deprecated and","should be avoided because it can lead to C-level crashes.","See its documentation for alternative options."),r?(i.isPtr(r)?l=r:r instanceof ArrayBuffer&&(r=new Uint8Array(r)),r instanceof Uint8Array?(l=i.allocFromTypedArray(r),(arguments.length<4||!q.isInt32(o)||o<0)&&(o=r.byteLength)):a.toss("Invalid 3rd argument type for sqlite3_js_vfs_create_file().")):l=0,(!q.isInt32(o)||o<0)&&(i.dealloc(l),a.toss("Invalid 4th argument for sqlite3_js_vfs_create_file()."));try{const r=i.sqlite3_wasm_vfs_create_file(e,t,l,o);r&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(r))}finally{i.dealloc(l)}},s.sqlite3_js_sql_to_string=e=>{if("string"==typeof e)return e;const t=b(v);return t===v?void 0:t},q.isUIThread()){const e=function(e){const t=Object.create(null);return t.prefix="kvvfs-"+e,t.stores=[],"session"!==e&&""!==e||t.stores.push(globalThis.sessionStorage),"local"!==e&&""!==e||t.stores.push(globalThis.localStorage),t};s.sqlite3_js_kvvfs_clear=function(t=""){let r=0;const n=e(t);return n.stores.forEach((e=>{const t=[];let s;for(s=0;se.removeItem(t))),r+=t.length})),r},s.sqlite3_js_kvvfs_size=function(t=""){let r=0;const n=e(t);return n.stores.forEach((e=>{let t;for(t=0;tE(e,t,"sqlite3_preupdate_new"),s.sqlite3_preupdate_old_js=(e,t)=>E(e,t,"sqlite3_preupdate_old"),s.sqlite3changeset_new_js=(e,t)=>E(e,t,"sqlite3changeset_new"),s.sqlite3changeset_old_js=(e,t)=>E(e,t,"sqlite3changeset_old");const S={WasmAllocError:y,SQLite3Error:a,capi:s,util:q,wasm:i,config:n,version:Object.create(null),client:void 0,asyncPostInit:async function e(){if(e.isReady instanceof Promise)return e.isReady;let r=t.initializersAsync;delete t.initializersAsync;const s=async()=>(S.__isUnderTest||(delete S.util,delete S.StructBinder),S),i=e=>{throw n.error("an async sqlite3 initializer failed:",e),e};if(!r||!r.length)return e.isReady=s().catch(i);r=r.map((e=>e instanceof Function?async t=>e(S):e)),r.push(s);let o=Promise.resolve(S);for(;r.length;)o=o.then(r.shift());return e.isReady=o.catch(i)},scriptInfo:void 0};try{t.initializers.forEach((e=>{e(S)}))}catch(e){throw console.error("sqlite3 bootstrap initializer threw:",e),e}return delete t.initializers,t.sqlite3=S,S},globalThis.sqlite3ApiBootstrap.initializers=[],globalThis.sqlite3ApiBootstrap.initializersAsync=[],globalThis.sqlite3ApiBootstrap.defaultConfig=Object.create(null),globalThis.sqlite3ApiBootstrap.sqlite3=void 0,globalThis.WhWasmUtilInstaller=function(e){void 0===e.bigIntEnabled&&(e.bigIntEnabled=!!globalThis.BigInt64Array);const t=(...e)=>{throw new Error(e.join(" "))};e.exports||Object.defineProperty(e,"exports",{enumerable:!0,configurable:!0,get:()=>e.instance&&e.instance.exports});const r=e.pointerIR||"i32",n=e.ptrSizeof="i32"===r?4:"i64"===r?8:t("Unhandled ptrSizeof:",r),s=Object.create(null);s.heapSize=0,s.memory=null,s.freeFuncIndexes=[],s.scopedAlloc=[],s.utf8Decoder=new TextDecoder,s.utf8Encoder=new TextEncoder("utf-8"),e.sizeofIR=e=>{switch(e){case"i8":return 1;case"i16":return 2;case"i32":case"f32":case"float":return 4;case"i64":case"f64":case"double":return 8;case"*":return n;default:return(""+e).endsWith("*")?n:void 0}};const i=function(){if(s.memory){if(s.heapSize===s.memory.buffer.byteLength)return s}else s.memory=e.memory instanceof WebAssembly.Memory?e.memory:e.exports.memory;const t=s.memory.buffer;return s.HEAP8=new Int8Array(t),s.HEAP8U=new Uint8Array(t),s.HEAP16=new Int16Array(t),s.HEAP16U=new Uint16Array(t),s.HEAP32=new Int32Array(t),s.HEAP32U=new Uint32Array(t),e.bigIntEnabled&&(s.HEAP64=new BigInt64Array(t),s.HEAP64U=new BigUint64Array(t)),s.HEAP32F=new Float32Array(t),s.HEAP64F=new Float64Array(t),s.heapSize=t.byteLength,s};e.heap8=()=>i().HEAP8,e.heap8u=()=>i().HEAP8U,e.heap16=()=>i().HEAP16,e.heap16u=()=>i().HEAP16U,e.heap32=()=>i().HEAP32,e.heap32u=()=>i().HEAP32U,e.heapForSize=function(r,n=!0){const o=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();switch(r){case Int8Array:return o.HEAP8;case Uint8Array:return o.HEAP8U;case Int16Array:return o.HEAP16;case Uint16Array:return o.HEAP16U;case Int32Array:return o.HEAP32;case Uint32Array:return o.HEAP32U;case 8:return n?o.HEAP8U:o.HEAP8;case 16:return n?o.HEAP16U:o.HEAP16;case 32:return n?o.HEAP32U:o.HEAP32;case 64:if(o.HEAP64)return n?o.HEAP64U:o.HEAP64;break;default:if(e.bigIntEnabled){if(r===globalThis.BigUint64Array)return o.HEAP64U;if(r===globalThis.BigInt64Array)return o.HEAP64;break}}t("Invalid heapForSize() size: expecting 8, 16, 32,","or (if BigInt is enabled) 64.")},e.functionTable=function(){return e.exports.__indirect_function_table},e.functionEntry=function(t){const r=e.functionTable();return t>7)},rxJSig:/^(\w)\((\w*)\)$/,sigParams:function(t){const r=e._.rxJSig.exec(t);return r?r[2]:t.substr(1)},letterType:r=>e._.sigTypes[r]||t("Invalid signature letter:",r),pushSigType:(t,r)=>t.push(e._.typeCodes[e._.letterType(r)])}),"string"==typeof r){const e=n;n=r,r=e}const s=e._.sigParams(n),i=[1,96];e._.uleb128Encode(i,"push",s.length);for(const t of s)e._.pushSigType(i,t);return"v"===n[0]?i.push(0):(i.push(1),e._.pushSigType(i,n[0])),e._.uleb128Encode(i,"unshift",i.length),i.unshift(0,97,115,109,1,0,0,0,1),i.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array(i)),{e:{f:r}}).exports.f};const o=function(r,n,i){if(i&&!s.scopedAlloc.length&&t("No scopedAllocPush() scope is active."),"string"==typeof r){const e=n;n=r,r=e}"string"==typeof n&&r instanceof Function||t("Invalid arguments: expecting (function,signature) or (signature,function).");const o=e.functionTable(),a=o.length;let l;for(;s.freeFuncIndexes.length&&(l=s.freeFuncIndexes.pop(),o.get(l));)l=null;l||(l=a,o.grow(1));try{return o.set(l,r),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l),l}catch(e){if(!(e instanceof TypeError))throw l===a&&s.freeFuncIndexes.push(a),e}try{const t=e.jsFuncToWasm(r,n);o.set(l,t),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l)}catch(e){throw l===a&&s.freeFuncIndexes.push(a),e}return l};e.installFunction=(e,t)=>o(e,t,!1),e.scopedInstallFunction=(e,t)=>o(e,t,!0),e.uninstallFunction=function(t){if(!t&&0!==t)return;const r=s.freeFuncIndexes,n=e.functionTable();r.push(t);const i=n.get(t);return n.set(t,null),i},e.peek=function(n,o="i8"){o.endsWith("*")&&(o=r);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i(),l=Array.isArray(n)?[]:void 0;let c;do{switch(l&&(n=arguments[0].shift()),o){case"i1":case"i8":c=a.HEAP8[0|n];break;case"i16":c=a.HEAP16[n>>1];break;case"i32":c=a.HEAP32[n>>2];break;case"float":case"f32":c=a.HEAP32F[n>>2];break;case"double":case"f64":c=Number(a.HEAP64F[n>>3]);break;case"i64":if(e.bigIntEnabled){c=BigInt(a.HEAP64[n>>3]);break}default:t("Invalid type for peek():",o)}l&&l.push(c)}while(l&&arguments[0].length);return l||c},e.poke=function(e,n,o="i8"){o.endsWith("*")&&(o=r);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();for(const r of Array.isArray(e)?e:[e])switch(o){case"i1":case"i8":a.HEAP8[0|r]=n;continue;case"i16":a.HEAP16[r>>1]=n;continue;case"i32":a.HEAP32[r>>2]=n;continue;case"float":case"f32":a.HEAP32F[r>>2]=n;continue;case"double":case"f64":a.HEAP64F[r>>3]=n;continue;case"i64":if(a.HEAP64){a.HEAP64[r>>3]=BigInt(n);continue}default:t("Invalid type for poke(): "+o)}return this},e.peekPtr=(...t)=>e.peek(1===t.length?t[0]:t,r),e.pokePtr=(t,n=0)=>e.poke(t,n,r),e.peek8=(...t)=>e.peek(1===t.length?t[0]:t,"i8"),e.poke8=(t,r)=>e.poke(t,r,"i8"),e.peek16=(...t)=>e.peek(1===t.length?t[0]:t,"i16"),e.poke16=(t,r)=>e.poke(t,r,"i16"),e.peek32=(...t)=>e.peek(1===t.length?t[0]:t,"i32"),e.poke32=(t,r)=>e.poke(t,r,"i32"),e.peek64=(...t)=>e.peek(1===t.length?t[0]:t,"i64"),e.poke64=(t,r)=>e.poke(t,r,"i64"),e.peek32f=(...t)=>e.peek(1===t.length?t[0]:t,"f32"),e.poke32f=(t,r)=>e.poke(t,r,"f32"),e.peek64f=(...t)=>e.peek(1===t.length?t[0]:t,"f64"),e.poke64f=(t,r)=>e.poke(t,r,"f64"),e.getMemValue=e.peek,e.getPtrValue=e.peekPtr,e.setMemValue=e.poke,e.setPtrValue=e.pokePtr,e.isPtr32=e=>"number"==typeof e&&e===(0|e)&&e>=0,e.isPtr=e.isPtr32,e.cstrlen=function(t){if(!t||!e.isPtr(t))return null;const r=i().HEAP8U;let n=t;for(;0!==r[n];++n);return n-t};const a="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer;e.cstrToJs=function(t){const r=e.cstrlen(t);return r?(n=i().HEAP8U,o=t,l=t+r,s.utf8Decoder.decode(n.buffer instanceof a?n.slice(o,l):n.subarray(o,l))):null===r?r:"";var n,o,l},e.jstrlen=function(e){if("string"!=typeof e)return null;const t=e.length;let r=0;for(let n=0;n=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++n)),t<=127?++r:r+=t<=2047?2:t<=65535?3:4}return r},e.jstrcpy=function(e,r,n=0,s=-1,i=!0){if(r&&(r instanceof Int8Array||r instanceof Uint8Array)||t("jstrcpy() target must be an Int8Array or Uint8Array."),s<0&&(s=r.length-n),!(s>0&&n>=0))return 0;let o=0,a=e.length;const l=n,c=n+s-(i?1:0);for(;o=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++o)),t<=127){if(n>=c)break;r[n++]=t}else if(t<=2047){if(n+1>=c)break;r[n++]=192|t>>6,r[n++]=128|63&t}else if(t<=65535){if(n+2>=c)break;r[n++]=224|t>>12,r[n++]=128|t>>6&63,r[n++]=128|63&t}else{if(n+3>=c)break;r[n++]=240|t>>18,r[n++]=128|t>>12&63,r[n++]=128|t>>6&63,r[n++]=128|63&t}}return i&&(r[n++]=0),n-l},e.cstrncpy=function(r,n,s){if(r&&n||t("cstrncpy() does not accept NULL strings."),s<0)s=e.cstrlen(strPtr)+1;else if(!(s>0))return 0;const i=e.heap8u();let o,a=0;for(;as.utf8Encoder.encode(t?e+"\0":e);const l=(e,r)=>{e.alloc instanceof Function&&e.dealloc instanceof Function||t("Object is missing alloc() and/or dealloc() function(s)","required by",r+"().")},c=function(t,r,n,o){if(l(e,o),"string"!=typeof t)return null;{const e=s.utf8Encoder.encode(t),o=n(e.length+1),a=i().HEAP8U;return a.set(e,o),a[o+e.length]=0,r?[o,e.length]:o}};e.allocCString=(t,r=!1)=>c(t,r,e.alloc,"allocCString()"),e.scopedAllocPush=function(){l(e,"scopedAllocPush");const t=[];return s.scopedAlloc.push(t),t},e.scopedAllocPop=function(r){l(e,"scopedAllocPop");const n=arguments.length?s.scopedAlloc.indexOf(r):s.scopedAlloc.length-1;n<0&&t("Invalid state object for scopedAllocPop()."),0===arguments.length&&(r=s.scopedAlloc[n]),s.scopedAlloc.splice(n,1);for(let t;t=r.pop();)e.functionEntry(t)?e.uninstallFunction(t):e.dealloc(t)},e.scopedAlloc=function(r){s.scopedAlloc.length||t("No scopedAllocPush() scope is active.");const n=e.alloc(r);return s.scopedAlloc[s.scopedAlloc.length-1].push(n),n},Object.defineProperty(e.scopedAlloc,"level",{configurable:!1,enumerable:!1,get:()=>s.scopedAlloc.length,set:()=>t("The 'active' property is read-only.")}),e.scopedAllocCString=(t,r=!1)=>c(t,r,e.scopedAlloc,"scopedAllocCString()");const _=function(t,r){const n=e[t?"scopedAlloc":"alloc"]((r.length+1)*e.ptrSizeof);let s=0;return r.forEach((r=>{e.pokePtr(n+e.ptrSizeof*s++,e[t?"scopedAllocCString":"allocCString"](""+r))})),e.pokePtr(n+e.ptrSizeof*s,0),n};e.scopedAllocMainArgv=e=>_(!0,e),e.allocMainArgv=e=>_(!1,e),e.cArgvToJs=(t,r)=>{const n=[];for(let s=0;su(e,t,"alloc"),e.scopedAllocPtr=(e=1,t=!0)=>u(e,t,"scopedAlloc"),e.xGet=function(r){return e.exports[r]||t("Cannot find exported symbol:",r)};const d=(e,r)=>t(e+"() requires",r,"argument(s).");e.xCall=function(r,...n){const s=e.xGet(r);return s instanceof Function||t("Exported symbol",r,"is not a function."),s.length!==n.length&&d(r,s.length),2===arguments.length&&Array.isArray(arguments[1])?s.apply(null,arguments[1]):s.apply(null,n)},s.xWrap=Object.create(null),s.xWrap.convert=Object.create(null),s.xWrap.convert.arg=new Map,s.xWrap.convert.result=new Map;const f=s.xWrap.convert.arg,p=s.xWrap.convert.result;e.bigIntEnabled&&f.set("i64",(e=>BigInt(e)));const m="i32"===r?e=>0|e:e=>BigInt(e)|BigInt(0);f.set("i32",m).set("i16",(e=>65535&e)).set("i8",(e=>255&e)).set("f32",(e=>Number(e).valueOf())).set("float",f.get("f32")).set("f64",f.get("f32")).set("double",f.get("f64")).set("int",f.get("i32")).set("null",(e=>e)).set(null,f.get("null")).set("**",m).set("*",m),p.set("*",m).set("pointer",m).set("number",(e=>Number(e))).set("void",(e=>{})).set("null",(e=>e)).set(null,p.get("null"));{const n=["i8","i16","i32","int","f32","float","f64","double"];e.bigIntEnabled&&n.push("i64");const s=f.get(r);for(const e of n)f.set(e+"*",s),p.set(e+"*",s),p.set(e,f.get(e)||t("Missing arg converter:",e))}const h=function(t){return"string"==typeof t?e.scopedAllocCString(t):t?m(t):null};f.set("string",h).set("utf8",h).set("pointer",h),p.set("string",(t=>e.cstrToJs(t))).set("utf8",p.get("string")).set("string:dealloc",(t=>{try{return t?e.cstrToJs(t):null}finally{e.dealloc(t)}})).set("utf8:dealloc",p.get("string:dealloc")).set("json",(t=>JSON.parse(e.cstrToJs(t)))).set("json:dealloc",(t=>{try{return t?JSON.parse(e.cstrToJs(t)):null}finally{e.dealloc(t)}}));const g=class{constructor(e){this.name=e.name||"unnamed adapter"}convertArg(e,r,n){t("AbstractArgAdapter must be subclassed.")}};f.FuncPtrAdapter=class r extends g{constructor(e){super(e),f.FuncPtrAdapter.warnOnUse&&console.warn("xArg.FuncPtrAdapter is an internal-only API","and is not intended to be invoked from","client-level code. Invoked with:",e),this.name=e.name||"unnamed",this.signature=e.signature,e.contextKey instanceof Function&&(this.contextKey=e.contextKey,e.bindScope||(e.bindScope="context")),this.bindScope=e.bindScope||t("FuncPtrAdapter options requires a bindScope (explicit or implied)."),r.bindScopes.indexOf(e.bindScope)<0&&t("Invalid options.bindScope ("+e.bindMod+") for FuncPtrAdapter. Expecting one of: ("+r.bindScopes.join(", ")+")"),this.isTransient="transient"===this.bindScope,this.isContext="context"===this.bindScope,this.isPermanent="permanent"===this.bindScope,this.singleton="singleton"===this.bindScope?[]:void 0,this.callProxy=e.callProxy instanceof Function?e.callProxy:void 0}contextKey(e,t){return this}contextMap(e){const t=this.__cmap||(this.__cmap=new Map);let r=t.get(e);return void 0===r&&t.set(e,r=[]),r}convertArg(t,n,i){let a=this.singleton;if(!a&&this.isContext&&(a=this.contextMap(this.contextKey(n,i))),a&&a[0]===t)return a[1];if(t instanceof Function){this.callProxy&&(t=this.callProxy(t));const e=o(t,this.signature,this.isTransient);if(r.debugFuncInstall&&r.debugOut("FuncPtrAdapter installed",this,this.contextKey(n,i),"@"+e,t),a){if(a[1]){r.debugFuncInstall&&r.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(n,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}}a[0]=t,a[1]=e}return e}if(e.isPtr(t)||null==t){if(a&&a[1]&&a[1]!==t){r.debugFuncInstall&&r.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(n,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}a[0]=a[1]=0|t}return t||0}throw new TypeError("Invalid FuncPtrAdapter argument type. Expecting a function pointer or a "+(this.name?this.name+" ":"")+"function matching signature "+this.signature+".")}},f.FuncPtrAdapter.warnOnUse=!1,f.FuncPtrAdapter.debugFuncInstall=!1,f.FuncPtrAdapter.debugOut=console.debug.bind(console),f.FuncPtrAdapter.bindScopes=["transient","context","singleton","permanent"];const b=e=>f.get(e)||t("Argument adapter not found:",e),y=e=>p.get(e)||t("Result adapter not found:",e);s.xWrap.convertArg=(e,...t)=>b(e)(...t),s.xWrap.convertArgNoCheck=(e,...t)=>f.get(e)(...t),s.xWrap.convertResult=(e,t)=>null===e?t:e?y(e)(t):void 0,s.xWrap.convertResultNoCheck=(e,t)=>null===e?t:e?p.get(e)(t):void 0,e.xWrap=function(r,n,...i){3===arguments.length&&Array.isArray(arguments[2])&&(i=arguments[2]),e.isPtr(r)&&(r=e.functionEntry(r)||t("Function pointer not found in WASM function table."));const o=r instanceof Function,a=o?r:e.xGet(r);if(o&&(r=a.name||"unnamed function"),i.length!==a.length&&d(r,a.length),null===n&&0===a.length)return a;null!=n&&y(n);for(const e of i)e instanceof g?f.set(e,((...t)=>e.convertArg(...t))):b(e);const l=s.xWrap;return 0===a.length?(...e)=>e.length?d(r,a.length):l.convertResult(n,a.call(null)):function(...t){t.length!==a.length&&d(r,a.length);const s=e.scopedAllocPush();try{for(const e in t)t[e]=l.convertArgNoCheck(i[e],t[e],t,e);return l.convertResultNoCheck(n,a.apply(null,t))}finally{e.scopedAllocPop(s)}}};const q=function(e,r,n,s,i,o){if("string"==typeof n){if(1===r)return o.get(n);if(2===r)return s?(s instanceof Function||t(i,"requires a function argument."),o.set(n,s),e):(o.get(n),e)}t("Invalid arguments to",i)};return e.xWrap.resultAdapter=function e(t,r){return q(e,arguments.length,t,r,"resultAdapter()",p)},e.xWrap.argAdapter=function e(t,r){return q(e,arguments.length,t,r,"argAdapter()",f)},e.xWrap.FuncPtrAdapter=f.FuncPtrAdapter,e.xCallWrapped=function(t,r,n,...s){return Array.isArray(arguments[3])&&(s=arguments[3]),e.xWrap(t,r,n||[]).apply(null,s||[])},e.xWrap.testConvertArg=s.xWrap.convertArg,e.xWrap.testConvertResult=s.xWrap.convertResult,e},globalThis.WhWasmUtilInstaller.yawl=function(e){const t=()=>fetch(e.uri,{credentials:"same-origin"}),r=this,n=function(t){if(e.wasmUtilTarget){const n=(...e)=>{throw new Error(e.join(" "))},s=e.wasmUtilTarget;if(s.module=t.module,s.instance=t.instance,s.instance.exports.memory||(s.memory=e.imports&&e.imports.env&&e.imports.env.memory||n("Missing 'memory' object!")),!s.alloc&&t.instance.exports.malloc){const e=t.instance.exports;s.alloc=function(t){return e.malloc(t)||n("Allocation of",t,"bytes failed.")},s.dealloc=function(t){e.free(t)}}r(s)}return e.onload&&e.onload(t,e),t};return WebAssembly.instantiateStreaming?function(){return WebAssembly.instantiateStreaming(t(),e.imports||{}).then(n)}:function(){return t().then((e=>e.arrayBuffer())).then((t=>WebAssembly.instantiate(t,e.imports||{}))).then(n)}}.bind(globalThis.WhWasmUtilInstaller),globalThis.Jaccwabyt=function e(t){const r=(...e)=>{throw new Error(e.join(" "))};t.heap instanceof WebAssembly.Memory||t.heap instanceof Function||r("config.heap must be WebAssembly.Memory instance or a function."),["alloc","dealloc"].forEach((function(e){t[e]instanceof Function||r("Config option '"+e+"' must be a function.")}));const n=e,s=t.heap instanceof Function?t.heap:()=>new Uint8Array(t.heap.buffer),i=t.alloc,o=t.dealloc,a=t.log||console.log.bind(console),l=t.memberPrefix||"",c=t.memberSuffix||"",_=void 0===t.bigIntEnabled?!!globalThis.BigInt64Array:!!t.bigIntEnabled,u=globalThis.BigInt,d=globalThis.BigInt64Array,f=t.ptrSizeof||4,p=t.ptrIR||"i32";n.debugFlags||(n.__makeDebugFlags=function(e=null){e&&e.__flags&&(e=e.__flags);const t=function e(t){return 0===arguments.length?e.__flags:(t<0?(delete e.__flags.getter,delete e.__flags.setter,delete e.__flags.alloc,delete e.__flags.dealloc):(e.__flags.getter=!!(1&t),e.__flags.setter=!!(2&t),e.__flags.alloc=!!(4&t),e.__flags.dealloc=!!(8&t)),e._flags)};return Object.defineProperty(t,"__flags",{iterable:!1,writable:!1,value:Object.create(e)}),e||t(0),t},n.debugFlags=n.__makeDebugFlags());const m=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),h=e=>(e=>"("===e[1])(e)?"p":e[0],g=function(e){switch(h(e)){case"c":case"C":return"i8";case"i":return"i32";case"p":case"P":case"s":return p;case"j":return"i64";case"f":return"float";case"d":return"double"}r("Unhandled signature IR:",e)},b=d?()=>!0:()=>r("BigInt64Array is not available."),y=(e,t)=>e+"::"+t,q=new WeakMap,v="(pointer-is-external)",w=function(e,t,r){if(r||(r=q.get(t)),r){if(q.delete(t),Array.isArray(t.ondispose)){let n;for(;n=t.ondispose.shift();)try{n instanceof Function?n.call(t):n instanceof D?n.dispose():"number"==typeof n&&o(n)}catch(t){console.warn("ondispose() for",e.structName,"@",r,"threw. NOT propagating it.",t)}}else if(t.ondispose instanceof Function)try{t.ondispose()}catch(t){console.warn("ondispose() for",e.structName,"@",r,"threw. NOT propagating it.",t)}delete t.ondispose,e.debugFlags.__flags.dealloc&&a("debug.dealloc:",t[v]?"EXTERNAL":"",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+r),t[v]||o(r)}},E=e=>({configurable:!1,writable:!1,iterable:!1,value:e}),S=function(e,t,n){let o=!n;n?Object.defineProperty(t,v,E(n)):(n=i(e.structInfo.sizeof))||r("Allocation of",e.structName,"structure failed.");try{e.debugFlags.__flags.alloc&&a("debug.alloc:",o?"":"EXTERNAL",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+n),o&&s().fill(0,n,n+e.structInfo.sizeof),q.set(t,n)}catch(r){throw w(e,t,n),r}},A=E((e=>l+e+c)),x=function(e,t,n=!0){let s=e.members[t];if(!s&&(l||c)){for(const r of Object.values(e.members))if(r.key===t){s=r;break}!s&&n&&r(y(e.name,t),"is not a mapped struct member.")}return s},T=function e(t,r,n=!1){e._||(e._=e=>e.replace(/[^vipPsjrdcC]/g,"").replace(/[pPscC]/g,"i"));const s=x(t.structInfo,r,!0);return n?e._(s.signature):s.signature},I={configurable:!1,enumerable:!1,get:function(){return q.get(this)},set:()=>r("Cannot assign the 'pointer' property of a struct.")},k=E((function(){const e=[];for(const t of Object.keys(this.structInfo.members))e.push(this.memberKey(t));return e})),F=new TextDecoder("utf-8"),O=new TextEncoder,P="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,L=function(e){"s"!==e.signature&&r("Invalid member type signature for C-string value:",JSON.stringify(e))},C=function(e,...t){e.ondispose?Array.isArray(e.ondispose)||(e.ondispose=[e.ondispose]):e.ondispose=[],e.ondispose.push(...t)},N=function(e){const t=O.encode(e),n=i(t.length+1);n||r("Allocation error while duplicating string:",e);const o=s();return o.set(t,n),o[n+t.length]=0,n},D=function(e,t){arguments[2]!==E&&r("Do not call the StructType constructor","from client-level code."),Object.defineProperties(this,{structName:E(e),structInfo:E(t)})};D.prototype=Object.create(null,{dispose:E((function(){w(this.constructor,this)})),lookupMember:E((function(e,t=!0){return x(this.structInfo,e,t)})),memberToJsString:E((function(e){return function(e,t){const r=x(e.structInfo,t,!0);L(r);const n=e[r.key];if(!n)return null;let i=n;const o=s();for(;0!==o[i];++i);return n===i?"":(a=o,l=n,c=i,F.decode(a.buffer instanceof P?a.slice(l,c):a.subarray(l,c)));var a,l,c}(this,e)})),memberIsString:E((function(e,t=!0){return function(e,t,r=!1){const n=x(e.structInfo,t,r);return!(!n||1!==n.signature.length||"s"!==n.signature[0])&&n}(this,e,t)})),memberKey:A,memberKeys:k,memberSignature:E((function(e,t=!1){return T(this,e,t)})),memoryDump:E((function(){const e=this.pointer;return e?new Uint8Array(s().slice(e,e+this.structInfo.sizeof)):null})),pointer:I,setMemberCString:E((function(e,t){return function(e,t,r){const n=x(e.structInfo,t,!0);L(n);const s=N(r);return e[n.key]=s,C(e,s),e}(this,e,t)}))}),Object.assign(D.prototype,{addOnDispose:function(...e){return C(this,...e),this}}),Object.defineProperties(D,{allocCString:E(N),isA:E((e=>e instanceof D)),hasExternalPointer:E((e=>e instanceof D&&!!e[v])),memberKey:A});const R=e=>Number.isFinite(e)||e instanceof(u||Number),M=function e(t,n,i){if(!e._){e._={getters:{},setters:{},sw:{}};const t=["i","c","C","p","P","s","f","d","v()"];_&&t.push("j"),t.forEach((function(t){e._.getters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"getInt32";case 8:return b()&&"getBigInt64"}break;case"i":return"getInt32";case"c":return"getInt8";case"C":return"getUint8";case"j":return b()&&"getBigInt64";case"f":return"getFloat32";case"d":return"getFloat64"}r("Unhandled DataView getter for signature:",e)}(t),e._.setters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"setInt32";case 8:return b()&&"setBigInt64"}break;case"i":return"setInt32";case"c":return"setInt8";case"C":return"setUint8";case"j":return b()&&"setBigInt64";case"f":return"setFloat32";case"d":return"setFloat64"}r("Unhandled DataView setter for signature:",e)}(t),e._.sw[t]=function(e){switch(h(e)){case"i":case"f":case"c":case"C":case"d":return Number;case"j":return b()&&u;case"p":case"P":case"s":switch(f){case 4:return Number;case 8:return b()&&u}}r("Unhandled DataView set wrapper for signature:",e)}(t)}));const n=/^[ipPsjfdcC]$/,s=/^[vipPsjfdcC]\([ipPsjfdcC]*\)$/;e.sigCheck=function(e,t,i,o){Object.prototype.hasOwnProperty.call(e,i)&&r(e.structName,"already has a property named",i+"."),n.test(o)||s.test(o)||r("Malformed signature for",y(e.structName,t)+":",o)}}const o=t.memberKey(n);e.sigCheck(t.prototype,n,o,i.signature),i.key=o,i.name=n;const l=h(i.signature),c=y(t.prototype.structName,o),d=t.prototype.debugFlags.__flags,p=Object.create(null);var q,v;p.configurable=!1,p.enumerable=!1,p.get=function(){d.getter&&a("debug.getter:",e._.getters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof);let t=new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.getters[l]](0,m);return d.getter&&a("debug.getter:",c,"result =",t),t},i.readOnly?p.set=(q=t.prototype.structName,v=o,()=>r(y(q,v),"is read-only.")):p.set=function(t){if(d.setter&&a("debug.setter:",e._.setters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof,t),this.pointer||r("Cannot set struct property on disposed instance."),null===t)t=0;else for(;!R(t);){if("P"===i.signature&&t instanceof D){t=t.pointer||0,d.setter&&a("debug.setter:",c,"resolved to",t);break}r("Invalid value for pointer-type",c+".")}new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.setters[l]](0,e._.sw[l](t),m)},Object.defineProperty(t.prototype,o,p)},j=function e(t,s){1===arguments.length?t=(s=t).name:s.name||(s.name=t),t||r("Struct name is required.");let i=!1;Object.keys(s.members).forEach((e=>{const n=s.members[e];n.sizeof?1===n.sizeof?"c"===n.signature||"C"===n.signature||r("Unexpected sizeof==1 member",y(s.name,e),"with signature",n.signature):(0!=n.sizeof%4&&(console.warn("Invalid struct member description =",n,"from",s),r(t,"member",e,"sizeof is not aligned. sizeof="+n.sizeof)),0!=n.offset%4&&(console.warn("Invalid struct member description =",n,"from",s),r(t,"member",e,"offset is not aligned. offset="+n.offset))):r(t,"member",e,"is missing sizeof."),(!i||i.offsete instanceof a)),memberKey:A,memberKeys:k,methodInfoForKey:E((function(e){})),structInfo:E(s),structName:E(t)}),a.prototype=new D(t,s,E),Object.defineProperties(a.prototype,{debugFlags:o,constructor:E(a)}),Object.keys(s.members).forEach((e=>M(a,e,s.members[e]))),a};return j.StructType=D,j.config=t,j.allocCString=N,j.debugFlags||(j.debugFlags=n.__makeDebugFlags(n.debugFlags)),j},globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...e)=>{throw new Error(e.join(" "))},r=(e.SQLite3Error.toss,e.capi),n=e.wasm,s=e.util;if(globalThis.WhWasmUtilInstaller(n),delete globalThis.WhWasmUtilInstaller,n.bindingSignatures=[["sqlite3_aggregate_context","void*","sqlite3_context*","int"],["sqlite3_bind_double","int","sqlite3_stmt*","int","f64"],["sqlite3_bind_int","int","sqlite3_stmt*","int","int"],["sqlite3_bind_null",void 0,"sqlite3_stmt*","int"],["sqlite3_bind_parameter_count","int","sqlite3_stmt*"],["sqlite3_bind_parameter_index","int","sqlite3_stmt*","string"],["sqlite3_bind_pointer","int","sqlite3_stmt*","int","*","string:static","*"],["sqlite3_busy_handler","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({signature:"i(pi)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_busy_timeout","int","sqlite3*","int"],["sqlite3_changes","int","sqlite3*"],["sqlite3_clear_bindings","int","sqlite3_stmt*"],["sqlite3_collation_needed","int","sqlite3*","*","*"],["sqlite3_column_blob","*","sqlite3_stmt*","int"],["sqlite3_column_bytes","int","sqlite3_stmt*","int"],["sqlite3_column_count","int","sqlite3_stmt*"],["sqlite3_column_double","f64","sqlite3_stmt*","int"],["sqlite3_column_int","int","sqlite3_stmt*","int"],["sqlite3_column_name","string","sqlite3_stmt*","int"],["sqlite3_column_text","string","sqlite3_stmt*","int"],["sqlite3_column_type","int","sqlite3_stmt*","int"],["sqlite3_column_value","sqlite3_value*","sqlite3_stmt*","int"],["sqlite3_commit_hook","void*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_commit_hook",signature:"i(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_compileoption_get","string","int"],["sqlite3_compileoption_used","int","string"],["sqlite3_complete","int","string:flexible"],["sqlite3_context_db_handle","sqlite3*","sqlite3_context*"],["sqlite3_data_count","int","sqlite3_stmt*"],["sqlite3_db_filename","string","sqlite3*","string"],["sqlite3_db_handle","sqlite3*","sqlite3_stmt*"],["sqlite3_db_name","string","sqlite3*","int"],["sqlite3_db_status","int","sqlite3*","int","*","*","int"],["sqlite3_errcode","int","sqlite3*"],["sqlite3_errmsg","string","sqlite3*"],["sqlite3_error_offset","int","sqlite3*"],["sqlite3_errstr","string","int"],["sqlite3_exec","int",["sqlite3*","string:flexible",new n.xWrap.FuncPtrAdapter({signature:"i(pipp)",bindScope:"transient",callProxy:e=>{let t;return(s,i,o,a)=>{try{const r=n.cArgvToJs(i,o);return t||(t=n.cArgvToJs(i,a)),0|e(r,t)}catch(e){return e.resultCode||r.SQLITE_ERROR}}}}),"*","**"]],["sqlite3_expanded_sql","string","sqlite3_stmt*"],["sqlite3_extended_errcode","int","sqlite3*"],["sqlite3_extended_result_codes","int","sqlite3*","int"],["sqlite3_file_control","int","sqlite3*","string","int","*"],["sqlite3_finalize","int","sqlite3_stmt*"],["sqlite3_free",void 0,"*"],["sqlite3_get_auxdata","*","sqlite3_context*","int"],["sqlite3_initialize",void 0],["sqlite3_keyword_count","int"],["sqlite3_keyword_name","int",["int","**","*"]],["sqlite3_keyword_check","int",["string","int"]],["sqlite3_libversion","string"],["sqlite3_libversion_number","int"],["sqlite3_limit","int",["sqlite3*","int","int"]],["sqlite3_malloc","*","int"],["sqlite3_open","int","string","*"],["sqlite3_open_v2","int","string","*","int","string"],["sqlite3_progress_handler",void 0,["sqlite3*","int",new n.xWrap.FuncPtrAdapter({name:"xProgressHandler",signature:"i(p)",bindScope:"context",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_realloc","*","*","int"],["sqlite3_reset","int","sqlite3_stmt*"],["sqlite3_result_blob",void 0,"sqlite3_context*","*","int","*"],["sqlite3_result_double",void 0,"sqlite3_context*","f64"],["sqlite3_result_error",void 0,"sqlite3_context*","string","int"],["sqlite3_result_error_code",void 0,"sqlite3_context*","int"],["sqlite3_result_error_nomem",void 0,"sqlite3_context*"],["sqlite3_result_error_toobig",void 0,"sqlite3_context*"],["sqlite3_result_int",void 0,"sqlite3_context*","int"],["sqlite3_result_null",void 0,"sqlite3_context*"],["sqlite3_result_pointer",void 0,"sqlite3_context*","*","string:static","*"],["sqlite3_result_subtype",void 0,"sqlite3_value*","int"],["sqlite3_result_text",void 0,"sqlite3_context*","string","int","*"],["sqlite3_result_zeroblob",void 0,"sqlite3_context*","int"],["sqlite3_rollback_hook","void*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_rollback_hook",signature:"v(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_set_authorizer","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_set_authorizer::xAuth",signature:"i(pissss)",contextKey:(e,t)=>e[0],callProxy:e=>(t,s,i,o,a,l)=>{try{return i=i&&n.cstrToJs(i),o=o&&n.cstrToJs(o),a=a&&n.cstrToJs(a),l=l&&n.cstrToJs(l),e(t,s,i,o,a,l)||0}catch(e){return e.resultCode||r.SQLITE_ERROR}}}),"*"]],["sqlite3_set_auxdata",void 0,["sqlite3_context*","int","*",new n.xWrap.FuncPtrAdapter({name:"xDestroyAuxData",signature:"v(*)",contextKey:(e,t)=>e[0]})]],["sqlite3_shutdown",void 0],["sqlite3_sourceid","string"],["sqlite3_sql","string","sqlite3_stmt*"],["sqlite3_status","int","int","*","*","int"],["sqlite3_step","int","sqlite3_stmt*"],["sqlite3_stmt_isexplain","int",["sqlite3_stmt*"]],["sqlite3_stmt_readonly","int",["sqlite3_stmt*"]],["sqlite3_stmt_status","int","sqlite3_stmt*","int","int"],["sqlite3_strglob","int","string","string"],["sqlite3_stricmp","int","string","string"],["sqlite3_strlike","int","string","string","int"],["sqlite3_strnicmp","int","string","string","int"],["sqlite3_table_column_metadata","int","sqlite3*","string","string","string","**","**","*","*","*"],["sqlite3_total_changes","int","sqlite3*"],["sqlite3_trace_v2","int",["sqlite3*","int",new n.xWrap.FuncPtrAdapter({name:"sqlite3_trace_v2::callback",signature:"i(ippp)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_txn_state","int",["sqlite3*","string"]],["sqlite3_uri_boolean","int","sqlite3_filename","string","int"],["sqlite3_uri_key","string","sqlite3_filename","int"],["sqlite3_uri_parameter","string","sqlite3_filename","string"],["sqlite3_user_data","void*","sqlite3_context*"],["sqlite3_value_blob","*","sqlite3_value*"],["sqlite3_value_bytes","int","sqlite3_value*"],["sqlite3_value_double","f64","sqlite3_value*"],["sqlite3_value_dup","sqlite3_value*","sqlite3_value*"],["sqlite3_value_free",void 0,"sqlite3_value*"],["sqlite3_value_frombind","int","sqlite3_value*"],["sqlite3_value_int","int","sqlite3_value*"],["sqlite3_value_nochange","int","sqlite3_value*"],["sqlite3_value_numeric_type","int","sqlite3_value*"],["sqlite3_value_pointer","*","sqlite3_value*","string:static"],["sqlite3_value_subtype","int","sqlite3_value*"],["sqlite3_value_text","string","sqlite3_value*"],["sqlite3_value_type","int","sqlite3_value*"],["sqlite3_vfs_find","*","string"],["sqlite3_vfs_register","int","sqlite3_vfs*","int"],["sqlite3_vfs_unregister","int","sqlite3_vfs*"]],n.exports.sqlite3_activate_see instanceof Function&&n.bindingSignatures.push(["sqlite3_key","int","sqlite3*","string","int"],["sqlite3_key_v2","int","sqlite3*","string","*","int"],["sqlite3_rekey","int","sqlite3*","string","int"],["sqlite3_rekey_v2","int","sqlite3*","string","*","int"],["sqlite3_activate_see",void 0,"string"]),n.bindingSignatures.int64=[["sqlite3_bind_int64","int",["sqlite3_stmt*","int","i64"]],["sqlite3_changes64","i64",["sqlite3*"]],["sqlite3_column_int64","i64",["sqlite3_stmt*","int"]],["sqlite3_create_module","int",["sqlite3*","string","sqlite3_module*","*"]],["sqlite3_create_module_v2","int",["sqlite3*","string","sqlite3_module*","*","*"]],["sqlite3_declare_vtab","int",["sqlite3*","string:flexible"]],["sqlite3_deserialize","int","sqlite3*","string","*","i64","i64","int"],["sqlite3_drop_modules","int",["sqlite3*","**"]],["sqlite3_last_insert_rowid","i64",["sqlite3*"]],["sqlite3_malloc64","*","i64"],["sqlite3_msize","i64","*"],["sqlite3_overload_function","int",["sqlite3*","string","int"]],["sqlite3_preupdate_blobwrite","int","sqlite3*"],["sqlite3_preupdate_count","int","sqlite3*"],["sqlite3_preupdate_depth","int","sqlite3*"],["sqlite3_preupdate_hook","*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_preupdate_hook",signature:"v(ppippjj)",contextKey:e=>e[0],callProxy:e=>(t,r,s,i,o,a,l)=>{e(t,r,s,n.cstrToJs(i),n.cstrToJs(o),a,l)}}),"*"]],["sqlite3_preupdate_new","int",["sqlite3*","int","**"]],["sqlite3_preupdate_old","int",["sqlite3*","int","**"]],["sqlite3_realloc64","*","*","i64"],["sqlite3_result_int64",void 0,"*","i64"],["sqlite3_result_zeroblob64","int","*","i64"],["sqlite3_serialize","*","sqlite3*","string","*","int"],["sqlite3_set_last_insert_rowid",void 0,["sqlite3*","i64"]],["sqlite3_status64","int","int","*","*","int"],["sqlite3_total_changes64","i64",["sqlite3*"]],["sqlite3_update_hook","*",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"sqlite3_update_hook",signature:"v(iippj)",contextKey:e=>e[0],callProxy:e=>(t,r,s,i,o)=>{e(t,r,n.cstrToJs(s),n.cstrToJs(i),o)}}),"*"]],["sqlite3_uri_int64","i64",["sqlite3_filename","string","i64"]],["sqlite3_value_int64","i64","sqlite3_value*"],["sqlite3_vtab_collation","string","sqlite3_index_info*","int"],["sqlite3_vtab_distinct","int","sqlite3_index_info*"],["sqlite3_vtab_in","int","sqlite3_index_info*","int","int"],["sqlite3_vtab_in_first","int","sqlite3_value*","**"],["sqlite3_vtab_in_next","int","sqlite3_value*","**"],["sqlite3_vtab_nochange","int","sqlite3_context*"],["sqlite3_vtab_on_conflict","int","sqlite3*"],["sqlite3_vtab_rhs_value","int","sqlite3_index_info*","int","**"]],n.bigIntEnabled&&n.exports.sqlite3changegroup_add){const e={signature:"i(ps)",callProxy:e=>(t,s)=>{try{return 0|e(t,n.cstrToJs(s))}catch(e){return e.resultCode||r.SQLITE_ERROR}}};n.bindingSignatures.int64.push(["sqlite3changegroup_add","int",["sqlite3_changegroup*","int","void*"]],["sqlite3changegroup_add_strm","int",["sqlite3_changegroup*",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changegroup_delete",void 0,["sqlite3_changegroup*"]],["sqlite3changegroup_new","int",["**"]],["sqlite3changegroup_output","int",["sqlite3_changegroup*","int*","**"]],["sqlite3changegroup_output_strm","int",["sqlite3_changegroup*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply","int",["sqlite3*","int","void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_strm","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_v2","int",["sqlite3*","int","void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_apply_v2_strm","int",["sqlite3*",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new n.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_concat","int",["int","void*","int","void*","int*","**"]],["sqlite3changeset_concat_strm","int",[new n.xWrap.FuncPtrAdapter({name:"xInputA",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xInputB",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_conflict","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_finalize","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_fk_conflicts","int",["sqlite3_changeset_iter*","int*"]],["sqlite3changeset_invert","int",["int","void*","int*","**"]],["sqlite3changeset_invert_strm","int",[new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_new","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_next","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_old","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_op","int",["sqlite3_changeset_iter*","**","int*","int*","int*"]],["sqlite3changeset_pk","int",["sqlite3_changeset_iter*","**","int*"]],["sqlite3changeset_start","int",["**","int","*"]],["sqlite3changeset_start_strm","int",["**",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changeset_start_v2","int",["**","int","*","int"]],["sqlite3changeset_start_v2_strm","int",["**",new n.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*","int"]],["sqlite3session_attach","int",["sqlite3_session*","string"]],["sqlite3session_changeset","int",["sqlite3_session*","int*","**"]],["sqlite3session_changeset_size","i64",["sqlite3_session*"]],["sqlite3session_changeset_strm","int",["sqlite3_session*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_config","int",["int","void*"]],["sqlite3session_create","int",["sqlite3*","string","**"]],["sqlite3session_diff","int",["sqlite3_session*","string","string","**"]],["sqlite3session_enable","int",["sqlite3_session*","int"]],["sqlite3session_indirect","int",["sqlite3_session*","int"]],["sqlite3session_isempty","int",["sqlite3_session*"]],["sqlite3session_memory_used","i64",["sqlite3_session*"]],["sqlite3session_object_config","int",["sqlite3_session*","int","void*"]],["sqlite3session_patchset","int",["sqlite3_session*","*","**"]],["sqlite3session_patchset_strm","int",["sqlite3_session*",new n.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_table_filter",void 0,["sqlite3_session*",new n.xWrap.FuncPtrAdapter({name:"xFilter",...e,contextKey:(e,t)=>e[0]}),"*"]])}n.bindingSignatures.wasm=[["sqlite3_wasm_db_reset","int","sqlite3*"],["sqlite3_wasm_db_vfs","sqlite3_vfs*","sqlite3*","string"],["sqlite3_wasm_vfs_create_file","int","sqlite3_vfs*","string","*","int"],["sqlite3_wasm_posix_create_file","int","string","*","int"],["sqlite3_wasm_vfs_unlink","int","sqlite3_vfs*","string"]],e.StructBinder=globalThis.Jaccwabyt({heap:n.heap8u,alloc:n.alloc,dealloc:n.dealloc,bigIntEnabled:n.bigIntEnabled,memberPrefix:"$"}),delete globalThis.Jaccwabyt;{const i=n.xWrap.argAdapter("string");n.xWrap.argAdapter("string:flexible",(e=>i(s.flexibleString(e)))),n.xWrap.argAdapter("string:static",function(e){return n.isPtr(e)?e:this[e=""+e]||(this[e]=n.allocCString(e))}.bind(Object.create(null)));const o=n.xWrap.argAdapter("*"),a=function(){};n.xWrap.argAdapter("sqlite3_filename",o)("sqlite3_context*",o)("sqlite3_value*",o)("void*",o)("sqlite3_changegroup*",o)("sqlite3_changeset_iter*",o)("sqlite3_session*",o)("sqlite3_stmt*",(t=>o(t instanceof(e?.oo1?.Stmt||a)?t.pointer:t)))("sqlite3*",(t=>o(t instanceof(e?.oo1?.DB||a)?t.pointer:t)))("sqlite3_index_info*",(e=>o(e instanceof(r.sqlite3_index_info||a)?e.pointer:e)))("sqlite3_module*",(e=>o(e instanceof(r.sqlite3_module||a)?e.pointer:e)))("sqlite3_vfs*",(t=>"string"==typeof t?r.sqlite3_vfs_find(t)||e.SQLite3Error.toss(r.SQLITE_NOTFOUND,"Unknown sqlite3_vfs name:",t):o(t instanceof(r.sqlite3_vfs||a)?t.pointer:t)));const l=n.xWrap.resultAdapter("*");n.xWrap.resultAdapter("sqlite3*",l)("sqlite3_context*",l)("sqlite3_stmt*",l)("sqlite3_value*",l)("sqlite3_vfs*",l)("void*",l),0===n.exports.sqlite3_step.length&&(n.xWrap.doArgcCheck=!1,e.config.warn("Disabling sqlite3.wasm.xWrap.doArgcCheck due to environmental quirks."));for(const e of n.bindingSignatures)r[e[0]]=n.xWrap.apply(null,e);for(const e of n.bindingSignatures.wasm)n[e[0]]=n.xWrap.apply(null,e);const c=function(e){return()=>t(e+"() is unavailable due to lack","of BigInt support in this build.")};for(const e of n.bindingSignatures.int64)r[e[0]]=n.bigIntEnabled?n.xWrap.apply(null,e):c(e[0]);if(delete n.bindingSignatures,n.exports.sqlite3_wasm_db_error){const t=n.xWrap("sqlite3_wasm_db_error","int","sqlite3*","int","string");s.sqlite3_wasm_db_error=function(n,s,i){return s instanceof e.WasmAllocError?(s=r.SQLITE_NOMEM,i=0):s instanceof Error&&(i=i||""+s,s=s.resultCode||r.SQLITE_ERROR),n?t(n,s,i):s}}else s.sqlite3_wasm_db_error=function(e,t,r){return console.warn("sqlite3_wasm_db_error() is not exported.",arguments),t}}{const i=n.xCall("sqlite3_wasm_enum_json");i||t("Maintenance required: increase sqlite3_wasm_enum_json()'s","static buffer size!"),n.ctype=JSON.parse(n.cstrToJs(i));const o=["access","authorizer","blobFinalizers","changeset","config","dataTypes","dbConfig","dbStatus","encodings","fcntl","flock","ioCap","limits","openFlags","prepareFlags","resultCodes","sqlite3Status","stmtStatus","syncFlags","trace","txnState","udfFlags","version"];n.bigIntEnabled&&o.push("serialize","session","vtab");for(const e of o)for(const t of Object.entries(n.ctype[e]))r[t[0]]=t[1];n.functionEntry(r.SQLITE_WASM_DEALLOC)||t("Internal error: cannot resolve exported function","entry SQLITE_WASM_DEALLOC (=="+r.SQLITE_WASM_DEALLOC+").");const a=Object.create(null);for(const e of["resultCodes"])for(const t of Object.entries(n.ctype[e]))a[t[1]]=t[0];r.sqlite3_js_rc_str=e=>a[e];const l=Object.assign(Object.create(null),{WasmTestStruct:!0,sqlite3_kvvfs_methods:!s.isUIThread(),sqlite3_index_info:!n.bigIntEnabled,sqlite3_index_constraint:!n.bigIntEnabled,sqlite3_index_orderby:!n.bigIntEnabled,sqlite3_index_constraint_usage:!n.bigIntEnabled});for(const t of n.ctype.structs)l[t.name]||(r[t.name]=e.StructBinder(t));if(r.sqlite3_index_info){for(const e of["sqlite3_index_constraint","sqlite3_index_orderby","sqlite3_index_constraint_usage"])r.sqlite3_index_info[e]=r[e],delete r[e];r.sqlite3_vtab_config=n.xWrap("sqlite3_wasm_vtab_config","int",["sqlite3*","int","int"])}}const i=(e,t,n)=>s.sqlite3_wasm_db_error(e,r.SQLITE_MISUSE,t+"() requires "+n+" argument"+(1===n?"":"s")+"."),o=e=>s.sqlite3_wasm_db_error(e,r.SQLITE_FORMAT,"SQLITE_UTF8 is the only supported encoding."),a=e=>n.xWrap.argAdapter("sqlite3*")(e),l=e=>n.isPtr(e)?n.cstrToJs(e):e,c=function(e,t){e=a(e);let r=this.dbMap.get(e);return t?(!r&&t>0&&this.dbMap.set(e,r=Object.create(null)),r):(this.dbMap.delete(e),r)}.bind(Object.assign(Object.create(null),{dbMap:new Map}));c.addCollation=function(e,t){const r=c(e,1);r.collation||(r.collation=new Set),r.collation.add(l(t).toLowerCase())},c._addUDF=function(e,t,r,n){t=l(t).toLowerCase();let s=n.get(t);s||n.set(t,s=new Set),s.add(r<0?-1:r)},c.addFunction=function(e,t,r){const n=c(e,1);n.udf||(n.udf=new Map),this._addUDF(e,t,r,n.udf)},c.addWindowFunc=function(e,t,r){const n=c(e,1);n.wudf||(n.wudf=new Map),this._addUDF(e,t,r,n.wudf)},c.cleanup=function(e){const t=[e=a(e)];for(const e of["sqlite3_busy_handler","sqlite3_commit_hook","sqlite3_preupdate_hook","sqlite3_progress_handler","sqlite3_rollback_hook","sqlite3_set_authorizer","sqlite3_trace_v2","sqlite3_update_hook"]){const s=n.exports[e];t.length=s.length;try{r[e](...t)}catch(r){console.warn("close-time call of",e+"(",t,") threw:",r)}}const s=c(e,0);if(!s)return;if(s.collation){for(const t of s.collation)try{r.sqlite3_create_collation_v2(e,t,r.SQLITE_UTF8,0,0,0)}catch(e){}delete s.collation}let i;for(i=0;i<2;++i){const t=i?s.wudf:s.udf;if(!t)continue;const n=i?r.sqlite3_create_window_function:r.sqlite3_create_function_v2;for(const s of t){const t=s[0],o=s[1],a=[e,t,0,r.SQLITE_UTF8,0,0,0,0,0];i&&a.push(0);for(const e of o)try{a[2]=e,n.apply(null,a)}catch(e){}o.clear()}t.clear()}delete s.udf,delete s.wudf};{const e=n.xWrap("sqlite3_close_v2","int","sqlite3*");r.sqlite3_close_v2=function(t){if(1!==arguments.length)return i(t,"sqlite3_close_v2",1);if(t)try{c.cleanup(t)}catch(e){}return e(t)}}if(r.sqlite3session_table_filter){const e=n.xWrap("sqlite3session_delete",void 0,["sqlite3_session*"]);r.sqlite3session_delete=function(t){if(1!==arguments.length)return i(pDb,"sqlite3session_delete",1);t&&r.sqlite3session_table_filter(t,0,0),e(t)}}{const e=(e,t)=>"argv["+t+"]:"+e[0]+":"+n.cstrToJs(e[1]).toLowerCase(),t=n.xWrap("sqlite3_create_collation_v2","int",["sqlite3*","string","int","*",new n.xWrap.FuncPtrAdapter({name:"xCompare",signature:"i(pipip)",contextKey:e}),new n.xWrap.FuncPtrAdapter({name:"xDestroy",signature:"v(p)",contextKey:e})]);r.sqlite3_create_collation_v2=function(e,n,a,l,_,u){if(6!==arguments.length)return i(e,"sqlite3_create_collation_v2",6);if(15&a){if(r.SQLITE_UTF8!==(15&a))return o(e)}else a|=r.SQLITE_UTF8;try{const r=t(e,n,a,l,_,u);return 0===r&&_ instanceof Function&&c.addCollation(e,n),r}catch(t){return s.sqlite3_wasm_db_error(e,t)}},r.sqlite3_create_collation=(e,t,n,s,o)=>5===arguments.length?r.sqlite3_create_collation_v2(e,t,n,s,o,0):i(e,"sqlite3_create_collation",5)}{const e=function(e,t){return e[0]+":"+(e[2]<0?-1:e[2])+":"+t+":"+n.cstrToJs(e[1]).toLowerCase()},t=Object.assign(Object.create(null),{xInverseAndStep:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,n,s)=>{try{e(t,...r.sqlite3_values_to_js(n,s))}catch(e){r.sqlite3_result_error_js(t,e)}}},xFinalAndValue:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{r.sqlite3_result_js(t,e(t))}catch(e){r.sqlite3_result_error_js(t,e)}}},xFunc:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,n,s)=>{try{r.sqlite3_result_js(t,e(t,...r.sqlite3_values_to_js(n,s)))}catch(e){r.sqlite3_result_error_js(t,e)}}},xDestroy:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{e(t)}catch(e){console.error("UDF xDestroy method threw:",e)}}}}),a=n.xWrap("sqlite3_create_function_v2","int",["sqlite3*","string","int","int","*",new n.xWrap.FuncPtrAdapter({name:"xFunc",...t.xFunc}),new n.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new n.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new n.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]),l=n.xWrap("sqlite3_create_window_function","int",["sqlite3*","string","int","int","*",new n.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new n.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new n.xWrap.FuncPtrAdapter({name:"xValue",...t.xFinalAndValue}),new n.xWrap.FuncPtrAdapter({name:"xInverse",...t.xInverseAndStep}),new n.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]);r.sqlite3_create_function_v2=function e(t,n,l,_,u,d,f,p,m){if(e.length!==arguments.length)return i(t,"sqlite3_create_function_v2",e.length);if(15&_){if(r.SQLITE_UTF8!==(15&_))return o(t)}else _|=r.SQLITE_UTF8;try{const e=a(t,n,l,_,u,d,f,p,m);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function)&&c.addFunction(t,n,l),e}catch(e){return console.error("sqlite3_create_function_v2() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},r.sqlite3_create_function=function e(t,n,s,o,a,l,c,_){return e.length===arguments.length?r.sqlite3_create_function_v2(t,n,s,o,a,l,c,_,0):i(t,"sqlite3_create_function",e.length)},r.sqlite3_create_window_function=function e(t,n,a,_,u,d,f,p,m,h){if(e.length!==arguments.length)return i(t,"sqlite3_create_window_function",e.length);if(15&_){if(r.SQLITE_UTF8!==(15&_))return o(t)}else _|=r.SQLITE_UTF8;try{const e=l(t,n,a,_,u,d,f,p,m,h);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function||h instanceof Function)&&c.addWindowFunc(t,n,a),e}catch(e){return console.error("sqlite3_create_window_function() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},r.sqlite3_create_function_v2.udfSetResult=r.sqlite3_create_function.udfSetResult=r.sqlite3_create_window_function.udfSetResult=r.sqlite3_result_js,r.sqlite3_create_function_v2.udfConvertArgs=r.sqlite3_create_function.udfConvertArgs=r.sqlite3_create_window_function.udfConvertArgs=r.sqlite3_values_to_js,r.sqlite3_create_function_v2.udfSetError=r.sqlite3_create_function.udfSetError=r.sqlite3_create_window_function.udfSetError=r.sqlite3_result_error_js}{const e=(e,t)=>("string"==typeof e?t=-1:s.isSQLableTypedArray(e)?(t=e.byteLength,e=s.typedArrayToString(e instanceof ArrayBuffer?new Uint8Array(e):e)):Array.isArray(e)&&(e=e.join(""),t=-1),[e,t]),t={basic:n.xWrap("sqlite3_prepare_v3","int",["sqlite3*","string","int","int","**","**"]),full:n.xWrap("sqlite3_prepare_v3","int",["sqlite3*","*","int","int","**","**"])};r.sqlite3_prepare_v3=function n(o,a,l,c,_,u){if(n.length!==arguments.length)return i(o,"sqlite3_prepare_v3",n.length);const[d,f]=e(a,l);switch(typeof d){case"string":return t.basic(o,d,f,c,_,null);case"number":return t.full(o,d,f,c,_,u);default:return s.sqlite3_wasm_db_error(o,r.SQLITE_MISUSE,"Invalid SQL argument type for sqlite3_prepare_v2/v3().")}},r.sqlite3_prepare_v2=function e(t,n,s,o,a){return e.length===arguments.length?r.sqlite3_prepare_v3(t,n,s,0,o,a):i(t,"sqlite3_prepare_v2",e.length)}}{const e=n.xWrap("sqlite3_bind_text","int",["sqlite3_stmt*","int","string","int","*"]),t=n.xWrap("sqlite3_bind_blob","int",["sqlite3_stmt*","int","*","int","*"]);r.sqlite3_bind_text=function t(o,a,l,c,_){if(t.length!==arguments.length)return i(r.sqlite3_db_handle(o),"sqlite3_bind_text",t.length);if(n.isPtr(l)||null===l)return e(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(pMem)&&(l=pMem.join(""));try{if(s.isSQLableTypedArray(l))u=n.allocFromTypedArray(l),d=l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),r.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_text().");[u,d]=n.allocCString(l)}return e(o,a,u,d,r.SQLITE_WASM_DEALLOC)}catch(e){return n.dealloc(u),s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),e)}},r.sqlite3_bind_blob=function e(o,a,l,c,_){if(e.length!==arguments.length)return i(r.sqlite3_db_handle(o),"sqlite3_bind_blob",e.length);if(n.isPtr(l)||null===l)return t(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(l)&&(l=l.join(""));try{if(s.isBindableTypedArray(l))u=n.allocFromTypedArray(l),d=c>=0?c:l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),r.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_blob().");[u,d]=n.allocCString(l)}return t(o,a,u,d,r.SQLITE_WASM_DEALLOC)}catch(e){return n.dealloc(u),s.sqlite3_wasm_db_error(r.sqlite3_db_handle(o),e)}}}r.sqlite3_config=function(e,...t){if(arguments.length<2)return r.SQLITE_MISUSE;switch(e){case r.SQLITE_CONFIG_COVERING_INDEX_SCAN:case r.SQLITE_CONFIG_MEMSTATUS:case r.SQLITE_CONFIG_SMALL_MALLOC:case r.SQLITE_CONFIG_SORTERREF_SIZE:case r.SQLITE_CONFIG_STMTJRNL_SPILL:case r.SQLITE_CONFIG_URI:return n.exports.sqlite3_wasm_config_i(e,t[0]);case r.SQLITE_CONFIG_LOOKASIDE:return n.exports.sqlite3_wasm_config_ii(e,t[0],t[1]);case r.SQLITE_CONFIG_MEMDB_MAXSIZE:return n.exports.sqlite3_wasm_config_j(e,t[0]);case r.SQLITE_CONFIG_GETMALLOC:case r.SQLITE_CONFIG_GETMUTEX:case r.SQLITE_CONFIG_GETPCACHE2:case r.SQLITE_CONFIG_GETPCACHE:case r.SQLITE_CONFIG_HEAP:case r.SQLITE_CONFIG_LOG:case r.SQLITE_CONFIG_MALLOC:case r.SQLITE_CONFIG_MMAP_SIZE:case r.SQLITE_CONFIG_MULTITHREAD:case r.SQLITE_CONFIG_MUTEX:case r.SQLITE_CONFIG_PAGECACHE:case r.SQLITE_CONFIG_PCACHE2:case r.SQLITE_CONFIG_PCACHE:case r.SQLITE_CONFIG_PCACHE_HDRSZ:case r.SQLITE_CONFIG_PMASZ:case r.SQLITE_CONFIG_SERIALIZED:case r.SQLITE_CONFIG_SINGLETHREAD:case r.SQLITE_CONFIG_SQLLOG:case r.SQLITE_CONFIG_WIN32_HEAPSIZE:default:return r.SQLITE_NOTFOUND}};{const e=new Set;r.sqlite3_auto_extension=function(t){if(t instanceof Function)t=n.installFunction("i(ppp)",t);else if(1!==arguments.length||!n.isPtr(t))return r.SQLITE_MISUSE;const s=n.exports.sqlite3_auto_extension(t);return t!==arguments[0]&&(0===s?e.add(t):n.uninstallFunction(t)),s},r.sqlite3_cancel_auto_extension=function(e){return e&&1===arguments.length&&n.isPtr(e)?n.exports.sqlite3_cancel_auto_extension(e):0},r.sqlite3_reset_auto_extension=function(){n.exports.sqlite3_reset_auto_extension();for(const t of e)n.uninstallFunction(t);e.clear()}}const _=r.sqlite3_vfs_find("kvvfs");if(_)if(s.isUIThread()){const e=new r.sqlite3_kvvfs_methods(n.exports.sqlite3_wasm_kvvfs_methods());delete r.sqlite3_kvvfs_methods;const t=n.exports.sqlite3_wasm_kvvfsMakeKeyOnPstack,s=n.pstack,i=e=>115===n.peek(e)?sessionStorage:localStorage,o={xRead:(e,r,o,a)=>{const l=s.pointer,c=n.scopedAllocPush();try{const s=t(e,r);if(!s)return-3;const l=n.cstrToJs(s),c=i(e).getItem(l);if(!c)return-1;const _=c.length;if(a<=0)return _;if(1===a)return n.poke(o,0),_;const u=n.scopedAllocCString(c);return a>_+1&&(a=_+1),n.heap8u().copyWithin(o,u,u+a-1),n.poke(o+a-1,0),a-1}catch(e){return console.error("kvstorageRead()",e),-2}finally{s.restore(l),n.scopedAllocPop(c)}},xWrite:(e,o,a)=>{const l=s.pointer;try{const r=t(e,o);if(!r)return 1;const s=n.cstrToJs(r);return i(e).setItem(s,n.cstrToJs(a)),0}catch(e){return console.error("kvstorageWrite()",e),r.SQLITE_IOERR}finally{s.restore(l)}},xDelete:(e,o)=>{const a=s.pointer;try{const r=t(e,o);return r?(i(e).removeItem(n.cstrToJs(r)),0):1}catch(e){return console.error("kvstorageDelete()",e),r.SQLITE_IOERR}finally{s.restore(a)}}};for(const t of Object.keys(o))e[e.memberKey(t)]=n.installFunction(e.memberSignature(t),o[t])}else r.sqlite3_vfs_unregister(_);n.xWrap.FuncPtrAdapter.warnOnUse=!0})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.version={libVersion:"3.44.2",libVersionNumber:3044002,sourceId:"2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f",downloadVersion:3440200}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...t)=>{throw new e.SQLite3Error(...t)},r=e.capi,n=e.wasm,s=e.util,i=new WeakMap,o=new WeakMap,a=(e,t,r)=>{const n=Object.getOwnPropertyDescriptor(e,t);return n?n.value:r},l=function(e,n){return n&&(e instanceof d&&(e=e.pointer),t(n,"sqlite3 result code",n+":",e?r.sqlite3_errmsg(e):r.sqlite3_errstr(n))),arguments[0]},c=n.installFunction("i(ippp)",function(e,t,s,i){r.SQLITE_TRACE_STMT===e&&console.log("SQL TRACE #"+ ++this.counter+" via sqlite3@"+t+":",n.cstrToJs(i))}.bind({counter:0})),_=Object.create(null),u=function s(...a){if(!s._name2vfs){s._name2vfs=Object.create(null);const e="function"==typeof importScripts&&(e=>t("The VFS for",e,"is only available in the main window thread."));s._name2vfs[":localStorage:"]={vfs:"kvvfs",filename:e||(()=>"local")},s._name2vfs[":sessionStorage:"]={vfs:"kvvfs",filename:e||(()=>"session")}}const u=s.normalizeArgs(...a);let d=u.filename,f=u.vfs,p=u.flags;("string"!=typeof d&&"number"!=typeof d||"string"!=typeof p||f&&"string"!=typeof f&&"number"!=typeof f)&&(e.config.error("Invalid DB ctor args",u,arguments),t("Invalid arguments for DB constructor."));let m="number"==typeof d?n.cstrToJs(d):d;const h=s._name2vfs[m];h&&(f=h.vfs,d=m=h.filename(m));let g,b=0;p.indexOf("c")>=0&&(b|=r.SQLITE_OPEN_CREATE|r.SQLITE_OPEN_READWRITE),p.indexOf("w")>=0&&(b|=r.SQLITE_OPEN_READWRITE),0===b&&(b|=r.SQLITE_OPEN_READONLY),b|=r.SQLITE_OPEN_EXRESCODE;const y=n.pstack.pointer;try{const e=n.pstack.allocPtr();let t=r.sqlite3_open_v2(d,e,b,f||0);g=n.peekPtr(e),l(g,t),r.sqlite3_extended_result_codes(g,1),p.indexOf("t")>=0&&r.sqlite3_trace_v2(g,r.SQLITE_TRACE_STMT,c,g)}catch(e){throw g&&r.sqlite3_close_v2(g),e}finally{n.pstack.restore(y)}this.filename=m,i.set(this,g),o.set(this,Object.create(null));try{const n=r.sqlite3_js_db_vfs(g);n||t("Internal error: cannot get VFS for new db handle.");const s=_[n];s instanceof Function?s(this,e):s&&l(g,r.sqlite3_exec(g,s,0,0,0))}catch(e){throw this.close(),e}};u.setVfsPostOpenSql=function(e,t){_[e]=t},u.normalizeArgs=function(e=":memory:",t="c",r=null){const n={};return 1===arguments.length&&arguments[0]&&"object"==typeof arguments[0]?(Object.assign(n,arguments[0]),void 0===n.flags&&(n.flags="c"),void 0===n.vfs&&(n.vfs=null),void 0===n.filename&&(n.filename=":memory:")):(n.filename=e,n.flags=t,n.vfs=r),n};const d=function(...e){u.apply(this,e)};d.dbCtorHelper=u;const f={null:1,number:2,string:3,boolean:4,blob:5};f[void 0],f.null,n.bigIntEnabled&&(f.bigint=f.number);const p=function(){f!==arguments[2]&&t(r.SQLITE_MISUSE,"Do not call the Stmt constructor directly. Use DB.prepare()."),this.db=arguments[0],i.set(this,arguments[1]),this.parameterCount=r.sqlite3_bind_parameter_count(this.pointer)},m=function(e){return e.pointer||t("DB has been closed."),e},h=function(e,r){return(r!==(0|r)||r<0||r>=e.columnCount)&&t("Column index",r,"is out of range."),e},g=(e,t,r,...n)=>{const s=e.prepare(t);try{const e=s.bind(r).step()?s.get(...n):void 0;return s.reset(),e}finally{s.finalize()}},b=(e,t,r,n)=>e.exec({sql:t,bind:r,rowMode:n,returnValue:"resultRows"});d.checkRc=(e,t)=>l(e,t),d.prototype={isOpen:function(){return!!this.pointer},affirmOpen:function(){return m(this)},close:function(){if(this.pointer){if(this.onclose&&this.onclose.before instanceof Function)try{this.onclose.before(this)}catch(e){}const e=this.pointer;if(Object.keys(o.get(this)).forEach(((e,t)=>{if(t&&t.pointer)try{t.finalize()}catch(e){}})),i.delete(this),o.delete(this),r.sqlite3_close_v2(e),this.onclose&&this.onclose.after instanceof Function)try{this.onclose.after(this)}catch(e){}delete this.filename}},changes:function(e=!1,t=!1){const n=m(this).pointer;return e?t?r.sqlite3_total_changes64(n):r.sqlite3_total_changes(n):t?r.sqlite3_changes64(n):r.sqlite3_changes(n)},dbFilename:function(e="main"){return r.sqlite3_db_filename(m(this).pointer,e)},dbName:function(e=0){return r.sqlite3_db_name(m(this).pointer,e)},dbVfsName:function(e=0){let t;const s=r.sqlite3_js_db_vfs(m(this).pointer,e);if(s){const e=new r.sqlite3_vfs(s);try{t=n.cstrToJs(e.$zName)}finally{e.dispose()}}return t},prepare:function(e){m(this);const s=n.pstack.pointer;let i,a;try{i=n.pstack.alloc(8),d.checkRc(this,r.sqlite3_prepare_v2(this.pointer,e,-1,i,null)),a=n.peekPtr(i)}finally{n.pstack.restore(s)}a||t("Cannot prepare empty SQL.");const l=new p(this,a,f);return o.get(this)[a]=l,l},exec:function(){m(this);const e=function(e,n){const i=Object.create(null);switch(i.opt=Object.create(null),n.length){case 1:"string"==typeof n[0]||s.isSQLableTypedArray(n[0])||Array.isArray(n[0])?i.sql=n[0]:n[0]&&"object"==typeof n[0]&&(i.opt=n[0],i.sql=i.opt.sql);break;case 2:i.sql=n[0],i.opt=n[1];break;default:t("Invalid argument count for exec().")}i.sql=s.flexibleString(i.sql),"string"!=typeof i.sql&&t("Missing SQL argument or unsupported SQL value type.");const o=i.opt;switch(o.returnValue){case"resultRows":o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows;break;case"saveSql":o.saveSql||(o.saveSql=[]),i.returnVal=()=>o.saveSql;break;case void 0:case"this":i.returnVal=()=>e;break;default:t("Invalid returnValue value:",o.returnValue)}if(o.callback||o.returnValue||void 0===o.rowMode||(o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows),o.callback||o.resultRows)switch(void 0===o.rowMode?"array":o.rowMode){case"object":i.cbArg=e=>e.get(Object.create(null));break;case"array":i.cbArg=e=>e.get([]);break;case"stmt":Array.isArray(o.resultRows)&&t("exec(): invalid rowMode for a resultRows array: must","be one of 'array', 'object',","a result column number, or column name reference."),i.cbArg=e=>e;break;default:if(s.isInt32(o.rowMode)){i.cbArg=e=>e.get(o.rowMode);break}if("string"==typeof o.rowMode&&o.rowMode.length>1&&"$"===o.rowMode[0]){const e=o.rowMode.substr(1);i.cbArg=n=>{const s=n.get(Object.create(null))[e];return void 0===s?t(r.SQLITE_NOTFOUND,"exec(): unknown result column:",e):s};break}t("Invalid rowMode:",o.rowMode)}return i}(this,arguments);if(!e.sql)return t("exec() requires an SQL string.");const i=e.opt,o=i.callback,a=Array.isArray(i.resultRows)?i.resultRows:void 0;let l,c=i.bind,_=!!(e.cbArg||i.columnNames||a);const u=n.scopedAllocPush(),h=Array.isArray(i.saveSql)?i.saveSql:void 0;try{const t=s.isSQLableTypedArray(e.sql);let u=t?e.sql.byteLength:n.jstrlen(e.sql);const m=n.scopedAlloc(2*n.ptrSizeof+(u+1)),g=m+n.ptrSizeof;let b=g+n.ptrSizeof;const y=b+u;for(t?n.heap8().set(e.sql,b):n.jstrcpy(e.sql,n.heap8(),b,u,!1),n.poke(b+u,0);b&&n.peek(b,"i8");){n.pokePtr([m,g],0),d.checkRc(this,r.sqlite3_prepare_v3(this.pointer,b,u,0,m,g));const t=n.peekPtr(m);if(b=n.peekPtr(g),u=y-b,t){if(h&&h.push(r.sqlite3_sql(t).trim()),l=new p(this,t,f),c&&l.parameterCount&&(l.bind(c),c=null),_&&l.columnCount){let t=Array.isArray(i.columnNames)?0:1;if(_=!1,e.cbArg||a){for(;l.step();l._lockedByExec=!1){0==t++&&l.getColumnNames(i.columnNames),l._lockedByExec=!0;const r=e.cbArg(l);if(a&&a.push(r),o&&!1===o.call(i,r,l))break}l._lockedByExec=!1}0===t&&l.getColumnNames(i.columnNames)}else l.step();l.reset().finalize(),l=null}}}finally{n.scopedAllocPop(u),l&&(delete l._lockedByExec,l.finalize())}return e.returnVal()},createFunction:function(e,n,i){const o=e=>e instanceof Function;switch(arguments.length){case 1:e=(i=e).name,n=i.xFunc||0;break;case 2:o(n)||(n=(i=n).xFunc||0)}i||(i={}),"string"!=typeof e&&t("Invalid arguments: missing function name.");let l=i.xStep||0,c=i.xFinal||0;const _=i.xValue||0,u=i.xInverse||0;let f;o(n)?(f=!1,(o(l)||o(c))&&t("Ambiguous arguments: scalar or aggregate?"),l=c=null):o(l)?(o(c)||t("Missing xFinal() callback for aggregate or window UDF."),n=null):o(c)?t("Missing xStep() callback for aggregate or window UDF."):t("Missing function-type properties."),!1===f?(o(_)||o(u))&&t("xValue and xInverse are not permitted for non-window UDFs."):o(_)?(o(u)||t("xInverse must be provided if xValue is."),f=!0):o(u)&&t("xValue must be provided if xInverse is.");const p=i.pApp;null==p||"number"==typeof p&&s.isInt32(p)||t("Invalid value for pApp property. Must be a legal WASM pointer value.");const m=i.xDestroy||0;m&&!o(m)&&t("xDestroy property must be a function.");let h=0;a(i,"deterministic")&&(h|=r.SQLITE_DETERMINISTIC),a(i,"directOnly")&&(h|=r.SQLITE_DIRECTONLY),a(i,"innocuous")&&(h|=r.SQLITE_INNOCUOUS),e=e.toLowerCase();const g=n||l,b=a(i,"arity"),y="number"==typeof b?b:g.length?g.length-1:0;let q;return q=f?r.sqlite3_create_window_function(this.pointer,e,y,r.SQLITE_UTF8|h,p||0,l,c,_,u,m):r.sqlite3_create_function_v2(this.pointer,e,y,r.SQLITE_UTF8|h,p||0,n,l,c,m),d.checkRc(this,q),this},selectValue:function(e,t,r){return g(this,e,t,0,r)},selectValues:function(e,t,r){const n=this.prepare(e),s=[];try{for(n.bind(t);n.step();)s.push(n.get(0,r));n.reset()}finally{n.finalize()}return s},selectArray:function(e,t){return g(this,e,t,[])},selectObject:function(e,t){return g(this,e,t,{})},selectArrays:function(e,t){return b(this,e,t,"array")},selectObjects:function(e,t){return b(this,e,t,"object")},openStatementCount:function(){return this.pointer?Object.keys(o.get(this)).length:0},transaction:function(e){let n="BEGIN";arguments.length>1&&(/[^a-zA-Z]/.test(arguments[0])&&t(r.SQLITE_MISUSE,"Invalid argument for BEGIN qualifier."),n+=" "+arguments[0],e=arguments[1]),m(this).exec(n);try{const t=e(this);return this.exec("COMMIT"),t}catch(e){throw this.exec("ROLLBACK"),e}},savepoint:function(e){m(this).exec("SAVEPOINT oo1");try{const t=e(this);return this.exec("RELEASE oo1"),t}catch(e){throw this.exec("ROLLBACK to SAVEPOINT oo1; RELEASE SAVEPOINT oo1"),e}},checkRc:function(e){return l(this,e)}};const y=function(e){return e.pointer||t("Stmt has been closed."),e},q=function(e){return function(e){let t=f[null==e?"null":typeof e];switch(t){case f.boolean:case f.null:case f.number:case f.string:return t;case f.bigint:if(n.bigIntEnabled)return t;default:return s.isBindableTypedArray(e)?f.blob:void 0}}(e)||t("Unsupported bind() argument type:",typeof e)},v=function(e,r){return e._lockedByExec&&t("Operation is illegal when statement is locked:",r),e},w=function i(o,a,l,c){v(y(o),"bind()"),i._||(i._tooBigInt=e=>t("BigInt value is too big to store without precision loss:",e),i._={string:function(e,t,s,i){const[o,a]=n.allocCString(s,!0);return(i?r.sqlite3_bind_blob:r.sqlite3_bind_text)(e.pointer,t,o,a,r.SQLITE_WASM_DEALLOC)}}),q(c),a=function(e,n){const i="number"==typeof n?n:r.sqlite3_bind_parameter_index(e.pointer,n);return 0!==i&&s.isInt32(i)?(i<1||i>e.parameterCount)&&t("Bind index",n,"is out of range."):t("Invalid bind() parameter name: "+n),i}(o,a);let _=0;switch(null==c?f.null:l){case f.null:_=r.sqlite3_bind_null(o.pointer,a);break;case f.string:_=i._.string(o,a,c,!1);break;case f.number:{let e;s.isInt32(c)?e=r.sqlite3_bind_int:"bigint"==typeof c?s.bigIntFits64(c)?n.bigIntEnabled?e=r.sqlite3_bind_int64:s.bigIntFitsDouble(c)?(c=Number(c),e=r.sqlite3_bind_double):i._tooBigInt(c):i._tooBigInt(c):(c=Number(c),e=n.bigIntEnabled&&Number.isInteger(c)?r.sqlite3_bind_int64:r.sqlite3_bind_double),_=e(o.pointer,a,c);break}case f.boolean:_=r.sqlite3_bind_int(o.pointer,a,c?1:0);break;case f.blob:{if("string"==typeof c){_=i._.string(o,a,c,!0);break}c instanceof ArrayBuffer?c=new Uint8Array(c):s.isBindableTypedArray(c)||t("Binding a value as a blob requires","that it be a string, Uint8Array, Int8Array, or ArrayBuffer.");const e=n.alloc(c.byteLength||1);n.heap8().set(c.byteLength?c:[0],e),_=r.sqlite3_bind_blob(o.pointer,a,e,c.byteLength,r.SQLITE_WASM_DEALLOC);break}default:e.config.warn("Unsupported bind() argument type:",c),t("Unsupported bind() argument type: "+typeof c)}return _&&d.checkRc(o.db.pointer,_),o._mayGet=!1,o};p.prototype={finalize:function(){if(this.pointer){v(this,"finalize()");const e=r.sqlite3_finalize(this.pointer);return delete o.get(this.db)[this.pointer],i.delete(this),delete this._mayGet,delete this.parameterCount,delete this._lockedByExec,delete this.db,e}},clearBindings:function(){return v(y(this),"clearBindings()"),r.sqlite3_clear_bindings(this.pointer),this._mayGet=!1,this},reset:function(e){v(this,"reset()"),e&&this.clearBindings();const t=r.sqlite3_reset(y(this).pointer);return this._mayGet=!1,l(this.db,t),this},bind:function(){let e,r;switch(y(this),arguments.length){case 1:e=1,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:t("Invalid bind() arguments.")}return void 0===r?this:(this.parameterCount||t("This statement has no bindable parameters."),this._mayGet=!1,null===r?w(this,e,f.null,r):Array.isArray(r)?(1!==arguments.length&&t("When binding an array, an index argument is not permitted."),r.forEach(((e,t)=>w(this,t+1,q(e),e))),this):(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),"object"!=typeof r||s.isBindableTypedArray(r)?w(this,e,q(r),r):(1!==arguments.length&&t("When binding an object, an index argument is not permitted."),Object.keys(r).forEach((e=>w(this,e,q(r[e]),r[e]))),this)))},bindAsBlob:function(e,r){y(this),1===arguments.length&&(r=e,e=1);const n=q(r);return f.string!==n&&f.blob!==n&&f.null!==n&&t("Invalid value type for bindAsBlob()"),w(this,e,f.blob,r)},step:function(){v(this,"step()");const t=r.sqlite3_step(y(this).pointer);switch(t){case r.SQLITE_DONE:return this._mayGet=!1;case r.SQLITE_ROW:return this._mayGet=!0;default:this._mayGet=!1,e.config.warn("sqlite3_step() rc=",t,r.sqlite3_js_rc_str(t),"SQL =",r.sqlite3_sql(this.pointer)),d.checkRc(this.db.pointer,t)}},stepReset:function(){return this.step(),this.reset()},stepFinalize:function(){try{const e=this.step();return this.reset(),e}finally{try{this.finalize()}catch(e){}}},get:function(e,i){if(y(this)._mayGet||t("Stmt.step() has not (recently) returned true."),Array.isArray(e)){let t=0;const r=this.columnCount;for(;t=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t).valueOf():t}{const n=r.sqlite3_column_double(this.pointer,e);return(n>Number.MAX_SAFE_INTEGER||nt("The pointer property is read-only.")};Object.defineProperty(p.prototype,"pointer",e),Object.defineProperty(d.prototype,"pointer",e)}if(Object.defineProperty(p.prototype,"columnCount",{enumerable:!1,get:function(){return r.sqlite3_column_count(this.pointer)},set:()=>t("The columnCount property is read-only.")}),e.oo1={DB:d,Stmt:p},s.isUIThread()){e.oo1.JsStorageDb=function(e="session"){"session"!==e&&"local"!==e&&t("JsStorageDb db name must be one of 'session' or 'local'."),u.call(this,{filename:e,flags:"c",vfs:"kvvfs"})};const n=e.oo1.JsStorageDb;n.prototype=Object.create(d.prototype),n.clearStorage=r.sqlite3_js_kvvfs_clear,n.prototype.clearStorage=function(){return n.clearStorage(m(this).filename)},n.storageSize=r.sqlite3_js_kvvfs_size,n.prototype.storageSize=function(){return n.storageSize(m(this).filename)}}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.initWorker1API=function(){const e=(...e)=>{throw new Error(e.join(" "))};globalThis.WorkerGlobalScope instanceof Function||e("initWorker1API() must be run from a Worker thread.");const t=this.sqlite3||e("Missing this.sqlite3 object."),r=t.oo1.DB,n=function(e){let t=s.idMap.get(e);return t||(t="db#"+ ++s.idSeq+"@"+e.pointer,s.idMap.set(e,t),t)},s={dbList:[],idSeq:0,idMap:new WeakMap,xfer:[],open:function(e){const t=new r(e);return this.dbs[n(t)]=t,this.dbList.indexOf(t)<0&&this.dbList.push(t),t},close:function(e,r){if(e){delete this.dbs[n(e)];const s=e.filename,i=t.wasm.sqlite3_wasm_db_vfs(e.pointer,0);e.close();const o=this.dbList.indexOf(e);o>=0&&this.dbList.splice(o,1),r&&s&&i&&t.wasm.sqlite3_wasm_vfs_unlink(i,s)}},post:function(e,t){t&&t.length?(globalThis.postMessage(e,Array.from(t)),t.length=0):globalThis.postMessage(e)},dbs:Object.create(null),getDb:function(t,r=!0){return this.dbs[t]||(r?e("Unknown (or closed) DB ID:",t):void 0)}},i=function(t,r=!0){const n=s.getDb(t.dbId,!1)||s.dbList[0];return r?function(t=s.dbList[0]){return t&&t.pointer?t:e("DB is not opened.")}(n):n},o={open:function(r){const i=Object.create(null),o=r.args||Object.create(null);o.simulateError&&e("Throwing because of simulateError flag.");const a=Object.create(null);let l,c;var _;if(i.vfs=o.vfs,""===(_=o.filename)||":"===_[0]?i.filename=o.filename||"":(i.filename=o.filename,l=o.byteArray,l&&(c=function(e){const r=/^file:.+(vfs=(\w+))/.exec(e);return t.capi.sqlite3_vfs_find(r?r[2]:0)}(o.filename))),c){let e;try{e=t.wasm.allocFromTypedArray(l);const r=t.wasm.sqlite3_wasm_vfs_create_file(c,i.filename,e,l.byteLength);r&&t.SQLite3Error.toss(r)}catch(e){throw new t.SQLite3Error(e.name+" creating "+o.filename+": "+e.message,{cause:e})}finally{e&&t.wasm.dealloc(e)}}const u=s.open(i);return a.filename=u.filename,a.persistent=!!t.capi.sqlite3_js_db_uses_vfs(u.pointer,"opfs"),a.dbId=n(u),a.vfs=u.dbVfsName(),a},close:function(e){const t=i(e,!1),r={filename:t&&t.filename};if(t){const r=!(!e.args||"object"!=typeof e.args||!e.args.unlink);s.close(t,r)}return r},exec:function(t){const r="string"==typeof t.args?{sql:t.args}:t.args||Object.create(null);"stmt"===r.rowMode?e("Invalid rowMode for 'exec': stmt mode","does not work in the Worker API."):r.sql||e("'exec' requires input SQL.");const n=i(t);(r.callback||Array.isArray(r.resultRows))&&(n._blobXfer=s.xfer);const o=r.callback;let a=0;const l=!!r.columnNames;"string"==typeof o&&(l||(r.columnNames=[]),r.callback=function(e,t){s.post({type:o,columnNames:r.columnNames,rowNumber:++a,row:e},s.xfer)});try{const e=r.countChanges?n.changes(!0,64===r.countChanges):void 0;n.exec(r),void 0!==e&&(r.changeCount=n.changes(!0,64===r.countChanges)-e),r.callback instanceof Function&&(r.callback=o,s.post({type:o,columnNames:r.columnNames,rowNumber:null,row:void 0}))}finally{delete n._blobXfer,r.callback&&(r.callback=o)}return r},"config-get":function(){const e=Object.create(null),r=t.config;return["bigIntEnabled"].forEach((function(t){Object.getOwnPropertyDescriptor(r,t)&&(e[t]=r[t])})),e.version=t.version,e.vfsList=t.capi.sqlite3_js_vfs_list(),e.opfsEnabled=!!t.opfs,e},export:function(e){const r=i(e),n={byteArray:t.capi.sqlite3_js_db_export(r.pointer),filename:r.filename,mimetype:"application/x-sqlite3"};return s.xfer.push(n.byteArray.buffer),n},toss:function(t){e("Testing worker exception")},"opfs-tree":async function(r){return t.opfs||e("OPFS support is unavailable."),await t.opfs.treeList()}};globalThis.onmessage=async function(t){let r,i=(t=t.data).dbId,a=t.type;const l=performance.now();try{o.hasOwnProperty(a)&&o[a]instanceof Function?r=await o[a](t):e("Unknown db worker message type:",t.type)}catch(e){a="error",r={operation:t.type,message:e.message,errorClass:e.name,input:t},e.stack&&(r.stack="string"==typeof e.stack?e.stack.split(/\n\s*/):e.stack)}i||(i=r.dbId||s.dbList[0]&&n(s.dbList[0])),s.post({type:a,dbId:i,messageId:t.messageId,workerReceivedTime:l,workerRespondTime:performance.now(),departureTime:t.departureTime,result:r},s.xfer)},globalThis.postMessage({type:"sqlite3-api",result:"worker1-ready"})}.bind({sqlite3:e})})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.wasm,r=e.capi,n=e.util.toss3,s=Object.create(null),i=Object.create(null),o=e.StructBinder;e.vfs=s,e.vtab=i;const a=r.sqlite3_index_info;a.prototype.nthConstraint=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const r=this.$aConstraint+a.sqlite3_index_constraint.structInfo.sizeof*e;return t?r:new a.sqlite3_index_constraint(r)},a.prototype.nthConstraintUsage=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const r=this.$aConstraintUsage+a.sqlite3_index_constraint_usage.structInfo.sizeof*e;return t?r:new a.sqlite3_index_constraint_usage(r)},a.prototype.nthOrderBy=function(e,t=!1){if(e<0||e>=this.$nOrderBy)return!1;const r=this.$aOrderBy+a.sqlite3_index_orderby.structInfo.sizeof*e;return t?r:new a.sqlite3_index_orderby(r)};const l=function e(r,s,i,a=e.installMethodArgcCheck){if(r instanceof o.StructType?i instanceof Function||t.isPtr(i)||n("Usage errror: expecting a Function or WASM pointer to one."):n("Usage error: target object is-not-a StructType."),1===arguments.length)return(t,n)=>e(r,t,n,a);e.argcProxy||(e.argcProxy=function(e,t,r,s){return function(...i){return r.length!==arguments.length&&n("Argument mismatch for",e.structInfo.name+"::"+t+": Native signature is:",s),r.apply(this,i)}},e.removeFuncList=function(){this.ondispose.__removeFuncList&&(this.ondispose.__removeFuncList.forEach(((e,r)=>{if("number"==typeof e)try{t.uninstallFunction(e)}catch(e){}})),delete this.ondispose.__removeFuncList)});const l=r.memberSignature(s);l.length<2&&n("Member",s,"does not have a function pointer signature:",l);const c=r.memberKey(s),_=a&&!t.isPtr(i)?e.argcProxy(r,c,i,l):i;if(t.isPtr(_))_&&!t.functionEntry(_)&&n("Pointer",_,"is not a WASM function table entry."),r[c]=_;else{const n=t.installFunction(_,r.memberSignature(s,!0));r[c]=n,r.ondispose&&r.ondispose.__removeFuncList||(r.addOnDispose("ondispose.__removeFuncList handler",e.removeFuncList),r.ondispose.__removeFuncList=[]),r.ondispose.__removeFuncList.push(c,n)}return(t,n)=>e(r,t,n,a)};l.installMethodArgcCheck=!1;const c=function(e,t,r=l.installMethodArgcCheck){const n=new Map;for(const s of Object.keys(t)){const i=t[s],o=n.get(i);if(o){const t=e.memberKey(s);e[t]=e[e.memberKey(o)]}else l(e,s,i,r),n.set(i,s)}return e};o.StructType.prototype.installMethod=function(e,t,r=l.installMethodArgcCheck){return arguments.length<3&&e&&"object"==typeof e?c(this,...arguments):l(this,...arguments)},o.StructType.prototype.installMethods=function(e,t=l.installMethodArgcCheck){return c(this,e,t)},r.sqlite3_vfs.prototype.registerVfs=function(t=!1){this instanceof e.capi.sqlite3_vfs||n("Expecting a sqlite3_vfs-type argument.");const s=r.sqlite3_vfs_register(this,t?1:0);return s&&n("sqlite3_vfs_register(",this,") failed with rc",s),this.pointer!==r.sqlite3_vfs_find(this.$zName)&&n("BUG: sqlite3_vfs_find(vfs.$zName) failed for just-installed VFS",this),this},s.installVfs=function(e){let r=0;const s=["io","vfs"];for(const n of s){const s=e[n];s&&(++r,c(s.struct,s.methods,!!s.applyArgcCheck),"vfs"===n&&(s.struct.$zName||"string"!=typeof s.name||s.struct.addOnDispose(s.struct.$zName=t.allocCString(s.name)),s.struct.registerVfs(!!s.asDefault)))}return r||n("Misuse: installVfs() options object requires at least","one of:",s),this};const _=function(r,n){const s=function(r,n){return function(s,i=!1){if(0===arguments.length&&(s=new n),s instanceof n)return this.set(s.pointer,s),s;t.isPtr(s)||e.SQLite3Error.toss("Invalid argument to",r+"()");let o=this.get(s);return i&&this.delete(s),o}.bind(new Map)}(r,n);return Object.assign(Object.create(null),{StructType:n,create:e=>{const r=s();return t.pokePtr(e,r.pointer),r},get:e=>s(e),unget:e=>s(e,!0),dispose:e=>{const t=s(e,!0);t&&t.dispose()}})};i.xVtab=_("xVtab",r.sqlite3_vtab),i.xCursor=_("xCursor",r.sqlite3_vtab_cursor),i.xIndexInfo=e=>new r.sqlite3_index_info(e),i.xError=function t(n,s,i){if(t.errorReporter instanceof Function)try{t.errorReporter("sqlite3_module::"+n+"(): "+s.message)}catch(e){}let o;return s instanceof e.WasmAllocError?o=r.SQLITE_NOMEM:arguments.length>2?o=i:s instanceof e.SQLite3Error&&(o=s.resultCode),o||r.SQLITE_ERROR},i.xError.errorReporter=console.error.bind(console),i.xRowid=(e,r)=>t.poke(e,r,"i64"),i.setupModule=function(s){let o=!1;const a=this instanceof r.sqlite3_module?this:s.struct||(o=new r.sqlite3_module);try{const r=s.methods||n("Missing 'methods' object.");for(const e of Object.entries({xConnect:"xCreate",xDisconnect:"xDestroy"})){const t=e[0],n=e[1];!0===r[t]?r[t]=r[n]:!0===r[n]&&(r[n]=r[t])}if(s.catchExceptions){const n=function(r,n){return["xConnect","xCreate"].indexOf(r)>=0?function(s,o,a,l,c,_){try{return n(...arguments)||0}catch(n){return n instanceof e.WasmAllocError||(t.dealloc(t.peekPtr(_)),t.pokePtr(_,t.allocCString(n.message))),i.xError(r,n)}}:function(...e){try{return n(...e)||0}catch(e){return i.xError(r,e)}}},s=["xCreate","xConnect","xBestIndex","xDisconnect","xDestroy","xOpen","xClose","xFilter","xNext","xEof","xColumn","xRowid","xUpdate","xBegin","xSync","xCommit","xRollback","xFindFunction","xRename","xSavepoint","xRelease","xRollbackTo","xShadowName"],o=Object.create(null);for(const e of s){const t=r[e];t instanceof Function&&("xConnect"===e&&r.xCreate===t?o[e]=r.xCreate:"xCreate"===e&&r.xConnect===t?o[e]=r.xConnect:o[e]=n(e,t))}c(a,o,!1)}else c(a,r,!!s.applyArgcCheck);if(0===a.$iVersion){let e;e="number"==typeof s.iVersion?s.iVersion:a.$xShadowName?3:a.$xSavePoint||a.$xRelease||a.$xRollbackTo?2:1,a.$iVersion=e}}catch(e){throw o&&o.dispose(),e}return a},r.sqlite3_module.prototype.setupModule=function(e){return i.setupModule.call(this,e)}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=function t(n){if(!globalThis.SharedArrayBuffer||!globalThis.Atomics)return Promise.reject(new Error("Cannot install OPFS: Missing SharedArrayBuffer and/or Atomics. The server must emit the COOP/COEP response headers to enable those. See https://sqlite.org/wasm/doc/trunk/persistence.md#coop-coep"));if("undefined"==typeof WorkerGlobalScope)return Promise.reject(new Error("The OPFS sqlite3_vfs cannot run in the main thread because it requires Atomics.wait()."));if(!(globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle&&globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle&&navigator?.storage?.getDirectory))return Promise.reject(new Error("Missing required OPFS APIs."));n&&"object"==typeof n||(n=Object.create(null));const s=new URL(globalThis.location.href).searchParams;if(s.has("opfs-disable"))return Promise.resolve(e);void 0===n.verbose&&(n.verbose=s.has("opfs-verbose")?+s.get("opfs-verbose")||2:1),void 0===n.sanityChecks&&(n.sanityChecks=s.has("opfs-sanity-check")),void 0===n.proxyUri&&(n.proxyUri=t.defaultProxyUri),"function"==typeof n.proxyUri&&(n.proxyUri=n.proxyUri());const i=new Promise((function(t,s){const i=[e.config.error,e.config.warn,e.config.log],o=(e,...t)=>{n.verbose>e&&i[e]("OPFS syncer:",...t)},a=(...e)=>o(2,...e),l=(...e)=>o(1,...e),c=(...e)=>o(0,...e),_=e.util.toss,u=e.capi,d=e.util,f=e.wasm,p=u.sqlite3_vfs,m=u.sqlite3_file,h=u.sqlite3_io_methods,g=Object.create(null);g.metrics={dump:function(){let t,r=0,n=0,s=0;for(t in x.opIds){const e=T[t];r+=e.count,n+=e.time,s+=e.wait,e.avgTime=e.count&&e.time?e.time/e.count:0,e.avgWait=e.count&&e.wait?e.wait/e.count:0}e.config.log(globalThis.location.href,"metrics for",globalThis.location.href,":",T,"\nTotal of",r,"op(s) for",n,"ms (incl. "+s+" ms of waiting on the async side)"),e.config.log("Serialization metrics:",T.s11n),E.postMessage({type:"opfs-async-metrics"})},reset:function(){let e;for(e in x.opIds)(t=T[e]=Object.create(null)).count=t.time=t.wait=0;var t;let r=T.s11n=Object.create(null);r=r.serialize=Object.create(null),r.count=r.time=0,r=T.s11n.deserialize=Object.create(null),r.count=r.time=0}};const b=new h,y=(new p).addOnDispose((()=>b.dispose()));let q;const v=e=>(q=!0,y.dispose(),s(e)),w=()=>(q=!1,t(e)),E=new Worker(new URL(r.p+r.u(892),r.b));setTimeout((()=>{void 0===q&&v(new Error("Timeout while waiting for OPFS async proxy worker."))}),4e3),E._originalOnError=E.onerror,E.onerror=function(e){c("Error initializing OPFS asyncer:",e),v(new Error("Loading OPFS async Worker failed for unknown reasons."))};const S=u.sqlite3_vfs_find(null),A=S?new p(S):null;b.$iVersion=1,y.$iVersion=2,y.$szOsFile=u.sqlite3_file.structInfo.sizeof,y.$mxPathname=1024,y.$zName=f.allocCString("opfs"),y.$xDlOpen=y.$xDlError=y.$xDlSym=y.$xDlClose=null,y.addOnDispose("$zName",y.$zName,"cleanup default VFS wrapper",(()=>A?A.dispose():null));const x=Object.create(null);x.verbose=n.verbose,x.littleEndian=(()=>{const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]})(),x.asyncIdleWaitTime=150,x.asyncS11nExceptions=1,x.fileBufferSize=65536,x.sabS11nOffset=x.fileBufferSize,x.sabS11nSize=2*y.$mxPathname,x.sabIO=new SharedArrayBuffer(x.fileBufferSize+x.sabS11nSize),x.opIds=Object.create(null);const T=Object.create(null);{let e=0;x.opIds.whichOp=e++,x.opIds.rc=e++,x.opIds.xAccess=e++,x.opIds.xClose=e++,x.opIds.xDelete=e++,x.opIds.xDeleteNoWait=e++,x.opIds.xFileSize=e++,x.opIds.xLock=e++,x.opIds.xOpen=e++,x.opIds.xRead=e++,x.opIds.xSleep=e++,x.opIds.xSync=e++,x.opIds.xTruncate=e++,x.opIds.xUnlock=e++,x.opIds.xWrite=e++,x.opIds.mkdir=e++,x.opIds["opfs-async-metrics"]=e++,x.opIds["opfs-async-shutdown"]=e++,x.opIds.retry=e++,x.sabOP=new SharedArrayBuffer(4*e),g.metrics.reset()}x.sq3Codes=Object.create(null),["SQLITE_ACCESS_EXISTS","SQLITE_ACCESS_READWRITE","SQLITE_BUSY","SQLITE_ERROR","SQLITE_IOERR","SQLITE_IOERR_ACCESS","SQLITE_IOERR_CLOSE","SQLITE_IOERR_DELETE","SQLITE_IOERR_FSYNC","SQLITE_IOERR_LOCK","SQLITE_IOERR_READ","SQLITE_IOERR_SHORT_READ","SQLITE_IOERR_TRUNCATE","SQLITE_IOERR_UNLOCK","SQLITE_IOERR_WRITE","SQLITE_LOCK_EXCLUSIVE","SQLITE_LOCK_NONE","SQLITE_LOCK_PENDING","SQLITE_LOCK_RESERVED","SQLITE_LOCK_SHARED","SQLITE_LOCKED","SQLITE_MISUSE","SQLITE_NOTFOUND","SQLITE_OPEN_CREATE","SQLITE_OPEN_DELETEONCLOSE","SQLITE_OPEN_MAIN_DB","SQLITE_OPEN_READONLY"].forEach((e=>{void 0===(x.sq3Codes[e]=u[e])&&_("Maintenance required: not found:",e)})),x.opfsFlags=Object.assign(Object.create(null),{OPFS_UNLOCK_ASAP:1,defaultUnlockAsap:!1});const I=(e,...t)=>{const r=x.opIds[e]||_("Invalid op ID:",e);x.s11n.serialize(...t),Atomics.store(x.sabOPView,x.opIds.rc,-1),Atomics.store(x.sabOPView,x.opIds.whichOp,r),Atomics.notify(x.sabOPView,x.opIds.whichOp);const n=performance.now();Atomics.wait(x.sabOPView,x.opIds.rc,-1);const s=Atomics.load(x.sabOPView,x.opIds.rc);if(T[e].wait+=performance.now()-n,s&&x.asyncS11nExceptions){const t=x.s11n.deserialize();t&&c(e+"() async error:",...t)}return s};g.debug={asyncShutdown:()=>{l("Shutting down OPFS async listener. The OPFS VFS will no longer work."),I("opfs-async-shutdown")},asyncRestart:()=>{l("Attempting to restart OPFS VFS async listener. Might work, might not."),E.postMessage({type:"opfs-async-restart"})}};const k=function e(t=16){e._chars||(e._n=(e._chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012346789").length);const r=[];let n=0;for(;n{O.start=performance.now(),O.op=e,++T[e].count},L=()=>T[O.op].time+=performance.now()-O.start,C={xCheckReservedLock:function(e,t){const r=F[e];return f.poke(t,r.lockType?1:0,"i32"),0},xClose:function(e){P("xClose");let t=0;const r=F[e];return r&&(delete F[e],t=I("xClose",e),r.sq3File&&r.sq3File.dispose()),L(),t},xDeviceCharacteristics:function(e){return u.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,r){return u.SQLITE_NOTFOUND},xFileSize:function(e,t){P("xFileSize");let r=I("xFileSize",e);if(0==r)try{const e=x.s11n.deserialize()[0];f.poke(t,e,"i64")}catch(e){c("Unexpected error reading xFileSize() result:",e),r=x.sq3Codes.SQLITE_IOERR}return L(),r},xLock:function(e,t){P("xLock");const r=F[e];let n=0;return r.lockType?r.lockType=t:(n=I("xLock",e,t),0===n&&(r.lockType=t)),L(),n},xRead:function(e,t,r,n){P("xRead");const s=F[e];let i;try{i=I("xRead",e,r,Number(n)),0!==i&&u.SQLITE_IOERR_SHORT_READ!==i||f.heap8u().set(s.sabView.subarray(0,r),t)}catch(e){c("xRead(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_READ}return L(),i},xSync:function(e,t){P("xSync"),++T.xSync.count;const r=I("xSync",e,t);return L(),r},xTruncate:function(e,t){P("xTruncate");const r=I("xTruncate",e,Number(t));return L(),r},xUnlock:function(e,t){P("xUnlock");const r=F[e];let n=0;return u.SQLITE_LOCK_NONE===t&&r.lockType&&(n=I("xUnlock",e,t)),0===n&&(r.lockType=t),L(),n},xWrite:function(e,t,r,n){P("xWrite");const s=F[e];let i;try{s.sabView.set(f.heap8u().subarray(t,t+r)),i=I("xWrite",e,r,Number(n))}catch(e){c("xWrite(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_WRITE}return L(),i}},N={xAccess:function(e,t,r,n){P("xAccess");const s=I("xAccess",f.cstrToJs(t));return f.poke(n,s?0:1,"i32"),L(),0},xCurrentTime:function(e,t){return f.poke(t,2440587.5+(new Date).getTime()/864e5,"double"),0},xCurrentTimeInt64:function(e,t){return f.poke(t,21086676e7+(new Date).getTime(),"i64"),0},xDelete:function(e,t,r){P("xDelete");const n=I("xDelete",f.cstrToJs(t),r,!1);return L(),n},xFullPathname:function(e,t,r,n){return f.cstrncpy(n,t,r)!!e)):r},g.getDirForFilename=async function(e,t=!1){const r=g.getResolvedPath(e,!0),n=r.pop();let s=g.rootDirectory;for(const e of r)e&&(s=await s.getDirectoryHandle(e,{create:!!t}));return[s,n]},g.mkdir=async function(e){try{return await g.getDirForFilename(e+"/filepart",!0),!0}catch(e){return!1}},g.entryExists=async function(e){try{const[t,r]=await g.getDirForFilename(e);return await t.getFileHandle(r),!0}catch(e){return!1}},g.randomFilename=k,g.registerVfs=(e=!1)=>f.exports.sqlite3_vfs_register(y.pointer,e?1:0),g.treeList=async function(){const e=Object.create(null);return await async function e(t,r){r.name=t.name,r.dirs=[],r.files=[];for await(const n of t.values())if("directory"===n.kind){const t=Object.create(null);r.dirs.push(t),await e(n,t)}else r.files.push(n.name)}(g.rootDirectory,e),e},g.rmfr=async function(){const e=g.rootDirectory,t={recurse:!0};for await(const r of e.values())e.removeEntry(r.name,t)},g.unlink=async function(e,t=!1,r=!1){try{const[r,n]=await g.getDirForFilename(e,!1);return await r.removeEntry(n,{recursive:t}),!0}catch(e){if(r)throw new Error("unlink(",arguments[0],") failed: "+e.message,{cause:e});return!1}},g.traverse=async function(e){const t={recursive:!0,directory:g.rootDirectory};"function"==typeof e&&(e={callback:e}),async function t(r,n){for await(const s of r.values()){if(!1===e.callback(s,r,n))return!1;if(e.recursive&&"directory"===s.kind&&!1===await t(s,n+1))break}}((e=Object.assign(t,e||{})).directory,0)},g.importDb=async function(e,t){if(t instanceof Function)return async function(e,t){const[r,n]=await g.getDirForFilename(e,!0),s=await r.getFileHandle(n,{create:!0});let i,o=await s.createSyncAccessHandle(),a=0,l=!1;try{for(o.truncate(0);void 0!==(i=await t());)i instanceof ArrayBuffer&&(i=new Uint8Array(i)),0===a&&i.byteLength>=15&&(d.affirmDbHeader(i),l=!0),o.write(i,{at:a}),a+=i.byteLength;if((a<512||0!=a%512)&&_("Input size",a,"is not correct for an SQLite database."),!l){const e=new Uint8Array(20);o.read(e,{at:0}),d.affirmDbHeader(e)}return o.write(new Uint8Array([1,1]),{at:18}),a}catch(e){throw await o.close(),o=void 0,await r.removeEntry(n).catch((()=>{})),e}finally{o&&await o.close()}}(e,t);t instanceof ArrayBuffer&&(t=new Uint8Array(t)),d.affirmIsDb(t);const r=t.byteLength,[n,s]=await g.getDirForFilename(e,!0);let i,o=0;try{const e=await n.getFileHandle(s,{create:!0});return i=await e.createSyncAccessHandle(),i.truncate(0),o=i.write(t,{at:0}),o!=r&&_("Expected to write "+r+" bytes but wrote "+o+"."),i.write(new Uint8Array([1,1]),{at:18}),o}catch(e){throw i&&(await i.close(),i=void 0),await n.removeEntry(s).catch((()=>{})),e}finally{i&&await i.close()}},e.oo1){const t=function(...t){const r=e.oo1.DB.dbCtorHelper.normalizeArgs(...t);r.vfs=y.$zName,e.oo1.DB.dbCtorHelper.call(this,r)};t.prototype=Object.create(e.oo1.DB.prototype),e.oo1.OpfsDb=t,t.importDb=g.importDb,e.oo1.DB.dbCtorHelper.setVfsPostOpenSql(y.pointer,(function(e,t){t.capi.sqlite3_busy_timeout(e,1e4),t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}E.onmessage=function({data:t}){switch(t.type){case"opfs-unavailable":v(new Error(t.payload.join(" ")));break;case"opfs-async-loaded":E.postMessage({type:"opfs-async-init",args:x});break;case"opfs-async-inited":if(!0===q)break;try{e.vfs.installVfs({io:{struct:b,methods:C},vfs:{struct:y,methods:N}}),x.sabOPView=new Int32Array(x.sabOP),x.sabFileBufView=new Uint8Array(x.sabIO,0,x.fileBufferSize),x.sabS11nView=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),(()=>{if(x.s11n)return x.s11n;const e=new TextDecoder,t=new TextEncoder("utf-8"),r=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),n=new DataView(x.sabIO,x.sabS11nOffset,x.sabS11nSize);x.s11n=Object.create(null);const s=Object.create(null);s.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},s.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},s.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},s.string={id:4};const i=e=>s[typeof e]||_("Maintenance required: this value type cannot be serialized.",e),o=e=>{switch(e){case s.number.id:return s.number;case s.bigint.id:return s.bigint;case s.boolean.id:return s.boolean;case s.string.id:return s.string;default:_("Invalid type ID:",e)}};x.s11n.deserialize=function(t=!1){++T.s11n.deserialize.count;const s=performance.now(),i=r[0],a=i?[]:null;if(i){const t=[];let s,l,c,_=1;for(s=0;s{E.onerror=E._originalOnError,delete E._originalOnError,e.opfs=g,g.rootDirectory=t,a("End of OPFS sqlite3_vfs setup.",y),w()})).catch(v):w()}catch(e){c(e),v(e)}break;default:{const e="Unexpected message from the OPFS async worker: "+JSON.stringify(t);c(e),v(new Error(e));break}}}}));return i};t.defaultProxyUri="sqlite3-opfs-async-proxy.js",globalThis.sqlite3ApiBootstrap.initializersAsync.push((async e=>{try{let r=t.defaultProxyUri;return e.scriptInfo.sqlite3Dir&&(t.defaultProxyUri=e.scriptInfo.sqlite3Dir+r),t().catch((t=>{e.config.warn("Ignoring inability to install OPFS sqlite3_vfs:",t.message)}))}catch(t){return e.config.error("installOpfsVfs() exception:",t),Promise.reject(t)}}))})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.util.toss,r=e.util.toss3,n=Object.create(null),s=e.capi,i=e.util,o=e.wasm,a=4096,l=s.SQLITE_OPEN_MAIN_DB|s.SQLITE_OPEN_MAIN_JOURNAL|s.SQLITE_OPEN_SUPER_JOURNAL|s.SQLITE_OPEN_WAL,c=".opaque",_=()=>Math.random().toString(36).slice(2),u=new TextDecoder,d=new TextEncoder,f=Object.assign(Object.create(null),{name:"opfs-sahpool",directory:void 0,initialCapacity:6,clearOnInit:!1,verbosity:2}),p=[e.config.error,e.config.warn,e.config.log],m=(e.config.log,e.config.warn),h=(e.config.error,new Map),g=e=>h.get(e),b=(e,t)=>{t?h.set(e,t):h.delete(e)},y=new Map,q=e=>y.get(e),v=(e,t)=>{t?y.set(e,t):y.delete(e)},w={xCheckReservedLock:function(e,t){const r=q(e);return r.log("xCheckReservedLock"),r.storeErr(),o.poke32(t,1),0},xClose:function(e){const t=q(e);t.storeErr();const r=t.getOFileForS3File(e);if(r)try{t.log(`xClose ${r.path}`),t.mapS3FileToOFile(e,!1),r.sah.flush(),r.flags&s.SQLITE_OPEN_DELETEONCLOSE&&t.deletePath(r.path)}catch(e){return t.storeErr(e,s.SQLITE_IOERR)}return 0},xDeviceCharacteristics:function(e){return s.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,r){return s.SQLITE_NOTFOUND},xFileSize:function(e,t){const r=q(e);r.log("xFileSize");const n=r.getOFileForS3File(e).sah.getSize()-a;return o.poke64(t,BigInt(n)),0},xLock:function(e,t){const r=q(e);return r.log(`xLock ${t}`),r.storeErr(),r.getOFileForS3File(e).lockType=t,0},xRead:function(e,t,r,n){const i=q(e);i.storeErr();const l=i.getOFileForS3File(e);i.log(`xRead ${l.path} ${r} @ ${n}`);try{const e=l.sah.read(o.heap8u().subarray(t,t+r),{at:a+Number(n)});return et&&o.poke8(r+t-1,0)}catch(i){return s.SQLITE_NOMEM}finally{o.scopedAllocPop(e)}}return i?i.sqlite3Rc||s.SQLITE_IOERR:0},xOpen:function(e,r,n,i,a){const l=g(e);try{l.log(`xOpen ${o.cstrToJs(r)} ${i}`);const e=r&&o.peek8(r)?l.getPath(r):_();let c=l.getSAHForPath(e);!c&&i&s.SQLITE_OPEN_CREATE&&(l.getFileCount()b(n.pointer,0))),a&&(n.$xRandomness=a.$xRandomness,n.$xSleep=a.$xSleep,a.dispose()),n.$xRandomness||S.xRandomness||(S.xRandomness=function(e,t,r){const n=o.heap8u();let s=0;for(;s0),e.vfs.installVfs({vfs:{struct:n,methods:S}}),n}(this.vfsName),b(this.#c.pointer,this),this.vfsDir=t.directory||"."+this.vfsName,this.#l=new DataView(this.#a.buffer,this.#a.byteOffset),this.isReady=this.reset(!!(t.clearOnInit??f.clearOnInit)).then((()=>{if(this.$error)throw this.$error;return this.getCapacity()?Promise.resolve(void 0):this.addCapacity(t.initialCapacity||f.initialCapacity)}))}#u(e,...t){this.#_>e&&p[e](this.vfsName+":",...t)}log(...e){this.#u(2,...e)}warn(...e){this.#u(1,...e)}error(...e){this.#u(0,...e)}getVfs(){return this.#c}getCapacity(){return this.#n.size}getFileCount(){return this.#s.size}getFileNames(){const e=[],t=this.#s.keys();for(const r of t)e.push(r);return e}async addCapacity(e){for(let t=0;t{try{const n=await r.createSyncAccessHandle();if(this.#n.set(n,t),e)n.truncate(a),this.setAssociatedPath(n,"",0);else{const e=this.getAssociatedPath(n);e?this.#s.set(e,n):this.#i.add(n)}}catch(e){throw this.storeErr(e),this.releaseAccessHandles(),e}})))}getAssociatedPath(e){e.read(this.#a,{at:0});const t=this.#l.getUint32(512);if(this.#a[0]&&(t&s.SQLITE_OPEN_DELETEONCLOSE||!(t&l)))return m(`Removing file with unexpected flags ${t.toString(16)}`,this.#a),this.setAssociatedPath(e,"",0),"";const r=new Uint32Array(2);e.read(r,{at:516});const n=this.computeDigest(this.#a);if(r.every(((e,t)=>e===n[t]))){const t=this.#a.findIndex((e=>0===e));return 0===t&&e.truncate(a),t?u.decode(this.#a.subarray(0,t)):""}return m("Disassociating file with bad digest."),this.setAssociatedPath(e,"",0),""}setAssociatedPath(e,r,n){const s=d.encodeInto(r,this.#a);512<=s.written+1&&t("Path too long:",r),this.#a.fill(0,s.written,512),this.#l.setUint32(512,n);const i=this.computeDigest(this.#a);e.write(this.#a,{at:0}),e.write(i,{at:516}),e.flush(),r?(this.#s.set(r,e),this.#i.delete(e)):(e.truncate(a),this.#i.add(e))}computeDigest(e){let t=3735928559,r=1103547991;for(const n of e)t=31*t+307*n,r=31*r+307*n;return new Uint32Array([t>>>0,r>>>0])}async reset(e){await this.isReady;let t,r=await navigator.storage.getDirectory();for(const e of this.vfsDir.split("/"))e&&(t=r,r=await r.getDirectoryHandle(e,{create:!0}));return this.#e=r,this.#r=t,this.#t=await this.#e.getDirectoryHandle(c,{create:!0}),this.releaseAccessHandles(),this.acquireAccessHandles(e)}getPath(e){return o.isPtr(e)&&(e=o.cstrToJs(e)),(e instanceof URL?e:new URL(e,"file://localhost/")).pathname}deletePath(e){const t=this.#s.get(e);return t&&(this.#s.delete(e),this.setAssociatedPath(t,"",0)),!!t}storeErr(e,t){return e&&(e.sqlite3Rc=t||s.SQLITE_IOERR,this.error(e)),this.$error=e,t}popErr(){const e=this.$error;return this.$error=void 0,e}nextAvailableSAH(){const[e]=this.#i.keys();return e}getOFileForS3File(e){return this.#o.get(e)}mapS3FileToOFile(e,t){t?(this.#o.set(e,t),v(e,this)):(this.#o.delete(e),v(e,!1))}hasFilename(e){return this.#s.has(e)}getSAHForPath(e){return this.#s.get(e)}async removeVfs(){if(!this.#c.pointer||!this.#t)return!1;s.sqlite3_vfs_unregister(this.#c.pointer),this.#c.dispose();try{this.releaseAccessHandles(),await this.#e.removeEntry(c,{recursive:!0}),this.#t=void 0,await this.#r.removeEntry(this.#e.name,{recursive:!0}),this.#e=this.#r=void 0}catch(t){e.config.error(this.vfsName,"removeVfs() failed:",t)}return!0}exportFile(e){const r=this.#s.get(e)||t("File not found:",e),n=r.getSize()-a,s=new Uint8Array(n>0?n:0);if(n>0){const e=r.read(s,{at:a});e!=n&&t("Expected to read "+n+" bytes but read "+e+".")}return s}async importDbChunked(e,r){const n=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to.");n.truncate(0);let o,l=0,c=!1;try{for(;void 0!==(o=await r());)o instanceof ArrayBuffer&&(o=new Uint8Array(o)),0===l&&o.byteLength>=15&&(i.affirmDbHeader(o),c=!0),n.write(o,{at:a+l}),l+=o.byteLength;if((l<512||0!=l%512)&&t("Input size",l,"is not correct for an SQLite database."),!c){const e=new Uint8Array(20);n.read(e,{at:0}),i.affirmDbHeader(e)}n.write(new Uint8Array([1,1]),{at:4114})}catch(e){throw this.setAssociatedPath(n,"",0),e}return this.setAssociatedPath(n,e,s.SQLITE_OPEN_MAIN_DB),l}importDb(e,r){if(r instanceof ArrayBuffer)r=new Uint8Array(r);else if(r instanceof Function)return this.importDbChunked(e,r);const n=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to."),i=r.byteLength;(i<512||i%512!=0)&&t("Byte array size is invalid for an SQLite db.");for(let e=0;e<15;++e)"SQLite format 3".charCodeAt(e)!==r[e]&&t("Input does not contain an SQLite database header.");const o=n.write(r,{at:a});return o!=i?(this.setAssociatedPath(n,"",0),t("Expected to write "+i+" bytes but wrote "+o+".")):(n.write(new Uint8Array([1,1]),{at:4114}),this.setAssociatedPath(n,e,s.SQLITE_OPEN_MAIN_DB)),o}}class x{#d;constructor(e){this.#d=e,this.vfsName=e.vfsName}async addCapacity(e){return this.#d.addCapacity(e)}async reduceCapacity(e){return this.#d.reduceCapacity(e)}getCapacity(){return this.#d.getCapacity(this.#d)}getFileCount(){return this.#d.getFileCount()}getFileNames(){return this.#d.getFileNames()}async reserveMinimumCapacity(e){const t=this.#d.getCapacity();return t{const e=await navigator.storage.getDirectory(),r=".opfs-sahpool-sync-check-"+_(),n=await e.getFileHandle(r,{create:!0}),s=(await n.createSyncAccessHandle()).close();return await s,await e.removeEntry(r),s?.then&&t("The local OPFS API is too old for opfs-sahpool:","it has an async FileSystemSyncAccessHandle.close() method."),!0})().then((async function(){if(r.$testThrowInInit)throw r.$testThrowInInit;const t=new A(r);return t.isReady.then((async()=>{const r=new x(t);if(e.oo1){const n=e.oo1,s=t.getVfs(),i=function(...e){const t=n.DB.dbCtorHelper.normalizeArgs(...e);t.vfs=s.$zName,n.DB.dbCtorHelper.call(this,t)};i.prototype=Object.create(n.DB.prototype),r.OpfsSAHPoolDb=i,n.DB.dbCtorHelper.setVfsPostOpenSql(s.pointer,(function(e,t){t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}return t.log("VFS initialized."),r})).catch((async e=>(await t.removeVfs().catch((()=>{})),e)))})).catch((e=>n[s]=Promise.reject(e))):n[s]=Promise.reject(new Error("Missing required OPFS APIs."))}})),void 0!==e){const t=Object.assign(Object.create(null),{exports:void 0===Re?e.asm:Re,memory:e.wasmMemory},globalThis.sqlite3ApiConfig||{});let r;globalThis.sqlite3ApiConfig=t;try{r=globalThis.sqlite3ApiBootstrap()}catch(e){throw console.error("sqlite3ApiBootstrap() error:",e),e}finally{delete globalThis.sqlite3ApiBootstrap,delete globalThis.sqlite3ApiConfig}e.sqlite3=r}else console.warn("This is not running in an Emscripten module context, so","globalThis.sqlite3ApiBootstrap() is _not_ being called due to lack","of config info for the WASM environment.","It must be called manually.")})),e.ready});const i=function(){const e=s;if(!e)throw new Error("Expecting globalThis.sqlite3InitModule to be defined by the Emscripten build.");const t=globalThis.sqlite3InitModuleState=Object.assign(Object.create(null),{moduleScript:globalThis?.document?.currentScript,isWorker:"undefined"!=typeof WorkerGlobalScope,location:globalThis.location,urlParams:globalThis?.location?.href?new URL(globalThis.location.href).searchParams:new URLSearchParams});if(t.debugModule=t.urlParams.has("sqlite3.debugModule")?(...e)=>console.warn("sqlite3.debugModule:",...e):()=>{},t.urlParams.has("sqlite3.dir"))t.sqlite3Dir=t.urlParams.get("sqlite3.dir")+"/";else if(t.moduleScript){const e=t.moduleScript.src.split("/");e.pop(),t.sqlite3Dir=e.join("/")+"/"}if(globalThis.sqlite3InitModule=function r(...n){return e(...n).then((e=>{const n=e.sqlite3;n.scriptInfo=t,r.__isUnderTest&&(n.__isUnderTest=!0);const s=n.asyncPostInit;return delete n.asyncPostInit,s()})).catch((e=>{throw console.error("Exception loading sqlite3 module:",e),e}))},globalThis.sqlite3InitModule.ready=e.ready,globalThis.sqlite3InitModuleState.moduleScript){const e=globalThis.sqlite3InitModuleState;let t=e.moduleScript.src.split("/");t.pop(),e.scriptDir=t.join("/")+"/"}return t.debugModule("sqlite3InitModuleState =",t),globalThis.sqlite3InitModule}();(s=i)().then((e=>e.initWorker1API()))})(); \ No newline at end of file diff --git a/1917.bundle.js b/1917.bundle.js index a65081a7..4dc6a82a 100644 --- a/1917.bundle.js +++ b/1917.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1917],{8595:(t,e,i)=>{i.d(e,{l:()=>n});var s=i(9523);const h=function(){const t=new ArrayBuffer(2),e=new Uint8Array(t),i=new Uint16Array(t);if(e[0]=240,e[1]=13,61453==i[0])return s.Yz.threads("System is Big-Endian"),!1;if(3568==i[0])return s.Yz.threads("System is Little-Endian"),!0;throw new Error(`Failed determining endianness: ${i}`)}();function n(t){if(h)for(let e=0;e>8|(255&t[e])<<8}},9523:(t,e,i)=>{var s;i.d(e,{KQ:()=>h,Yz:()=>r,a9:()=>n});const h={timeout:2e4,maxPageSize:4096,cacheSize:1024,headers:{}};var n;!function(t){t[t.WORKMSG=16777215]="WORKMSG",t[t.HANDSHAKE=16777214]="HANDSHAKE"}(n=n||(n={}));const o="undefined"!=typeof SQLITE_DEBUG&&SQLITE_DEBUG||void 0!==(null===(s=void 0==={env:{RLAYERS_DEBUG:void 0}}?void 0:{RLAYERS_DEBUG:void 0})||void 0===s?void 0:s.SQLITE_DEBUG)&&{RLAYERS_DEBUG:void 0}.SQLITE_DEBUG||"",a=["threads","vfs","cache","http"],r={};for(const t of a)r[t]=o.includes(t)?console.debug.bind(console):()=>{}},9663:(t,e,i)=>{i.d(e,{A:()=>w});const s="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,h="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new a}abort(t=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||t,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},n="function"==typeof AbortSignal,o="function"==typeof h.AbortSignal,a=n?AbortSignal:o?h.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(t){"abort"===t.type&&(this.aborted=!0,this.onabort(t),this._listeners.forEach((e=>e(t)),this))}onabort(){}addEventListener(t,e){"abort"===t&&this._listeners.push(e)}removeEventListener(t,e){"abort"===t&&(this._listeners=this._listeners.filter((t=>t!==e)))}},r=new Set,l=(t,e)=>{const i=`LRU_CACHE_OPTION_${t}`;u(i)&&f(i,`${t} option`,`options.${e}`,y)},c=(t,e)=>{const i=`LRU_CACHE_METHOD_${t}`;if(u(i)){const{prototype:s}=y,{get:h}=Object.getOwnPropertyDescriptor(s,t);f(i,`${t} method`,`cache.${e}()`,h)}},d=(...t)=>{"function"==typeof{env:{RLAYERS_DEBUG:void 0}}.emitWarning?{env:{RLAYERS_DEBUG:void 0}}.emitWarning(...t):console.error(...t)},u=t=>!r.has(t),f=(t,e,i,s)=>{r.add(t),d(`The ${e} is deprecated. Please use ${i} instead.`,"DeprecationWarning",t,s)},p=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),g=t=>p(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(t){super(t),this.fill(0)}}class S{constructor(t){if(0===t)return[];const e=g(t);this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class y{constructor(t={}){const{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:h,updateAgeOnGet:n,updateAgeOnHas:o,allowStale:a,dispose:c,disposeAfter:f,noDisposeOnSet:v,noUpdateTTL:w,maxSize:z=0,maxEntrySize:m=0,sizeCalculation:L,fetchMethod:_,fetchContext:A,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:E,ignoreFetchAbort:b}=t,{length:k,maxAge:O,stale:D}=t instanceof y?{}:t;if(0!==e&&!p(e))throw new TypeError("max option must be a nonnegative integer");const C=e?g(e):Array;if(!C)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=z,this.maxEntrySize=m||this.maxSize,this.sizeCalculation=L||k,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=_||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=A,!this.fetchMethod&&void 0!==A)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new C(e),this.prev=new C(e),this.head=0,this.tail=0,this.free=new S(e),this.initialFill=1,this.size=0,"function"==typeof c&&(this.dispose=c),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!b,0!==this.maxEntrySize){if(0!==this.maxSize&&!p(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!p(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!D,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!n,this.updateAgeOnHas=!!o,this.ttlResolution=p(s)||0===s?s:1,this.ttlAutopurge=!!h,this.ttl=i||O||0,this.ttl){if(!p(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const t="LRU_CACHE_UNBOUNDED";u(t)&&(r.add(t),d("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,y))}D&&l("stale","allowStale"),O&&l("maxAge","ttl"),k&&l("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(t,e,i=s.now())=>{if(this.starts[t]=0!==e?i:0,this.ttls[t]=e,0!==e&&this.ttlAutopurge){const i=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),e+1);i.unref&&i.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?s.now():0},this.statusTTL=(i,s)=>{i&&(i.ttl=this.ttls[s],i.start=this.starts[s],i.now=t||e(),i.remainingTTL=i.now+i.ttl-i.start)};let t=0;const e=()=>{const e=s.now();if(this.ttlResolution>0){t=e;const i=setTimeout((()=>t=0),this.ttlResolution);i.unref&&i.unref()}return e};this.getRemainingTTL=i=>{const s=this.keyMap.get(i);return void 0===s?0:0===this.ttls[s]||0===this.starts[s]?1/0:this.starts[s]+this.ttls[s]-(t||e())},this.isStale=i=>0!==this.ttls[i]&&0!==this.starts[i]&&(t||e())-this.starts[i]>this.ttls[i]}updateItemAge(t){}statusTTL(t,e){}setItemTTL(t,e,i){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,e,i,s)=>{if(this.isBackgroundFetch(e))return 0;if(!p(i)){if(!s)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof s)throw new TypeError("sizeCalculation must be a function");if(i=s(e,t),!p(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.addItemSize=(t,e,i)=>{if(this.sizes[t]=e,this.maxSize){const e=this.maxSize-this.sizes[t];for(;this.calculatedSize>e;)this.evict(!0)}this.calculatedSize+=this.sizes[t],i&&(i.entrySize=e,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(t){}addItemSize(t,e){}requireSize(t,e,i,s){if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.tail;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.head);)e=this.prev[e]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.head;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.tail);)e=this.next[e]}isValidIndex(t){return void 0!==t&&this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())void 0===this.valList[t]||void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield[this.keyList[t],this.valList[t]])}*rentries(){for(const t of this.rindexes())void 0===this.valList[t]||void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield[this.keyList[t],this.valList[t]])}*keys(){for(const t of this.indexes())void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.keyList[t])}*rkeys(){for(const t of this.rindexes())void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.keyList[t])}*values(){for(const t of this.indexes())void 0===this.valList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.valList[t])}*rvalues(){for(const t of this.rindexes())void 0===this.valList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.valList[t])}[Symbol.iterator](){return this.entries()}find(t,e){for(const i of this.indexes()){const s=this.valList[i],h=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;if(void 0!==h&&t(h,this.keyList[i],this))return this.get(this.keyList[i],e)}}forEach(t,e=this){for(const i of this.indexes()){const s=this.valList[i],h=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;void 0!==h&&t.call(e,h,this.keyList[i],this)}}rforEach(t,e=this){for(const i of this.rindexes()){const s=this.valList[i],h=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;void 0!==h&&t.call(e,h,this.keyList[i],this)}}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),t=!0);return t}dump(){const t=[];for(const e of this.indexes({allowStale:!0})){const i=this.keyList[e],h=this.valList[e],n=this.isBackgroundFetch(h)?h.__staleWhileFetching:h;if(void 0===n)continue;const o={value:n};if(this.ttls){o.ttl=this.ttls[e];const t=s.now()-this.starts[e];o.start=Math.floor(Date.now()-t)}this.sizes&&(o.size=this.sizes[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}dispose(t,e,i){}set(t,e,{ttl:i=this.ttl,start:s,noDisposeOnSet:h=this.noDisposeOnSet,size:n=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,status:r}={}){if(n=this.requireSize(t,e,n,o),this.maxEntrySize&&n>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.delete(t),this;let l=0===this.size?void 0:this.keyMap.get(t);if(void 0===l)l=this.newIndex(),this.keyList[l]=t,this.valList[l]=e,this.keyMap.set(t,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,n,r),r&&(r.set="add"),a=!1;else{this.moveToTail(l);const i=this.valList[l];if(e!==i){if(this.isBackgroundFetch(i)?i.__abortController.abort(new Error("replaced")):h||(this.dispose(i,t,"set"),this.disposeAfter&&this.disposed.push([i,t,"set"])),this.removeItemSize(l),this.valList[l]=e,this.addItemSize(l,n,r),r){r.set="replace";const t=i&&this.isBackgroundFetch(i)?i.__staleWhileFetching:i;void 0!==t&&(r.oldValue=t)}}else r&&(r.set="update")}if(0===i||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(l,i,s),this.statusTTL(r,l),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const e=this.head,i=this.keyList[e],s=this.valList[e];return this.isBackgroundFetch(s)?s.__abortController.abort(new Error("evicted")):(this.dispose(s,i,"evict"),this.disposeAfter&&this.disposed.push([s,i,"evict"])),this.removeItemSize(e),t&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(i),this.size--,e}has(t,{updateAgeOnHas:e=this.updateAgeOnHas,status:i}={}){const s=this.keyMap.get(t);if(void 0!==s){if(!this.isStale(s))return e&&this.updateItemAge(s),i&&(i.has="hit"),this.statusTTL(i,s),!0;i&&(i.has="stale",this.statusTTL(i,s))}else i&&(i.has="miss");return!1}peek(t,{allowStale:e=this.allowStale}={}){const i=this.keyMap.get(t);if(void 0!==i&&(e||!this.isStale(i))){const t=this.valList[i];return this.isBackgroundFetch(t)?t.__staleWhileFetching:t}}backgroundFetch(t,e,i,s){const n=void 0===e?void 0:this.valList[e];if(this.isBackgroundFetch(n))return n;const o=new h;i.signal&&i.signal.addEventListener("abort",(()=>o.abort(i.signal.reason)));const a={signal:o.signal,options:i,context:s},r=(s,h=!1)=>{const{aborted:n}=o.signal,r=i.ignoreFetchAbort&&void 0!==s;return i.status&&(n&&!h?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,r&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),!n||r||h?(this.valList[e]===c&&(void 0===s?c.__staleWhileFetching?this.valList[e]=c.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,s,a.options))),s):l(o.signal.reason)},l=s=>{const{aborted:h}=o.signal,n=h&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,r=a||i.noDeleteOnFetchRejection;if(this.valList[e]===c&&(r&&void 0!==c.__staleWhileFetching?n||(this.valList[e]=c.__staleWhileFetching):this.delete(t)),a)return i.status&&void 0!==c.__staleWhileFetching&&(i.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw s};i.status&&(i.status.fetchDispatched=!0);const c=new Promise(((e,s)=>{this.fetchMethod(t,n,a).then((t=>e(t)),s),o.signal.addEventListener("abort",(()=>{i.ignoreFetchAbort&&!i.allowStaleOnFetchAbort||(e(),i.allowStaleOnFetchAbort&&(e=t=>r(t,!0)))}))})).then(r,(t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),l(t))));return c.__abortController=o,c.__staleWhileFetching=n,c.__returned=null,void 0===e?(this.set(t,c,{...a.options,status:void 0}),e=this.keyMap.get(t)):this.valList[e]=c,c}isBackgroundFetch(t){return t&&"object"==typeof t&&"function"==typeof t.then&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||null===t.__returned)}async fetch(t,{allowStale:e=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:n=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:r=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,fetchContext:f=this.fetchContext,forceRefresh:p=!1,status:g,signal:v}={}){if(!this.fetchMethod)return g&&(g.fetch="get"),this.get(t,{allowStale:e,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:g});const S={allowStale:e,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:h,noDisposeOnSet:n,size:o,sizeCalculation:a,noUpdateTTL:r,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:u,ignoreFetchAbort:d,status:g,signal:v};let y=this.keyMap.get(t);if(void 0===y){g&&(g.fetch="miss");const e=this.backgroundFetch(t,y,S,f);return e.__returned=e}{const s=this.valList[y];if(this.isBackgroundFetch(s)){const t=e&&void 0!==s.__staleWhileFetching;return g&&(g.fetch="inflight",t&&(g.returnedStale=!0)),t?s.__staleWhileFetching:s.__returned=s}const h=this.isStale(y);if(!p&&!h)return g&&(g.fetch="hit"),this.moveToTail(y),i&&this.updateItemAge(y),this.statusTTL(g,y),s;const n=this.backgroundFetch(t,y,S,f),o=void 0!==n.__staleWhileFetching,a=o&&e;return g&&(g.fetch=o&&h?"stale":"refresh",a&&h&&(g.returnedStale=!0)),a?n.__staleWhileFetching:n.__returned=n}}get(t,{allowStale:e=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:h}={}){const n=this.keyMap.get(t);if(void 0!==n){const o=this.valList[n],a=this.isBackgroundFetch(o);return this.statusTTL(h,n),this.isStale(n)?(h&&(h.get="stale"),a?(h&&(h.returnedStale=e&&void 0!==o.__staleWhileFetching),e?o.__staleWhileFetching:void 0):(s||this.delete(t),h&&(h.returnedStale=e),e?o:void 0)):(h&&(h.get="hit"),a?o.__staleWhileFetching:(this.moveToTail(n),i&&this.updateItemAge(n),o))}h&&(h.get="miss")}connect(t,e){this.prev[e]=t,this.next[t]=e}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return c("del","delete"),this.delete}delete(t){let e=!1;if(0!==this.size){const i=this.keyMap.get(t);if(void 0!==i)if(e=!0,1===this.size)this.clear();else{this.removeItemSize(i);const e=this.valList[i];this.isBackgroundFetch(e)?e.__abortController.abort(new Error("deleted")):(this.dispose(e,t,"delete"),this.disposeAfter&&this.disposed.push([e,t,"delete"])),this.keyMap.delete(t),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(const t of this.rindexes({allowStale:!0})){const e=this.valList[t];if(this.isBackgroundFetch(e))e.__abortController.abort(new Error("deleted"));else{const i=this.keyList[t];this.dispose(e,i,"delete"),this.disposeAfter&&this.disposed.push([e,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return c("reset","clear"),this.clear}get length(){return((t,e)=>{const i=`LRU_CACHE_PROPERTY_${t}`;if(u(i)){const{prototype:e}=y,{get:s}=Object.getOwnPropertyDescriptor(e,t);f(i,`${t} property`,"cache.size",s)}})("length"),this.size}static get AbortController(){return h}static get AbortSignal(){return a}}const w=y}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1917],{8595:(t,e,i)=>{i.d(e,{l:()=>n});var s=i(9523);const h=function(){const t=new ArrayBuffer(2),e=new Uint8Array(t),i=new Uint16Array(t);if(e[0]=240,e[1]=13,61453==i[0])return s.Yz.threads("System is Big-Endian"),!1;if(3568==i[0])return s.Yz.threads("System is Little-Endian"),!0;throw new Error(`Failed determining endianness: ${i}`)}();function n(t){if(h)for(let e=0;e>8|(255&t[e])<<8}},9523:(t,e,i)=>{var s;i.d(e,{KQ:()=>h,Yz:()=>r,a9:()=>n});const h={timeout:2e4,maxPageSize:4096,cacheSize:1024,headers:{}};var n;!function(t){t[t.WORKMSG=16777215]="WORKMSG",t[t.HANDSHAKE=16777214]="HANDSHAKE"}(n=n||(n={}));const o="undefined"!=typeof SQLITE_DEBUG&&SQLITE_DEBUG||void 0!==(null===(s=void 0==={env:{RLAYERS_DEBUG:void 0}}?void 0:{RLAYERS_DEBUG:void 0})||void 0===s?void 0:s.SQLITE_DEBUG)&&{RLAYERS_DEBUG:void 0}.SQLITE_DEBUG||"",a=["threads","vfs","cache","http"],r={};for(const t of a)r[t]=o.includes(t)?console.debug.bind(console):()=>{}},9663:(t,e,i)=>{i.d(e,{A:()=>w});const s="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,h="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new a}abort(t=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||t,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},n="function"==typeof AbortSignal,o="function"==typeof h.AbortSignal,a=n?AbortSignal:o?h.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(t){"abort"===t.type&&(this.aborted=!0,this.onabort(t),this._listeners.forEach((e=>e(t)),this))}onabort(){}addEventListener(t,e){"abort"===t&&this._listeners.push(e)}removeEventListener(t,e){"abort"===t&&(this._listeners=this._listeners.filter((t=>t!==e)))}},r=new Set,l=(t,e)=>{const i=`LRU_CACHE_OPTION_${t}`;u(i)&&f(i,`${t} option`,`options.${e}`,y)},c=(t,e)=>{const i=`LRU_CACHE_METHOD_${t}`;if(u(i)){const{prototype:s}=y,{get:h}=Object.getOwnPropertyDescriptor(s,t);f(i,`${t} method`,`cache.${e}()`,h)}},d=(...t)=>{"function"==typeof{env:{RLAYERS_DEBUG:void 0}}.emitWarning?{env:{RLAYERS_DEBUG:void 0}}.emitWarning(...t):console.error(...t)},u=t=>!r.has(t),f=(t,e,i,s)=>{r.add(t),d(`The ${e} is deprecated. Please use ${i} instead.`,"DeprecationWarning",t,s)},p=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),g=t=>p(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(t){super(t),this.fill(0)}}class S{constructor(t){if(0===t)return[];const e=g(t);this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class y{constructor(t={}){const{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:h,updateAgeOnGet:n,updateAgeOnHas:o,allowStale:a,dispose:c,disposeAfter:f,noDisposeOnSet:v,noUpdateTTL:w,maxSize:z=0,maxEntrySize:m=0,sizeCalculation:L,fetchMethod:_,fetchContext:A,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:E,ignoreFetchAbort:b}=t,{length:k,maxAge:O,stale:D}=t instanceof y?{}:t;if(0!==e&&!p(e))throw new TypeError("max option must be a nonnegative integer");const C=e?g(e):Array;if(!C)throw new Error("invalid max value: "+e);if(this.max=e,this.maxSize=z,this.maxEntrySize=m||this.maxSize,this.sizeCalculation=L||k,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=_||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=A,!this.fetchMethod&&void 0!==A)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(e).fill(null),this.valList=new Array(e).fill(null),this.next=new C(e),this.prev=new C(e),this.head=0,this.tail=0,this.free=new S(e),this.initialFill=1,this.size=0,"function"==typeof c&&(this.dispose=c),"function"==typeof f?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!b,0!==this.maxEntrySize){if(0!==this.maxSize&&!p(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!p(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!D,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!n,this.updateAgeOnHas=!!o,this.ttlResolution=p(s)||0===s?s:1,this.ttlAutopurge=!!h,this.ttl=i||O||0,this.ttl){if(!p(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const t="LRU_CACHE_UNBOUNDED";u(t)&&(r.add(t),d("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,y))}D&&l("stale","allowStale"),O&&l("maxAge","ttl"),k&&l("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(t,e,i=s.now())=>{if(this.starts[t]=0!==e?i:0,this.ttls[t]=e,0!==e&&this.ttlAutopurge){const i=setTimeout((()=>{this.isStale(t)&&this.delete(this.keyList[t])}),e+1);i.unref&&i.unref()}},this.updateItemAge=t=>{this.starts[t]=0!==this.ttls[t]?s.now():0},this.statusTTL=(i,s)=>{i&&(i.ttl=this.ttls[s],i.start=this.starts[s],i.now=t||e(),i.remainingTTL=i.now+i.ttl-i.start)};let t=0;const e=()=>{const e=s.now();if(this.ttlResolution>0){t=e;const i=setTimeout((()=>t=0),this.ttlResolution);i.unref&&i.unref()}return e};this.getRemainingTTL=i=>{const s=this.keyMap.get(i);return void 0===s?0:0===this.ttls[s]||0===this.starts[s]?1/0:this.starts[s]+this.ttls[s]-(t||e())},this.isStale=i=>0!==this.ttls[i]&&0!==this.starts[i]&&(t||e())-this.starts[i]>this.ttls[i]}updateItemAge(t){}statusTTL(t,e){}setItemTTL(t,e,i){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,e,i,s)=>{if(this.isBackgroundFetch(e))return 0;if(!p(i)){if(!s)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof s)throw new TypeError("sizeCalculation must be a function");if(i=s(e,t),!p(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.addItemSize=(t,e,i)=>{if(this.sizes[t]=e,this.maxSize){const e=this.maxSize-this.sizes[t];for(;this.calculatedSize>e;)this.evict(!0)}this.calculatedSize+=this.sizes[t],i&&(i.entrySize=e,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(t){}addItemSize(t,e){}requireSize(t,e,i,s){if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.tail;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.head);)e=this.prev[e]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let e=this.head;this.isValidIndex(e)&&(!t&&this.isStale(e)||(yield e),e!==this.tail);)e=this.next[e]}isValidIndex(t){return void 0!==t&&this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())void 0===this.valList[t]||void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield[this.keyList[t],this.valList[t]])}*rentries(){for(const t of this.rindexes())void 0===this.valList[t]||void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield[this.keyList[t],this.valList[t]])}*keys(){for(const t of this.indexes())void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.keyList[t])}*rkeys(){for(const t of this.rindexes())void 0===this.keyList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.keyList[t])}*values(){for(const t of this.indexes())void 0===this.valList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.valList[t])}*rvalues(){for(const t of this.rindexes())void 0===this.valList[t]||this.isBackgroundFetch(this.valList[t])||(yield this.valList[t])}[Symbol.iterator](){return this.entries()}find(t,e){for(const i of this.indexes()){const s=this.valList[i],h=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;if(void 0!==h&&t(h,this.keyList[i],this))return this.get(this.keyList[i],e)}}forEach(t,e=this){for(const i of this.indexes()){const s=this.valList[i],h=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;void 0!==h&&t.call(e,h,this.keyList[i],this)}}rforEach(t,e=this){for(const i of this.rindexes()){const s=this.valList[i],h=this.isBackgroundFetch(s)?s.__staleWhileFetching:s;void 0!==h&&t.call(e,h,this.keyList[i],this)}}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const e of this.rindexes({allowStale:!0}))this.isStale(e)&&(this.delete(this.keyList[e]),t=!0);return t}dump(){const t=[];for(const e of this.indexes({allowStale:!0})){const i=this.keyList[e],h=this.valList[e],n=this.isBackgroundFetch(h)?h.__staleWhileFetching:h;if(void 0===n)continue;const o={value:n};if(this.ttls){o.ttl=this.ttls[e];const t=s.now()-this.starts[e];o.start=Math.floor(Date.now()-t)}this.sizes&&(o.size=this.sizes[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}dispose(t,e,i){}set(t,e,{ttl:i=this.ttl,start:s,noDisposeOnSet:h=this.noDisposeOnSet,size:n=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,status:r}={}){if(n=this.requireSize(t,e,n,o),this.maxEntrySize&&n>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.delete(t),this;let l=0===this.size?void 0:this.keyMap.get(t);if(void 0===l)l=this.newIndex(),this.keyList[l]=t,this.valList[l]=e,this.keyMap.set(t,l),this.next[this.tail]=l,this.prev[l]=this.tail,this.tail=l,this.size++,this.addItemSize(l,n,r),r&&(r.set="add"),a=!1;else{this.moveToTail(l);const i=this.valList[l];if(e!==i){if(this.isBackgroundFetch(i)?i.__abortController.abort(new Error("replaced")):h||(this.dispose(i,t,"set"),this.disposeAfter&&this.disposed.push([i,t,"set"])),this.removeItemSize(l),this.valList[l]=e,this.addItemSize(l,n,r),r){r.set="replace";const t=i&&this.isBackgroundFetch(i)?i.__staleWhileFetching:i;void 0!==t&&(r.oldValue=t)}}else r&&(r.set="update")}if(0===i||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(l,i,s),this.statusTTL(r,l),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const e=this.head,i=this.keyList[e],s=this.valList[e];return this.isBackgroundFetch(s)?s.__abortController.abort(new Error("evicted")):(this.dispose(s,i,"evict"),this.disposeAfter&&this.disposed.push([s,i,"evict"])),this.removeItemSize(e),t&&(this.keyList[e]=null,this.valList[e]=null,this.free.push(e)),this.head=this.next[e],this.keyMap.delete(i),this.size--,e}has(t,{updateAgeOnHas:e=this.updateAgeOnHas,status:i}={}){const s=this.keyMap.get(t);if(void 0!==s){if(!this.isStale(s))return e&&this.updateItemAge(s),i&&(i.has="hit"),this.statusTTL(i,s),!0;i&&(i.has="stale",this.statusTTL(i,s))}else i&&(i.has="miss");return!1}peek(t,{allowStale:e=this.allowStale}={}){const i=this.keyMap.get(t);if(void 0!==i&&(e||!this.isStale(i))){const t=this.valList[i];return this.isBackgroundFetch(t)?t.__staleWhileFetching:t}}backgroundFetch(t,e,i,s){const n=void 0===e?void 0:this.valList[e];if(this.isBackgroundFetch(n))return n;const o=new h;i.signal&&i.signal.addEventListener("abort",(()=>o.abort(i.signal.reason)));const a={signal:o.signal,options:i,context:s},r=(s,h=!1)=>{const{aborted:n}=o.signal,r=i.ignoreFetchAbort&&void 0!==s;return i.status&&(n&&!h?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,r&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),!n||r||h?(this.valList[e]===c&&(void 0===s?c.__staleWhileFetching?this.valList[e]=c.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,s,a.options))),s):l(o.signal.reason)},l=s=>{const{aborted:h}=o.signal,n=h&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,r=a||i.noDeleteOnFetchRejection;if(this.valList[e]===c&&(r&&void 0!==c.__staleWhileFetching?n||(this.valList[e]=c.__staleWhileFetching):this.delete(t)),a)return i.status&&void 0!==c.__staleWhileFetching&&(i.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw s};i.status&&(i.status.fetchDispatched=!0);const c=new Promise(((e,s)=>{this.fetchMethod(t,n,a).then((t=>e(t)),s),o.signal.addEventListener("abort",(()=>{i.ignoreFetchAbort&&!i.allowStaleOnFetchAbort||(e(),i.allowStaleOnFetchAbort&&(e=t=>r(t,!0)))}))})).then(r,(t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),l(t))));return c.__abortController=o,c.__staleWhileFetching=n,c.__returned=null,void 0===e?(this.set(t,c,{...a.options,status:void 0}),e=this.keyMap.get(t)):this.valList[e]=c,c}isBackgroundFetch(t){return t&&"object"==typeof t&&"function"==typeof t.then&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||null===t.__returned)}async fetch(t,{allowStale:e=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:n=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:r=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,fetchContext:f=this.fetchContext,forceRefresh:p=!1,status:g,signal:v}={}){if(!this.fetchMethod)return g&&(g.fetch="get"),this.get(t,{allowStale:e,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:g});const S={allowStale:e,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:h,noDisposeOnSet:n,size:o,sizeCalculation:a,noUpdateTTL:r,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:u,ignoreFetchAbort:d,status:g,signal:v};let y=this.keyMap.get(t);if(void 0===y){g&&(g.fetch="miss");const e=this.backgroundFetch(t,y,S,f);return e.__returned=e}{const s=this.valList[y];if(this.isBackgroundFetch(s)){const t=e&&void 0!==s.__staleWhileFetching;return g&&(g.fetch="inflight",t&&(g.returnedStale=!0)),t?s.__staleWhileFetching:s.__returned=s}const h=this.isStale(y);if(!p&&!h)return g&&(g.fetch="hit"),this.moveToTail(y),i&&this.updateItemAge(y),this.statusTTL(g,y),s;const n=this.backgroundFetch(t,y,S,f),o=void 0!==n.__staleWhileFetching,a=o&&e;return g&&(g.fetch=o&&h?"stale":"refresh",a&&h&&(g.returnedStale=!0)),a?n.__staleWhileFetching:n.__returned=n}}get(t,{allowStale:e=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:h}={}){const n=this.keyMap.get(t);if(void 0!==n){const o=this.valList[n],a=this.isBackgroundFetch(o);return this.statusTTL(h,n),this.isStale(n)?(h&&(h.get="stale"),a?(h&&(h.returnedStale=e&&void 0!==o.__staleWhileFetching),e?o.__staleWhileFetching:void 0):(s||this.delete(t),h&&(h.returnedStale=e),e?o:void 0)):(h&&(h.get="hit"),a?o.__staleWhileFetching:(this.moveToTail(n),i&&this.updateItemAge(n),o))}h&&(h.get="miss")}connect(t,e){this.prev[e]=t,this.next[t]=e}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return c("del","delete"),this.delete}delete(t){let e=!1;if(0!==this.size){const i=this.keyMap.get(t);if(void 0!==i)if(e=!0,1===this.size)this.clear();else{this.removeItemSize(i);const e=this.valList[i];this.isBackgroundFetch(e)?e.__abortController.abort(new Error("deleted")):(this.dispose(e,t,"delete"),this.disposeAfter&&this.disposed.push([e,t,"delete"])),this.keyMap.delete(t),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return e}clear(){for(const t of this.rindexes({allowStale:!0})){const e=this.valList[t];if(this.isBackgroundFetch(e))e.__abortController.abort(new Error("deleted"));else{const i=this.keyList[t];this.dispose(e,i,"delete"),this.disposeAfter&&this.disposed.push([e,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return c("reset","clear"),this.clear}get length(){return(t=>{const e=`LRU_CACHE_PROPERTY_${t}`;if(u(e)){const{prototype:i}=y,{get:s}=Object.getOwnPropertyDescriptor(i,t);f(e,`${t} property`,"cache.size",s)}})("length"),this.size}static get AbortController(){return h}static get AbortSignal(){return a}}const w=y}}]); \ No newline at end of file diff --git a/1973.bundle.js b/1973.bundle.js index 28677903..5201880c 100644 --- a/1973.bundle.js +++ b/1973.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1973],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),d=e(540),u=e.n(d),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},1973:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var l=e(6540),r=e(3407),t=e(4294),a=(e(5045),e(7240)),i=e(4995),c=e.n(i);const s={origin:[2.364,48.82],Montmartre:[2.342,48.887]};function p(){const[n,o]=l.useState(s.Montmartre);return l.createElement(l.Fragment,null,l.createElement(a.f9,{className:"example-map",initial:{center:(0,r.Rb)(s.origin),zoom:11}},l.createElement(a.ej,null),l.createElement(a.j9,null,l.createElement(a.Dp,{geometry:new t.A((0,r.Rb)(n)),onPointerDrag:(0,l.useCallback)((n=>{const o=n.map.getCoordinateFromPixel(n.pixel);return n.target.setGeometry(new t.A(o)),!1}),[]),onPointerDragEnd:(0,l.useCallback)((n=>{const e=n.map.getCoordinateFromPixel(n.pixel);o((0,r.WP)(e))}),[]),onPointerEnter:(0,l.useCallback)((n=>(n.map.getTargetElement().style.cursor="move")&&void 0),[]),onPointerLeave:(0,l.useCallback)((n=>(n.map.getTargetElement().style.cursor="initial")&&void 0),[])},l.createElement(a.cq.RStyle,null,l.createElement(a.cq.RIcon,{src:c(),anchor:[.5,.8]})),l.createElement(a.Rv,{className:"example-overlay"},"Move me")))),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"Pin location is ",l.createElement("strong",null,`${n[1].toFixed(3)} : ${n[0].toFixed(3)}`))))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[1973],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var r=e(1601),l=e.n(r),t=e(6314),a=e.n(t)()(l());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var r=e(5072),l=e.n(r),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),d=e(540),u=e.n(d),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),l()(g.A,x),g.A&&g.A.locals&&g.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},1973:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var r=e(6540),l=e(3407),t=e(4294),a=(e(5045),e(7240)),i=e(4995),c=e.n(i);const s={origin:[2.364,48.82],Montmartre:[2.342,48.887]};function p(){const[n,o]=r.useState(s.Montmartre);return r.createElement(r.Fragment,null,r.createElement(a.f9,{className:"example-map",initial:{center:(0,l.Rb)(s.origin),zoom:11}},r.createElement(a.ej,null),r.createElement(a.j9,null,r.createElement(a.Dp,{geometry:new t.A((0,l.Rb)(n)),onPointerDrag:(0,r.useCallback)((n=>{const o=n.map.getCoordinateFromPixel(n.pixel);return n.target.setGeometry(new t.A(o)),!1}),[]),onPointerDragEnd:(0,r.useCallback)((n=>{const e=n.map.getCoordinateFromPixel(n.pixel);o((0,l.WP)(e))}),[]),onPointerEnter:(0,r.useCallback)((n=>(n.map.getTargetElement().style.cursor="move")&&void 0),[]),onPointerLeave:(0,r.useCallback)((n=>(n.map.getTargetElement().style.cursor="initial")&&void 0),[])},r.createElement(a.cq.RStyle,null,r.createElement(a.cq.RIcon,{src:c(),anchor:[.5,.8]})),r.createElement(a.Rv,{className:"example-overlay"},"Move me")))),r.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},r.createElement("p",null,"Pin location is ",r.createElement("strong",null,`${n[1].toFixed(3)} : ${n[0].toFixed(3)}`))))}}}]); \ No newline at end of file diff --git a/198.bundle.js b/198.bundle.js index 1657831d..16811691 100644 --- a/198.bundle.js +++ b/198.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[198],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),u=l(540),p=l.n(u),d=l(1113),g=l.n(d),m=l(4096),x={};x.styleTagTransform=g(),x.setAttributes=b(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),r()(m.A,x),m.A&&m.A.locals&&m.A.locals},198:(n,o,l)=>{l.r(o),l.d(o,{default:()=>i});var e=l(6540),r=l(3407),t=(l(5045),l(7240));const a=[2.364,48.82];function i(){const[n,o]=e.useState(!1);return e.createElement(e.Fragment,null,e.createElement(t.f9,{className:"example-map",initial:{center:(0,r.Rb)(a),zoom:11}},e.createElement(t.ej,null),e.createElement(t.E6.Ip,{className:"ol-overviewmap example-overview",collapsed:n},e.createElement(t.ej,null))),e.createElement("button",{className:"btn btn-primary",onClick:(0,e.useCallback)((()=>o(!n)),[n])},"Optional external toggle"))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[198],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),u=l(540),p=l.n(u),d=l(1113),g=l.n(d),m=l(4096),v={};v.styleTagTransform=g(),v.setAttributes=b(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p(),r()(m.A,v),m.A&&m.A.locals&&m.A.locals},198:(n,o,l)=>{l.r(o),l.d(o,{default:()=>i});var e=l(6540),r=l(3407),t=(l(5045),l(7240));const a=[2.364,48.82];function i(){const[n,o]=e.useState(!1);return e.createElement(e.Fragment,null,e.createElement(t.f9,{className:"example-map",initial:{center:(0,r.Rb)(a),zoom:11}},e.createElement(t.ej,null),e.createElement(t.E6.Ip,{className:"ol-overviewmap example-overview",collapsed:n},e.createElement(t.ej,null))),e.createElement("button",{className:"btn btn-primary",onClick:(0,e.useCallback)((()=>o(!n)),[n])},"Optional external toggle"))}}}]); \ No newline at end of file diff --git a/2003.bundle.js b/2003.bundle.js index 03533f8d..b4643074 100644 --- a/2003.bundle.js +++ b/2003.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2003],{4096:(o,n,e)=>{e.d(n,{A:()=>a});var r=e(1601),t=e.n(r),l=e(6314),i=e.n(l)()(t());i.push([o.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const a=i},5045:(o,n,e)=>{var r=e(5072),t=e.n(r),l=e(7825),i=e.n(l),a=e(7659),s=e.n(a),c=e(5056),u=e.n(c),d=e(540),b=e.n(d),p=e(1113),h=e.n(p),g=e(4096),m={};m.styleTagTransform=h(),m.setAttributes=u(),m.insert=s().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=b(),t()(g.A,m),g.A&&g.A.locals&&g.A.locals},2003:(o,n,e)=>{e.r(n),e.d(n,{default:()=>d});var r=e(6540),t=e(3407),l=(e(5045),e(7240)),i=e(945),a=e(2662),s=e(1443);class c extends a.A{constructor(o,n){super(o,n),this.addon=Promise.all([e.e(3075),e.e(5451),e.e(1060)]).then(e.bind(e,1060)),this.ol=new i.A,this.source=null,this.abort=null,this.createSource()}createSource(){(0,s.A)("createSource start",this),this.metadata=this.addon.then((o=>{var n,e,r,t;return o.importMBTiles({url:this.props.url,sqlWorkers:null!==(n=this.props.workers)&&void 0!==n?n:4,sqlCacheSize:null!==(e=this.props.sqlCacheSize)&&void 0!==e?e:4096,maxSqlPageSize:null!==(r=this.props.maxSqlPageSize)&&void 0!==r?r:4096,backendType:null!==(t=this.props.backend)&&void 0!==t?t:"sync"})}));const o=new AbortController;this.abort=o,Promise.all([this.addon,this.metadata]).then((([n,e])=>o.signal.aborted?((0,s.A)("createSource aborted",this),void e.pool.then((o=>o.close()))):(this.source=new n.MBTilesRasterSource(e),this.eventSources=[this.ol,this.source],this.ol.setSource(this.source),this.attachOldEventHandlers(this.source),this.props.onMetadataReady&&this.props.onMetadataReady.call(this,e),this.source)))}destroySource(){(0,s.A)("destroySource",this,this.abort),this.source&&(this.source.dispose(),this.source=null,this.ol&&this.ol.setSource(null)),this.abort&&(this.abort.abort(),this.abort=null)}componentWillUnmount(){super.componentWillUnmount(),this.destroySource()}refresh(o){super.refresh(o),(null==o?void 0:o.url)!==this.props.url&&(this.destroySource(),this.createSource())}}const u=(0,t.Rb)([55.47437,-21.08468]);function d(){return r.createElement(l.f9,{width:"100%",height:"60vh",initial:{center:u,zoom:9}},r.createElement(c,{url:"https://velivole.b-cdn.net/tiles-RGR92UTM40S.mbtiles"}))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2003],{4096:(o,n,e)=>{e.d(n,{A:()=>a});var r=e(1601),t=e.n(r),l=e(6314),i=e.n(l)()(t());i.push([o.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const a=i},5045:(o,n,e)=>{var r=e(5072),t=e.n(r),l=e(7825),i=e.n(l),a=e(7659),s=e.n(a),c=e(5056),u=e.n(c),d=e(540),p=e.n(d),b=e(1113),h=e.n(b),g=e(4096),m={};m.styleTagTransform=h(),m.setAttributes=u(),m.insert=s().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=p(),t()(g.A,m),g.A&&g.A.locals&&g.A.locals},2003:(o,n,e)=>{e.r(n),e.d(n,{default:()=>d});var r=e(6540),t=e(3407),l=(e(5045),e(7240)),i=e(945),a=e(2662),s=e(1443);class c extends a.A{constructor(o,n){super(o,n),this.addon=Promise.all([e.e(3075),e.e(1060)]).then(e.bind(e,1060)),this.ol=new i.A,this.source=null,this.abort=null,this.createSource()}createSource(){(0,s.A)("createSource start",this),this.metadata=this.addon.then((o=>{var n,e,r,t;return o.importMBTiles({url:this.props.url,sqlWorkers:null!==(n=this.props.workers)&&void 0!==n?n:4,sqlCacheSize:null!==(e=this.props.sqlCacheSize)&&void 0!==e?e:4096,maxSqlPageSize:null!==(r=this.props.maxSqlPageSize)&&void 0!==r?r:4096,backendType:null!==(t=this.props.backend)&&void 0!==t?t:"sync"})}));const o=new AbortController;this.abort=o,Promise.all([this.addon,this.metadata]).then((([n,e])=>o.signal.aborted?((0,s.A)("createSource aborted",this),void e.pool.then((o=>o.close()))):(this.source=new n.MBTilesRasterSource(e),this.eventSources=[this.ol,this.source],this.ol.setSource(this.source),this.attachOldEventHandlers(this.source),this.props.onMetadataReady&&this.props.onMetadataReady.call(this,e),this.source)))}destroySource(){(0,s.A)("destroySource",this,this.abort),this.source&&(this.source.dispose(),this.source=null,this.ol&&this.ol.setSource(null)),this.abort&&(this.abort.abort(),this.abort=null)}componentWillUnmount(){super.componentWillUnmount(),this.destroySource()}refresh(o){super.refresh(o),(null==o?void 0:o.url)!==this.props.url&&(this.destroySource(),this.createSource())}}const u=(0,t.Rb)([55.47437,-21.08468]);function d(){return r.createElement(l.f9,{width:"100%",height:"60vh",initial:{center:u,zoom:9}},r.createElement(c,{url:"https://velivole.b-cdn.net/tiles-RGR92UTM40S.mbtiles"}))}}}]); \ No newline at end of file diff --git a/2099.bundle.js b/2099.bundle.js index 5bc756bd..5dfc328f 100644 --- a/2099.bundle.js +++ b/2099.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2099],{89:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>a});var r=t(6540),o=t(7240),u=t(5553),i=t(114),l=t(6946),n=(t(5045),t(8110)),c=t(4078);n.A.defs("EPSG:32636","+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"),(0,c.kz)(n.A);class h extends u.A{constructor(e,s){super(e,s),this.createSource(),this.ol=new i.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){this.source=new l.A({sources:this.props.urls.map((e=>({url:e})))}),this.eventSources=[this.ol,this.source]}componentDidMount(){super.componentDidMount(),this.context.map.setView(this.source.getView())}refresh(e){var s;super.refresh(e),(null===(s=null==e?void 0:e.urls)||void 0===s?void 0:s.length)===this.props.urls.length&&this.props.urls.every(((s,t)=>{var r;return s===(null===(r=null==e?void 0:e.urls)||void 0===r?void 0:r[t])}))||(this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source))}}function a(){return r.createElement(o.f9,{width:"100%",height:"60vh",initial:{center:[0,0],zoom:1}},r.createElement(h,{properties:{label:"GeoTIFF"},urls:["https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/36/Q/WD/2020/7/S2A_36QWD_20200701_0_L2A/TCI.tif"]}))}},8625:()=>{},6504:()=>{},6580:()=>{}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2099],{89:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>a});var r=t(6540),o=t(7240),u=t(5553),i=t(114),l=t(9633),n=(t(5045),t(8110)),c=t(4078);n.A.defs("EPSG:32636","+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"),(0,c.kz)(n.A);class h extends u.A{constructor(e,s){super(e,s),this.createSource(),this.ol=new i.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){this.source=new l.A({sources:this.props.urls.map((e=>({url:e})))}),this.eventSources=[this.ol,this.source]}componentDidMount(){super.componentDidMount(),this.context.map.setView(this.source.getView())}refresh(e){var s;super.refresh(e),(null===(s=null==e?void 0:e.urls)||void 0===s?void 0:s.length)===this.props.urls.length&&this.props.urls.every(((s,t)=>{var r;return s===(null===(r=null==e?void 0:e.urls)||void 0===r?void 0:r[t])}))||(this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source))}}function a(){return r.createElement(o.f9,{width:"100%",height:"60vh",initial:{center:[0,0],zoom:1}},r.createElement(h,{properties:{label:"GeoTIFF"},urls:["https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/36/Q/WD/2020/7/S2A_36QWD_20200701_0_L2A/TCI.tif"]}))}},8625:()=>{},6504:()=>{},6580:()=>{}}]); \ No newline at end of file diff --git a/2148.bundle.js b/2148.bundle.js index 42139ec7..0a15699e 100644 --- a/2148.bundle.js +++ b/2148.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2148],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var l=e(1601),t=e.n(l),r=e(6314),a=e.n(r)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{var l=e(5072),t=e.n(l),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),b=e.n(s),u=e(540),d=e.n(u),p=e(1113),g=e.n(p),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=b(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),t()(m.A,x),m.A&&m.A.locals&&m.A.locals},2148:(n,o,e)=>{e.r(o),e.d(o,{default:()=>i});var l=e(6540),t=e(3407),r=e(915),a=(e(5045),e(7240));function i(){const n=(0,t.Jt)("EPSG:4326"),o=n.getWorldExtent(),e=(0,r.q1)(o),[i,c]=l.useState(!0),[s,b]=l.useState(!1),[u,d]=l.useState(!0),p=a.cq.useRStyle(),g=l.useCallback((n=>((n+360)%360).toLocaleString()+"°"),[]),m=l.useCallback((n=>n.toLocaleString()+"°"),[]);return l.createElement(l.Fragment,null,l.createElement("button",{className:"btn btn-secondary m-2",onClick:()=>c((n=>!n))},"Click here to ",i?"hide":"show"," graticule"),l.createElement("button",{className:"btn btn-secondary m-2",onClick:()=>b((n=>!n))},"Click here to ",s?"hide":"show"," labels"),l.createElement("button",{className:"btn btn-secondary m-2",onClick:()=>d((n=>!n))},"Click here to use ",u?"geographical":"space"," longitude"),l.createElement(a.cq.RStyle,{ref:p},l.createElement(a.cq.RStroke,{color:"red",width:4}),l.createElement(a.cq.RText,{text:"",scale:2,offsetY:-10,offsetX:-10},l.createElement(a.cq.RStroke,{color:"green",width:2}),l.createElement(a.cq.RFill,{color:"black"}))),l.createElement(a.f9,{width:"100%",height:"60vh",initial:{center:e,zoom:1},projection:n,extent:o},l.createElement(a.Xy,{url:"https://upload.wikimedia.org/wikipedia/commons/1/17/Plate_Carr%C3%A9e_with_Tissot%27s_Indicatrices_of_Distortion.svg",extent:o}),l.createElement(a.y1,{visible:i,showLabels:s,strokeStyle:p,latLabelStyle:p,lonLabelStyle:p,lonLabelFormatter:u?g:m})))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2148],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var l=e(1601),t=e.n(l),r=e(6314),a=e.n(r)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{var l=e(5072),t=e.n(l),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),b=e.n(s),u=e(540),d=e.n(u),p=e(1113),g=e.n(p),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=b(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),t()(m.A,x),m.A&&m.A.locals&&m.A.locals},2148:(n,o,e)=>{e.r(o),e.d(o,{default:()=>i});var l=e(6540),t=e(3407),r=e(915),a=(e(5045),e(7240));function i(){const n=(0,t.Jt)("EPSG:4326"),o=n.getWorldExtent(),e=(0,r.q1)(o),[i,c]=l.useState(!0),[s,b]=l.useState(!1),[u,d]=l.useState(!0),p=a.cq.useRStyle(),g=l.useCallback((n=>((n+360)%360).toLocaleString()+"°"),[]),m=l.useCallback((n=>n.toLocaleString()+"°"),[]);return l.createElement(l.Fragment,null,l.createElement("button",{className:"btn btn-secondary m-2",onClick:()=>c((n=>!n))},"Click here to ",i?"hide":"show"," graticule"),l.createElement("button",{className:"btn btn-secondary m-2",onClick:()=>b((n=>!n))},"Click here to ",s?"hide":"show"," labels"),l.createElement("button",{className:"btn btn-secondary m-2",onClick:()=>d((n=>!n))},"Click here to use ",u?"geographical":"space"," longitude"),l.createElement(a.cq.RStyle,{ref:p},l.createElement(a.cq.RStroke,{color:"red",width:4}),l.createElement(a.cq.RText,{text:"",scale:2,offsetY:-10,offsetX:-10},l.createElement(a.cq.RStroke,{color:"green",width:2}),l.createElement(a.cq.RFill,{color:"black"}))),l.createElement(a.f9,{width:"100%",height:"60vh",initial:{center:e,zoom:1},projection:n,extent:o},l.createElement(a.Xy,{url:"https://upload.wikimedia.org/wikipedia/commons/1/17/Plate_Carr%C3%A9e_with_Tissot%27s_Indicatrices_of_Distortion.svg",extent:o}),l.createElement(a.y1,{visible:i,showLabels:s,strokeStyle:p,latLabelStyle:p,lonLabelStyle:p,lonLabelFormatter:u?g:m})))}}}]); \ No newline at end of file diff --git a/2285.bundle.js b/2285.bundle.js index 5de0c0b0..52737484 100644 --- a/2285.bundle.js +++ b/2285.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2285],{2285:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var a=o(6540);const s=a.memo((function(){return a.createElement("div",{dangerouslySetInnerHTML:{__html:'

rlayers - React Components for OpenLayers 6+

logo

License: ISC npm version Node.js CI codecov downloads

© OpenStreetMap contributors Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)

rlayers is an opinionated set of React components for OpenLayers.

It's design policy is:

  • Fully Typescript-typed
  • Do everything that faces the user the React way and not the OpenLayers way - onClick and onPointerEnter/onPoinerLeave handlers are typical examples
  • If it does not face the user, it does not need to be React way - internally it uses inheritance, following the OpenLayers classes, over composition
  • Simple things should be simple to do, performance optimizations should not get in the way unless needed
  • If taking shortcuts when updating the components, always err on the safe side but do provide an override method that allows to come close to the raw OpenLayers performance
  • Expose all the advanced OpenLayers features
  • Try to be as much SSR-friendly as possible (this feature is currently in POC stage, see below)
  • The current target is OpenLayers 6+
  • Avoid dependencies when built except for React and OpenLayers (the examples have some dependencies) - currently the single one is lru-cache at 8Kbytes

Long term support of this project

The birth of this project is related to a huge extortion in the geography community linked to a sexual harassment affair covered up by the French Judiciary. It is maintained as a free service to the geography community so that it can remain as a remainder to a number of companies - including Camptocamp, ESRI, Mapbox and Makina Corpus - that the most noble way to claim size bragging rights is to produce good software. You can safely use this framework in your projects, be assured that it will be maintained very well and for many years to come. It's companion project on the server-side is gdal-async.

Alternatives

<- Light-Weight --- Feature-Rich ->

pigeon-maps - react-leaflet - rlayers

Among the completely free and open source alternatives for creating maps with React, on a scale going from the most light-weight to the most feature-rich solution, rlayers is the right-most one.

It offers the full power OpenLayers - dynamic reprojections, comprehensive event handlers, a very rich set of supported formats, interfaces and layer types and a very good performance for very complex maps. This comes at the price of a quite significant total bundle size.

Installation

npm --save install rlayers ol react react-dom\n

Compatibility Matrix

OpenLayers and React are peer dependencies and should be installed separately.

React is supported from version 16.8.0.


rlayers Unit-tested OpenLayers versions Unit-tested React versions
1.0 (obsolete) 6.0 16.8, 16.14, 17.0.2
1.1 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
1.2 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
1.3 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1 16.8, 16.14, 17.0.2, 18.0.0
1.4 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
1.5 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.0 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.1 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.2 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.3 (@latest) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0, 9.0.0, 9.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0, 18.3.1
3.0 (@next) 9.2.2 18.0.0, 18.1.0, 18.2.0, 18.3.1

When using dynamic styles with React 18, you may get a warning in the console in debug mode: https://github.com/mmomtchev/rlayers/issues/40. You can safely ignore it as has no functional consequences - React 18, including the concurrent renderer, is fully supported.

Usage

rlayers is a set of reusable React components that can be nested in various ways to create map applications for the web through React composition in the true spirit of React. The components are based on a simplified model of the OpenLayers classes: for example the layers and the sources abstraction levels have been fused into one single level and the map and the view are also represented by a single component.

In order to avoid confusion between the OpenLayers classes and the rlayers classes which sometimes have the same names - all rlayers classes are prefixed with R. If a class begins with R, it is from rlayers, otherwise it is an OpenLayers class.

The most important element is the <RMap>. Every other element, except <RStyle>, requires a parent to function - an <RLayer> must be part of a map, an <RFeature> must be part of an <RLayerVector>, an <RControl> must also be part of a map.

Simple step-by-step example

This is the simple overlay example - https://mmomtchev.github.io/rlayers/#/overlays

import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, ROverlay, RStyle} from 'rlayers';\nimport locationIcon from './svg/location.svg';\n\n// Create a map, its size is set in the CSS class example-map\n<RMap className='example-map' initial={{center: fromLonLat([2.364, 48.82]), zoom: 11}}>\n    {/* Use an OpenStreetMap background */}\n    <ROSM />\n    {/* Create a single layer for holding vector features */}\n    <RLayerVector zIndex={10}>\n        {/* Create a style for rendering the features */}\n        <RStyle.RStyle>\n            {/* Consisting of a single icon, that is slightly offset\n             * so that its center falls over the center of the feature */}\n            <RStyle.RIcon src={locationIcon} anchor={[0.5, 0.8]} />\n        </RStyle.RStyle>\n        {/* Create a single feature in the vector layer */}\n        <RFeature\n            {/* Its geometry is a point geometry over the monument */}\n            geometry={new Point(fromLonLat([2.295, 48.8737]))}\n            {/* Bind an onClick handler */}\n            onClick={(e) =>\n                {/* e.map is the underlying OpenLayers map - we call getView().fit()\n                to pan/zoom the map over the monument with a small animation */}\n                e.map.getView().fit(e.target.getGeometry().getExtent(), {\n                    duration: 250,\n                    maxZoom: 15\n                })\n            }\n        >\n            {/* The icon is an SVG image that represents the feature on the map\n            while an overlay allows us to add a normal HTML element over the feature */}\n            <ROverlay className='example-overlay'>\n                Arc de Triomphe\n                <br />\n                <em>&#11017; click to zoom</em>\n            </ROverlay>\n        </RFeature>\n    </RLayerVector>\n</RMap>\n

Check examples/static_pages.html for a fully self-contained static HTML page using rlayers.

You can also check the GPLed XC-DB for a larger and more complex project entirely implemented using React, Redux and rlayers.

Contexts

Composition works by using React Contexts. Every nested element uses the context of its nearest parent.

The underlying OpenLayers objects can be accessed using the useOL() hook - check the Geolocation example to see how.

Currently useOL() has an RContextType and can contain the following elements:

  • map provided by a map, every other element, except an RStyle must have a map parent
  • layer and source provided by all layers - not required for anything at the moment, but can be used to access the underlying OpenLayers objects
  • vectorlayer and vectorsource provided by vector layers only - required for <RFeature>
  • vectortilelayer provided by vector tile layers only
  • location and feature provided by a map feature - required for <ROverlay> and <RPopup>
  • style provided by a style definition - the only one which can be outside of a map

Additionally, useRLayersComponent() allows retrieving the containing rlayers component.

Accessing the underlying OpenLayers objects and API

The underlying OpenLayers objects can be accessed in a number of different ways:

  • Through the context objects by using React.Context.Consumer
  • In an event handler that is a normal function and not an arrow lambda, this will contain the rlayers component and this.context will contain the context - this is an alternative to using useOL()
  • In all event handlers, OpenLayers will pass the target object in event.target and the map in event.map - the popups example uses this method
  • And finally, accessing arbitrary elements, even outside their contexts, is possible by using React references - React.RefObjects. The high performance example contains an example of this. The underlying OpenLayers objects can be accessed through the ol property of every component. Additionaly, for layer objects, the underlying OpenLayers source can be accessed through source:
    const layerRef = React.createRef() as React.RefObject<RLayerVector>;\n
    Then after rendering:
    <RLayerVector ref={layerRef} />\n
    layerRef.current.ol will contain the OpenLayers layer and layerRef.current.source will contain the source. This is the only way of accessing the object outside its context.

Styles

Style definitions can be placed anywhere inside the DOM and can be referenced with a React reference. rlayers includes two special types for dealing with styles:

  • RStyleRef which is an alias to React.RefObject<RStyle> is a React reference to an <RStyle> element. It can be transparently used everywhere where a classical OpenLayers StyleLike is required
  • RStyleLike is the new union type that allows for StyleLike or a RStyleRef

A style placed inside a vector layer will be automatically applied to that vector layer.

A style can either be static or dynamic. A static style depends only on its properties. A dynamic style is a function that takes an OpenLayers Feature object as its input and returns a Style. A dynamic style creates a new object for every rendered feature, so this must be taken into account. A simple caching mechanism is also provided, based on a user-supplied hash function. It can greatly improve performance when the majority of the features use relatively few different styles.

You can refer to

Classical OpenLayers StyleLike objects are supported too, but this is not the React way. Still, if you need every last bit of performance, writing an optimized OpenLayers style function is the best solution.

Performance

React is a wonderful framework that makes it very easy to write complex web applications without having to manually handle all the interdependencies between the various components. This is the reason why it is called React - components automatically React to changes in other components. In the true spirit of React, rlayers prefers to err on the safe side - always updating when there is a chance that the component needs updating - making it easy on the beginner who wants simple interface while still allowing the experienced engineer to achieve the performance he needs.

When high performance is required, particular care must be taken that the component properties do not change without a reason. This is especially true when the pointermove event is used. In these cases one should avoid using anonymous objects, arrays or functions as properties.

Take for example this:

<RFeature\n    geometry={new Point(fromLonLat([2.295, 48.858])}\n    onClick={(e: MapBrowserEvent) => process(e.target)}\n/>\n

This is a feature that will be re-evaluated at every frame. Its geometry appears to be a constant, but it is in fact an anonymous object that is created at every frame - even if it always holds the same value. Passing a constant is one way around this, but the true React way is using the two tools React provides: React.useMemo and React.useCallback. They memoize the value and take care to always return a reference to the same object unless one of the listed dependencies is modified.

This is a much better performing code that won't rerender the feature component:

<RFeature\n    geometry={React.useMemo(new Point(fromLonLat([2.295, 48.858]), [/* no deps */])}\n    onClick={React.useCallback((e: MapBrowserEvent) => process(e.target), [/* no deps */])}\n/>\n

Anonymous objects, arrays and especially lambdas in the properties of a component are prime candidates for memoization. Sometimes, you can also memoize whole components or groups of components - for a very significant performance boost.

Generally, if you are binding code to the pointermove event and your performance is not good enough, this is the first thing you should be looking at - which components update at every pointermove and why.

These 3 examples run code on various high-frequency events, take a look at them:

  • Clustering runs the styling function every time the map is panned or zoomed
  • Drop a pin runs code on every pointermove that carefully avoids rerendering
  • Geo data updates components at every pointerenter/pointerleave
  • The high performance example is a complex example that runs lots of code and updates components at every pointermove

Also, when searching for features listening on pointermove/pointerenter/pointerleave events, rlayers 2.0.0 and later, is able to eliminate very early feature layers that do not contain features listenening for those events. If your map contains a large number of features, and only a handful of these use pointermove events - try to group them in a separate layer.

Examples

The examples can be found here: https://mmomtchev.github.io/rlayers/

Next.js

When using with Next.js, you have to install next-transpile-modules:

npm install --save next-transpile-modules\n

And then create the following next.config.js:

const withTranspile = require('next-transpile-modules')(['ol', 'rlayers']);\nmodule.exports = withTranspile({experimental: {esmExternals: 'loose'}});\n

It is known to work with Next.js 10 to Next.js 13. You can check rlayers-npm-tests repository for examples for working configurations.

Server-Side Rendering

Server-side rendering of map components is difficult - there is still no comprehensive solution. Besides the obvious complexities of rendering on canvas outside the browser, one of the major issues is that server-side rendering runs before the browser layout flowing - and thus must work independent of layout and resolution.

The best solution is to use a WMS-compatible server (such as Geoserver) and to serve prerendered maps over WMS - eventually replacing the initial image by a canvas.

An intermediate solution, which does not require extensive server-side investment (such as Geoserver), but is limited to static layout(s), is to prerender one (or one per screen size) image to be used as a temporary place-holder until the map is loading. In this case, at least some devices, will get an ugly looking map for the first few seconds.

Pushing the initial tiles is also an option:

  • when combined with a WMS-server it could deliver pixel-perfect maps with on the first HTTP request
  • without a WMS-server it could still avoid doing a large number of HTTP requests on the first load

Currently, server-side rendering of raster layers on fixed map sizes has reached POC status and an online demo is accessible at https://rlayers-ssr.meteo.guru/. The code can be found in the ssr branch of this project. The next.js project can be found at https://github.com/mmomtchev/rlayers-ssr-demo.git. This is still not a user-friendly, install-and-run project. Take a look at pages/index.js if you want see how it is meant to be used.

As of March 2022, SSR support is stale and I am not working on it anymore.

Google Maps API Support

The Google Maps API is not open and although it is now supported out-of-the-box by OpenLayers starting from version 9.0, it requires a paid subscription (with an eventual trial period). Adding Google Maps support is not possible unless someone is willing to sponsor it.

API

You can browse the full documentation at https://mmomtchev.github.io/rlayers/api.

License

ISC

'}})}))}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2285],{2285:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});var a=o(6540);const s=a.memo((function(){return a.createElement("div",{dangerouslySetInnerHTML:{__html:'

rlayers - React Components for OpenLayers 6+

logo

License: ISC npm version Node.js CI codecov downloads

© OpenStreetMap contributors Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)

rlayers is an opinionated set of React components for OpenLayers.

It's design policy is:

  • Fully Typescript-typed
  • Do everything that faces the user the React way and not the OpenLayers way - onClick and onPointerEnter/onPoinerLeave handlers are typical examples
  • If it does not face the user, it does not need to be React way - internally it uses inheritance, following the OpenLayers classes, over composition
  • Simple things should be simple to do, performance optimizations should not get in the way unless needed
  • If taking shortcuts when updating the components, always err on the safe side but do provide an override method that allows to come close to the raw OpenLayers performance
  • Expose all the advanced OpenLayers features
  • Try to be as much SSR-friendly as possible (this feature is currently in POC stage, see below)
  • The current target is OpenLayers 6+
  • Avoid dependencies when built except for React and OpenLayers (the examples have some dependencies) - currently the single one is lru-cache at 8Kbytes

Long term support of this project

The birth of this project is related to a huge extortion in the geography community linked to a sexual harassment affair covered up by the French Judiciary. It is maintained as a free service to the geography community so that it can remain as a remainder to a number of companies - including Camptocamp, ESRI, Mapbox and Makina Corpus - that the most noble way to claim size bragging rights is to produce good software. You can safely use this framework in your projects, be assured that it will be maintained very well and for many years to come. It's companion project on the server-side is gdal-async.

Alternatives

<- Light-Weight --- Feature-Rich ->

pigeon-maps - react-leaflet - rlayers

Among the completely free and open source alternatives for creating maps with React, on a scale going from the most light-weight to the most feature-rich solution, rlayers is the right-most one.

It offers the full power OpenLayers - dynamic reprojections, comprehensive event handlers, a very rich set of supported formats, interfaces and layer types and a very good performance for very complex maps. This comes at the price of a quite significant total bundle size.

Installation

npm --save install rlayers ol react react-dom\n

Compatibility Matrix

OpenLayers and React are peer dependencies and should be installed separately.

React is supported from version 16.8.0 with rlayers@2.x and from version 18 with rlayers@3.x.


rlayers Unit-tested OpenLayers versions Unit-tested React versions
1.0 (obsolete) 6.0 16.8, 16.14, 17.0.2
1.1 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
1.2 (obsolete) 6.6, 6.7, 6.8, 6.9 16.8, 16.14, 17.0.2
1.3 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1 16.8, 16.14, 17.0.2, 18.0.0
1.4 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
1.5 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.0 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.1 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.2 (obsolete) 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0
2.3 6.10, 6.11, 6.12, 6.13, 6.14, 6.14.1, 6.15, 6.15.1, 7.0.0, 7.1.0, 7.2.0, 7.2.2, 7.3.0, 7.4.0, 7.5.1, 8.0.0, 8.1.0, 8.2.0, 9.0.0, 9.1.0 16.8, 16.14, 17.0.2, 18.0.0, 18.1.0, 18.2.0, 18.3.1
3.0 9.2.2 18.0.0, 18.1.0, 18.2.0, 18.3.1
3.1 (@latest) 10.0.0 18.0.0, 18.1.0, 18.2.0, 18.3.1

When using dynamic styles with React 18, you may get a warning in the console in debug mode: https://github.com/mmomtchev/rlayers/issues/40. You can safely ignore it as has no functional consequences - React 18, including the concurrent renderer, is fully supported.

Usage

rlayers is a set of reusable React components that can be nested in various ways to create map applications for the web through React composition in the true spirit of React. The components are based on a simplified model of the OpenLayers classes: for example the layers and the sources abstraction levels have been fused into one single level and the map and the view are also represented by a single component.

In order to avoid confusion between the OpenLayers classes and the rlayers classes which sometimes have the same names - all rlayers classes are prefixed with R. If a class begins with R, it is from rlayers, otherwise it is an OpenLayers class.

The most important element is the <RMap>. Every other element, except <RStyle>, requires a parent to function - an <RLayer> must be part of a map, an <RFeature> must be part of an <RLayerVector>, an <RControl> must also be part of a map.

Simple step-by-step example

This is the simple overlay example - https://mmomtchev.github.io/rlayers/#/overlays

import React from 'react';\nimport {fromLonLat} from 'ol/proj';\nimport {Point} from 'ol/geom';\nimport 'ol/ol.css';\n\nimport {RMap, ROSM, RLayerVector, RFeature, ROverlay, RStyle} from 'rlayers';\nimport locationIcon from './svg/location.svg';\n\n// Create a map, its size is set in the CSS class example-map\n<RMap className='example-map' initial={{center: fromLonLat([2.364, 48.82]), zoom: 11}}>\n    {/* Use an OpenStreetMap background */}\n    <ROSM />\n    {/* Create a single layer for holding vector features */}\n    <RLayerVector zIndex={10}>\n        {/* Create a style for rendering the features */}\n        <RStyle.RStyle>\n            {/* Consisting of a single icon, that is slightly offset\n             * so that its center falls over the center of the feature */}\n            <RStyle.RIcon src={locationIcon} anchor={[0.5, 0.8]} />\n        </RStyle.RStyle>\n        {/* Create a single feature in the vector layer */}\n        <RFeature\n            {/* Its geometry is a point geometry over the monument */}\n            geometry={new Point(fromLonLat([2.295, 48.8737]))}\n            {/* Bind an onClick handler */}\n            onClick={(e) =>\n                {/* e.map is the underlying OpenLayers map - we call getView().fit()\n                to pan/zoom the map over the monument with a small animation */}\n                e.map.getView().fit(e.target.getGeometry().getExtent(), {\n                    duration: 250,\n                    maxZoom: 15\n                })\n            }\n        >\n            {/* The icon is an SVG image that represents the feature on the map\n            while an overlay allows us to add a normal HTML element over the feature */}\n            <ROverlay className='example-overlay'>\n                Arc de Triomphe\n                <br />\n                <em>&#11017; click to zoom</em>\n            </ROverlay>\n        </RFeature>\n    </RLayerVector>\n</RMap>\n

Check examples/static_pages.html for a fully self-contained static HTML page using rlayers.

You can also check the GPLed XC-DB for a larger and more complex project entirely implemented using React, Redux and rlayers.

Contexts

Composition works by using React Contexts. Every nested element uses the context of its nearest parent.

The underlying OpenLayers objects can be accessed using the useOL() hook - check the Geolocation example to see how.

Currently useOL() has an RContextType and can contain the following elements:

  • map provided by a map, every other element, except an RStyle must have a map parent
  • layer and source provided by all layers - not required for anything at the moment, but can be used to access the underlying OpenLayers objects
  • vectorlayer and vectorsource provided by vector layers only - required for <RFeature>
  • vectortilelayer provided by vector tile layers only
  • location and feature provided by a map feature - required for <ROverlay> and <RPopup>
  • style provided by a style definition - the only one which can be outside of a map

Additionally, useRLayersComponent() allows retrieving the containing rlayers component.

Accessing the underlying OpenLayers objects and API

The underlying OpenLayers objects can be accessed in a number of different ways:

  • Through the context objects by using React.Context.Consumer
  • In an event handler that is a normal function and not an arrow lambda, this will contain the rlayers component and this.context will contain the context - this is an alternative to using useOL()
  • In all event handlers, OpenLayers will pass the target object in event.target and the map in event.map - the popups example uses this method
  • And finally, accessing arbitrary elements, even outside their contexts, is possible by using React references - React.RefObjects. The high performance example contains an example of this. The underlying OpenLayers objects can be accessed through the ol property of every component. Additionaly, for layer objects, the underlying OpenLayers source can be accessed through source:
    const layerRef = React.createRef() as React.RefObject<RLayerVector>;\n
    Then after rendering:
    <RLayerVector ref={layerRef} />\n
    layerRef.current.ol will contain the OpenLayers layer and layerRef.current.source will contain the source. This is the only way of accessing the object outside its context.

Styles

Style definitions can be placed anywhere inside the DOM and can be referenced with a React reference. rlayers includes two special types for dealing with styles:

  • RStyleRef which is an alias to React.RefObject<RStyle> is a React reference to an <RStyle> element. It can be transparently used everywhere where a classical OpenLayers StyleLike is required
  • RStyleLike is the new union type that allows for StyleLike or a RStyleRef

A style placed inside a vector layer will be automatically applied to that vector layer.

A style can either be static or dynamic. A static style depends only on its properties. A dynamic style is a function that takes an OpenLayers Feature object as its input and returns a Style. A dynamic style creates a new object for every rendered feature, so this must be taken into account. A simple caching mechanism is also provided, based on a user-supplied hash function. It can greatly improve performance when the majority of the features use relatively few different styles.

You can refer to

Classical OpenLayers StyleLike objects are supported too, but this is not the React way. Still, if you need every last bit of performance, writing an optimized OpenLayers style function is the best solution.

Performance

React is a wonderful framework that makes it very easy to write complex web applications without having to manually handle all the interdependencies between the various components. This is the reason why it is called React - components automatically React to changes in other components. In the true spirit of React, rlayers prefers to err on the safe side - always updating when there is a chance that the component needs updating - making it easy on the beginner who wants simple interface while still allowing the experienced engineer to achieve the performance he needs.

When high performance is required, particular care must be taken that the component properties do not change without a reason. This is especially true when the pointermove event is used. In these cases one should avoid using anonymous objects, arrays or functions as properties.

Take for example this:

<RFeature\n    geometry={new Point(fromLonLat([2.295, 48.858])}\n    onClick={(e: MapBrowserEvent) => process(e.target)}\n/>\n

This is a feature that will be re-evaluated at every frame. Its geometry appears to be a constant, but it is in fact an anonymous object that is created at every frame - even if it always holds the same value. Passing a constant is one way around this, but the true React way is using the two tools React provides: React.useMemo and React.useCallback. They memoize the value and take care to always return a reference to the same object unless one of the listed dependencies is modified.

This is a much better performing code that won't rerender the feature component:

<RFeature\n    geometry={React.useMemo(new Point(fromLonLat([2.295, 48.858]), [/* no deps */])}\n    onClick={React.useCallback((e: MapBrowserEvent) => process(e.target), [/* no deps */])}\n/>\n

Anonymous objects, arrays and especially lambdas in the properties of a component are prime candidates for memoization. Sometimes, you can also memoize whole components or groups of components - for a very significant performance boost.

Generally, if you are binding code to the pointermove event and your performance is not good enough, this is the first thing you should be looking at - which components update at every pointermove and why.

These 3 examples run code on various high-frequency events, take a look at them:

  • Clustering runs the styling function every time the map is panned or zoomed
  • Drop a pin runs code on every pointermove that carefully avoids rerendering
  • Geo data updates components at every pointerenter/pointerleave
  • The high performance example is a complex example that runs lots of code and updates components at every pointermove

Also, when searching for features listening on pointermove/pointerenter/pointerleave events, rlayers 2.0.0 and later, is able to eliminate very early feature layers that do not contain features listenening for those events. If your map contains a large number of features, and only a handful of these use pointermove events - try to group them in a separate layer.

Examples

The examples can be found here: https://mmomtchev.github.io/rlayers/

Server-Side Rendering

Server-side rendering of map components is difficult - there is still no comprehensive solution. Besides the obvious complexities of rendering on canvas outside the browser, one of the major issues is that server-side rendering runs before the browser layout flowing - and thus must work independent of layout and resolution.

The best solution is to use a WMS-compatible server (such as Geoserver) and to serve prerendered maps over WMS - eventually replacing the initial image by a canvas.

An intermediate solution, which does not require extensive server-side investment (such as Geoserver), but is limited to static layout(s), is to prerender one (or one per screen size) image to be used as a temporary place-holder until the map is loading. In this case, at least some devices, will get an ugly looking map for the first few seconds.

Pushing the initial tiles is also an option:

  • when combined with a WMS-server it could deliver pixel-perfect maps with on the first HTTP request
  • without a WMS-server it could still avoid doing a large number of HTTP requests on the first load

Currently, server-side rendering of raster layers on fixed map sizes has reached POC status and an online demo is accessible at https://rlayers-ssr.meteo.guru/. The code can be found in the ssr branch of this project. The next.js project can be found at https://github.com/mmomtchev/rlayers-ssr-demo.git. This is still not a user-friendly, install-and-run project. Take a look at pages/index.js if you want see how it is meant to be used.

As of March 2022, SSR support is stale and I am not working on it anymore. Should there be any interest in this feature, I could consider adding it.

Next.js

As currently rlayers is an entirely client-side component without SSR support, using it with Next.js requires some special configuration that has tendency to change from version to version.

rlayers has been found to work with all recent Next.js versions, including Next.js 14 in app mode.

Check rlayers-npm-tests for working examples.

Google Maps API Support

The Google Maps API is not open and although it is now supported out-of-the-box by OpenLayers starting from version 9.0, it requires a paid subscription (with an eventual trial period). Adding Google Maps support is not possible unless someone is willing to sponsor it.

API

You can browse the full documentation at https://mmomtchev.github.io/rlayers/api.

License

ISC

'}})}))}}]); \ No newline at end of file diff --git a/2345.bundle.js b/2345.bundle.js index 3841ce94..3a962854 100644 --- a/2345.bundle.js +++ b/2345.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2345],{2345:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React, { useCallback, useMemo } from "react";\nimport { fromLonLat } from "ol/proj";\nimport Feature from "ol/Feature";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Geometry } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, RLayerVector, RStyle, RFeature, ROverlay } from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n "https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson";\nconst parser = new GeoJSON({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n "https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200";\ntype inputDataType = {\n records: { fields: { code_departement: string; population: number } }[];\n};\nconst fetchData = fetch(inputData).then(\n (raw) => raw.json() as Promise<inputDataType>\n);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields\n .population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({ records: [] } as inputDataType);\n const [current, setCurrent] = React.useState(\n null as Feature<Geometry> | null\n );\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n <div className="d-flex flex-row">\n <RMap\n className="example-map"\n initial={useMemo(\n () => ({ center: fromLonLat([2, 46.5]), zoom: 5.75 }),\n []\n )}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n <RLayerStadia layer="stamen_toner" />\n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless \'current\' changes\n * without it you will create a new function at every frame rendered */}\n <RLayerVector\n zIndex={5}\n format={parser}\n url={departements}\n onPointerEnter={useCallback((e) => setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n <RStyle.RStyle\n render={useCallback(\n (f) => (\n <RStyle.RFill\n color={`rgba(0, 0, ${\n getData(data, f.get("code")) / 5000\n }, 0.75)`}\n />\n ),\n [data]\n )}\n />\n </RLayerVector>\n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n <RLayerVector zIndex={10}>\n {current ? (\n <div>\n <RFeature geometry={current.getGeometry()}>\n <ROverlay className="example-overlay" autoPosition={true}>\n Population in <strong>{current.get("nom")}</strong> in 2018 is{" "}\n <strong>{getData(data, current.get("code"))}</strong>\n </ROverlay>\n </RFeature>\n </div>\n ) : null}\n </RLayerVector>\n </RMap>\n </div>\n );\n}\n'}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2345],{2345:(n,a,s)=>{s.r(a),s.d(a,{default:()=>t});const t='import React, { useCallback, useMemo } from "react";\nimport { fromLonLat } from "ol/proj";\nimport Feature from "ol/Feature";\nimport GeoJSON from "ol/format/GeoJSON";\nimport { Geometry } from "ol/geom";\nimport "ol/ol.css";\n\nimport { RMap, RLayerVector, RStyle, RFeature, ROverlay } from "rlayers";\nimport RLayerStadia from "rlayers/layer/RLayerStadia";\n\n// These are the French internal administrative borders in GeoJSON format\nconst departements =\n "https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson";\nconst parser = new GeoJSON<Feature>({\n featureProjection: "EPSG:3857",\n featureClass: Feature,\n});\n// Population by French administrative division\n// https://public.opendatasoft.com/explore/dataset/population-francaise-par-departement-2018/\n// Published under Etalab Open License https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf\nconst inputData =\n "https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200";\ntype inputDataType = {\n records: { fields: { code_departement: string; population: number } }[];\n};\nconst fetchData = fetch(inputData).then(\n (raw) => raw.json() as Promise<inputDataType>\n);\nconst getData = (data: inputDataType, dep: string) =>\n data.records.find((el) => el.fields.code_departement === dep)?.fields\n .population ?? 0;\n// The default hitbox around the features is 3px wide making narrow gaps between the borders difficult to select\nRFeature.hitTolerance = 0;\n\nexport default function GeoData(): JSX.Element {\n const [data, setData] = React.useState({ records: [] } as inputDataType);\n const [current, setCurrent] = React.useState(\n null as Feature<Geometry> | null\n );\n React.useEffect(() => {\n fetchData.then((r) => setData(r));\n }, []);\n return (\n <div className="d-flex flex-row">\n <RMap\n className="example-map"\n initial={useMemo(\n () => ({ center: fromLonLat([2, 46.5]), zoom: 5.75 }),\n []\n )}\n noDefaultControls={true}\n noDefaultInteractions={true}\n >\n <RLayerStadia layer="stamen_toner" />\n\n {/* This the internal borders layer, initialized with the GeoJSON\n * useCallback is a performance optimization, it allows to always have\n * the same function object unless \'current\' changes\n * without it you will create a new function at every frame rendered */}\n <RLayerVector\n zIndex={5}\n format={parser}\n url={departements}\n onPointerEnter={useCallback((e) => setCurrent(e.target), [])}\n onPointerLeave={useCallback(\n (e) => current === e.target && setCurrent(null),\n [current]\n )}\n >\n {/* When styling each feature, compute the color from the population data\n * The function is memoized and it is replaced only once - when the population data\n * becomes available. Without memoization (useCallback) all the features will need to\n * be re-evaluated at every frame */}\n <RStyle.RStyle\n render={useCallback(\n (f) => (\n <RStyle.RFill\n color={`rgba(0, 0, ${\n getData(data, f.get("code")) / 5000\n }, 0.75)`}\n />\n ),\n [data]\n )}\n />\n </RLayerVector>\n {/* This is a layer with a single feature - current - that holds the highlighted borders\n * It is styled with the default OpenLayers style */}\n <RLayerVector zIndex={10}>\n {current ? (\n <div>\n <RFeature geometry={current.getGeometry()}>\n <ROverlay className="example-overlay" autoPosition={true}>\n Population in <strong>{current.get("nom")}</strong> in 2018 is{" "}\n <strong>{getData(data, current.get("code"))}</strong>\n </ROverlay>\n </RFeature>\n </div>\n ) : null}\n </RLayerVector>\n </RMap>\n </div>\n );\n}\n'}}]); \ No newline at end of file diff --git a/2729.bundle.js b/2729.bundle.js index 58569967..ed0b480f 100644 --- a/2729.bundle.js +++ b/2729.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2729],{6308:(e,t,a)=>{a.d(t,{A:()=>n});const n=a.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},2729:(e,t,a)=>{a.r(t),a.d(t,{default:()=>x});var n=a(6540),o=a(3407),r=a(1365),s=a(915),i=(a(5045),a(7240)),l=a(5111),c=a(2381),m=a(6308),u=a(6717);const p=new r.A({featureProjection:"EPSG:3857",featureClass:u.A}),g=e=>"rgba("+[255,153,0,Math.min(.8,.4+Math.log(e/10)/20)].join()+")",d=e=>Math.round(5*(parseFloat(e.get("mag"))-2.5)),h=(e,t)=>{const a=(0,s.S5)();for(const t of e)(0,s.X$)(a,t.getGeometry().getExtent());return Math.round(.25*((0,s.RG)(a)+(0,s.Oq)(a)))/t};function x(){const[e,t]=n.useState(20),[a,r]=n.useState("Click a cluster for details"),s=n.useRef();return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,o.Rb)([0,0]),zoom:1}},n.createElement(c.A,{layer:"stamen_toner"}),n.createElement(i.od,{ref:s,distance:e,format:p,url:m.A,onClick:n.useCallback((e=>{var t;const a=null!==(t=e.target.get("features"))&&void 0!==t?t:[];r(`${a.length} earthquakes in this location, magnitudes are ${a.map((e=>e.get("mag"))).join(", ")}`)}),[])},n.createElement(l.RStyle,{cacheSize:1024,cacheId:(0,n.useCallback)(((e,t)=>e.get("features").length>1?"#"+h(e.get("features"),t):"$"+d(e.get("features")[0])),[]),render:(0,n.useCallback)(((e,t)=>{const a=e.get("features").length;if(a>1){const o=h(e.get("features"),t);return n.createElement(n.Fragment,null,n.createElement(l.RCircle,{radius:o},n.createElement(l.RFill,{color:g(a)})),n.createElement(l.RText,{text:a.toString()},n.createElement(l.RFill,{color:"#fff"}),n.createElement(l.RStroke,{color:"rgba(0, 0, 0, 0.6)",width:3})))}const o=e.get("features")[0];return n.createElement(l.RRegularShape,{radius:d(o),radius2:3,points:5,angle:Math.PI},n.createElement(l.RFill,{color:"rgba(255, 153, 0, 0.8)"}),n.createElement(l.RStroke,{color:"rgba(255, 204, 0, 0.2)",width:1}))}),[])}))),n.createElement("div",{className:"my-3 w-100"},n.createElement("label",{htmlFor:"distance"},"Clustering distance"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"5",max:"50",id:"distance",value:e,onChange:(0,n.useCallback)((e=>t(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",null,a))}},2381:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(945),o=a(5042),r=a(2662);class s extends r.A{constructor(e,t){var a;super(e,t),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(a=this.props.retina)&&void 0!==a&&a}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(702),o=a(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const t=e.layer.indexOf("-"),a=-1==t?e.layer:e.layer.slice(0,t),n=s[a]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",c=n.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+c+"."+i.extension+l,u=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:c?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2729],{6308:(e,t,a)=>{a.d(t,{A:()=>n});const n=a.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},2729:(e,t,a)=>{a.r(t),a.d(t,{default:()=>x});var n=a(6540),r=a(3407),o=a(1365),s=a(915),i=(a(5045),a(7240)),l=a(5111),c=a(2381),m=a(6308),u=a(6717);const p=new o.A({featureProjection:"EPSG:3857",featureClass:u.A}),g=e=>"rgba("+[255,153,0,Math.min(.8,.4+Math.log(e/10)/20)].join()+")",d=e=>Math.round(5*(parseFloat(e.get("mag"))-2.5)),h=(e,t)=>{const a=(0,s.S5)();for(const t of e)(0,s.X$)(a,t.getGeometry().getExtent());return Math.round(.25*((0,s.RG)(a)+(0,s.Oq)(a)))/t};function x(){const[e,t]=n.useState(20),[a,o]=n.useState("Click a cluster for details"),s=n.useRef();return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,r.Rb)([0,0]),zoom:1}},n.createElement(c.A,{layer:"stamen_toner"}),n.createElement(i.od,{ref:s,distance:e,format:p,url:m.A,onClick:n.useCallback((e=>{var t;const a=null!==(t=e.target.get("features"))&&void 0!==t?t:[];o(`${a.length} earthquakes in this location, magnitudes are ${a.map((e=>e.get("mag"))).join(", ")}`)}),[])},n.createElement(l.RStyle,{cacheSize:1024,cacheId:(0,n.useCallback)(((e,t)=>e.get("features").length>1?"#"+h(e.get("features"),t):"$"+d(e.get("features")[0])),[]),render:(0,n.useCallback)(((e,t)=>{const a=e.get("features").length;if(a>1){const r=h(e.get("features"),t);return n.createElement(n.Fragment,null,n.createElement(l.RCircle,{radius:r},n.createElement(l.RFill,{color:g(a)})),n.createElement(l.RText,{text:a.toString()},n.createElement(l.RFill,{color:"#fff"}),n.createElement(l.RStroke,{color:"rgba(0, 0, 0, 0.6)",width:3})))}const r=e.get("features")[0];return n.createElement(l.RRegularShape,{radius:d(r),radius2:3,points:5,angle:Math.PI},n.createElement(l.RFill,{color:"rgba(255, 153, 0, 0.8)"}),n.createElement(l.RStroke,{color:"rgba(255, 204, 0, 0.2)",width:1}))}),[])}))),n.createElement("div",{className:"my-3 w-100"},n.createElement("label",{htmlFor:"distance"},"Clustering distance"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"5",max:"50",id:"distance",value:e,onChange:(0,n.useCallback)((e=>t(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",null,a))}},2381:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(945),r=a(5042),o=a(2662);class s extends o.A{constructor(e,t){var a;super(e,t),this.source=new r.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(a=this.props.retina)&&void 0!==a&&a}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(702),r=a(7896);const o={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const t=e.layer.indexOf("-"),a=-1==t?e.layer:e.layer.slice(0,t),n=s[a]||{minZoom:0,maxZoom:20,retina:!0},i=o[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",c=n.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+c+"."+i.extension+l,u=['© Stadia Maps','© OpenMapTiles',r.o];e.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:c?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file diff --git a/2836.bundle.js b/2836.bundle.js index 61826544..d15ef64e 100644 --- a/2836.bundle.js +++ b/2836.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2836],{2836:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(6540),a=n(3407),r=n(6717),s=n(1365),i=(n(5045),n(7240)),l=n(2381);const m="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson",p=new s.A({featureProjection:"EPSG:3857",featureClass:r.A}),c=fetch("https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200").then((e=>e.json())),u=(e,t)=>{var n,o;return null!==(o=null===(n=e.records.find((e=>e.fields.code_departement===t)))||void 0===n?void 0:n.fields.population)&&void 0!==o?o:0};function d(){const[e,t]=o.useState({records:[]}),[n,r]=o.useState(null);return o.useEffect((()=>{c.then((e=>t(e)))}),[]),o.createElement("div",{className:"d-flex flex-row"},o.createElement(i.f9,{className:"example-map",initial:(0,o.useMemo)((()=>({center:(0,a.Rb)([2,46.5]),zoom:5.75})),[]),noDefaultControls:!0,noDefaultInteractions:!0},o.createElement(l.A,{layer:"stamen_toner"}),o.createElement(i.j9,{zIndex:5,format:p,url:m,onPointerEnter:(0,o.useCallback)((e=>r(e.target)),[]),onPointerLeave:(0,o.useCallback)((e=>n===e.target&&r(null)),[n])},o.createElement(i.cq.RStyle,{render:(0,o.useCallback)((t=>o.createElement(i.cq.RFill,{color:`rgba(0, 0, ${u(e,t.get("code"))/5e3}, 0.75)`})),[e])})),o.createElement(i.j9,{zIndex:10},n?o.createElement("div",null,o.createElement(i.Dp,{geometry:n.getGeometry()},o.createElement(i.Rv,{className:"example-overlay",autoPosition:!0},"Population in ",o.createElement("strong",null,n.get("nom"))," in 2018 is"," ",o.createElement("strong",null,u(e,n.get("code")))))):null)))}i.Dp.hitTolerance=0},2381:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(945),a=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new a.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new o.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(702),a=n(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends o.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),o=s[n]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=o.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,c=['© Stadia Maps','© OpenMapTiles',a.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:o.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:o.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2836],{2836:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var o=n(6540),a=n(3407),r=n(6717),s=n(1365),i=(n(5045),n(7240)),l=n(2381);const m="https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson",c=new s.A({featureProjection:"EPSG:3857",featureClass:r.A}),p=fetch("https://public.opendatasoft.com/api/records/1.0/search/?dataset=population-francaise-par-departement-2018&q=&rows=200").then((e=>e.json())),u=(e,t)=>{var n,o;return null!==(o=null===(n=e.records.find((e=>e.fields.code_departement===t)))||void 0===n?void 0:n.fields.population)&&void 0!==o?o:0};function d(){const[e,t]=o.useState({records:[]}),[n,r]=o.useState(null);return o.useEffect((()=>{p.then((e=>t(e)))}),[]),o.createElement("div",{className:"d-flex flex-row"},o.createElement(i.f9,{className:"example-map",initial:(0,o.useMemo)((()=>({center:(0,a.Rb)([2,46.5]),zoom:5.75})),[]),noDefaultControls:!0,noDefaultInteractions:!0},o.createElement(l.A,{layer:"stamen_toner"}),o.createElement(i.j9,{zIndex:5,format:c,url:m,onPointerEnter:(0,o.useCallback)((e=>r(e.target)),[]),onPointerLeave:(0,o.useCallback)((e=>n===e.target&&r(null)),[n])},o.createElement(i.cq.RStyle,{render:(0,o.useCallback)((t=>o.createElement(i.cq.RFill,{color:`rgba(0, 0, ${u(e,t.get("code"))/5e3}, 0.75)`})),[e])})),o.createElement(i.j9,{zIndex:10},n?o.createElement("div",null,o.createElement(i.Dp,{geometry:n.getGeometry()},o.createElement(i.Rv,{className:"example-overlay",autoPosition:!0},"Population in ",o.createElement("strong",null,n.get("nom"))," in 2018 is"," ",o.createElement("strong",null,u(e,n.get("code")))))):null)))}i.Dp.hitTolerance=0},2381:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(945),a=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new a.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new o.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(702),a=n(7896);const r={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends o.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),o=s[n]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=o.retina&&e.retina?"@2x":"",c=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,p=['© Stadia Maps','© OpenMapTiles',a.o];e.layer.startsWith("stamen_")&&p.splice(1,0,'© Stamen Design'),super({attributions:p,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:o.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:o.minZoom,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:c,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file diff --git a/2883.bundle.js b/2883.bundle.js index a6111d0b..5d61cd79 100644 --- a/2883.bundle.js +++ b/2883.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2883],{2883:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var l=r(6540),n=r(3407),a=r(4662),o=(r(5045),r(7240)),c=r(5111),s=r(2381);const i={0:{width:6,font:"1.2rem helvetica,sans-serif"},1:{width:5,font:"0.6rem helvetica,sans-serif"},2:{width:3,font:"0.5rem helvetica,sans-serif"},def:{width:1,font:"0.4rem helvetica,sans-serif"}};function m(){const[e,t]=l.useState(""),r=(0,c.useRStyle)(),m=(0,l.useMemo)((()=>new a.A),[]);return l.createElement(l.Fragment,null,l.createElement(c.RStyleArray,{ref:r,render:(0,l.useCallback)((e=>{var t;const{width:r,font:n}=null!==(t=i[e.get("p")])&&void 0!==t?t:i.def,a="#ffff"+e.get("c").charAt(0).toString("hex").substring(0,2).padStart(2,"0");return l.createElement(l.Fragment,null,l.createElement(c.RStyle,{zIndex:10},l.createElement(c.RCircle,{radius:r},l.createElement(c.RStroke,{color:"#007bff",width:r}),l.createElement(c.RFill,{color:"#007bff"})),l.createElement(c.RText,{font:n,text:e.get("n")},l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:a}))),l.createElement(c.RStyle,{zIndex:0},l.createElement(c.RCircle,{radius:1.5*r},l.createElement(c.RStroke,{color:"#000000",width:1.5*r}),l.createElement(c.RFill,{color:"#000000"}))))}),[])}),l.createElement(o.f9,{className:"example-map",initial:{center:(0,n.Rb)([2.364,48.82],"EPSG:4326"),zoom:8},projection:"EPSG:4326"},l.createElement(s.A,{layer:"stamen_watercolor"}),l.createElement(o.Ji,{onPointerEnter:l.useCallback((e=>{var r;return(null===(r=e.target)||void 0===r?void 0:r.get)&&t(e.target.get("n")+", "+e.target.get("c"))}),[t]),url:"https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf",projection:"EPSG:4326",format:m},l.createElement(c.RStyle,null,l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:"transparent"}))),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/0/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.01,style:r,format:m}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/1/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.0025,style:r,format:m}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/2/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:5e-4,style:r,format:m})),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"You are now in ",l.createElement("strong",null,e))))}},2381:(e,t,r)=>{r.d(t,{A:()=>o});var l=r(945),n=r(5042),a=r(2662);class o extends a.A{constructor(e,t){var r;super(e,t),this.source=new n.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(r=this.props.retina)&&void 0!==r&&r}),this.ol=new l.A({source:this.source}),this.eventSources=[this.ol,this.source]}}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[2883],{2883:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var l=r(6540),n=r(3407),a=r(4525),o=(r(5045),r(7240)),c=r(5111),s=r(2381);const i={0:{width:6,font:"1.2rem helvetica,sans-serif"},1:{width:5,font:"0.6rem helvetica,sans-serif"},2:{width:3,font:"0.5rem helvetica,sans-serif"},def:{width:1,font:"0.4rem helvetica,sans-serif"}};function m(){const[e,t]=l.useState(""),r=(0,c.useRStyle)(),m=(0,l.useMemo)((()=>new a.A),[]);return l.createElement(l.Fragment,null,l.createElement(c.RStyleArray,{ref:r,render:(0,l.useCallback)((e=>{var t;const{width:r,font:n}=null!==(t=i[e.get("p")])&&void 0!==t?t:i.def,a="#ffff"+e.get("c").charAt(0).toString("hex").substring(0,2).padStart(2,"0");return l.createElement(l.Fragment,null,l.createElement(c.RStyle,{zIndex:10},l.createElement(c.RCircle,{radius:r},l.createElement(c.RStroke,{color:"#007bff",width:r}),l.createElement(c.RFill,{color:"#007bff"})),l.createElement(c.RText,{font:n,text:e.get("n")},l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:a}))),l.createElement(c.RStyle,{zIndex:0},l.createElement(c.RCircle,{radius:1.5*r},l.createElement(c.RStroke,{color:"#000000",width:1.5*r}),l.createElement(c.RFill,{color:"#000000"}))))}),[])}),l.createElement(o.f9,{className:"example-map",initial:{center:(0,n.Rb)([2.364,48.82],"EPSG:4326"),zoom:8},projection:"EPSG:4326"},l.createElement(s.A,{layer:"stamen_watercolor"}),l.createElement(o.Ji,{onPointerEnter:l.useCallback((e=>{var r;return(null===(r=e.target)||void 0===r?void 0:r.get)&&t(e.target.get("n")+", "+e.target.get("c"))}),[t]),url:"https://velivole.b-cdn.net/tiles/admin/{z}/{x}/{y}.pbf",projection:"EPSG:4326",format:m},l.createElement(c.RStyle,null,l.createElement(c.RStroke,{color:"#007bff",width:2}),l.createElement(c.RFill,{color:"transparent"}))),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/0/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.01,style:r,format:m}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/1/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:.0025,style:r,format:m}),l.createElement(o.Ji,{url:"https://velivole.b-cdn.net/tiles/place/2/{z}/{x}/{y}.pbf",projection:"EPSG:4326",maxResolution:5e-4,style:r,format:m})),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"You are now in ",l.createElement("strong",null,e))))}},2381:(e,t,r)=>{r.d(t,{A:()=>o});var l=r(945),n=r(5042),a=r(2662);class o extends a.A{constructor(e,t){var r;super(e,t),this.source=new n.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(r=this.props.retina)&&void 0!==r&&r}),this.ol=new l.A({source:this.source}),this.eventSources=[this.ol,this.source]}}}}]); \ No newline at end of file diff --git a/290.bundle.js b/290.bundle.js new file mode 100644 index 00000000..57011197 --- /dev/null +++ b/290.bundle.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[290],{4096:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(1601),r=n.n(o),i=n(6314),s=n.n(i)()(r());s.push([t.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const a=s},5045:(t,e,n)=>{var o=n(5072),r=n.n(o),i=n(7825),s=n.n(i),a=n(7659),l=n.n(a),d=n(5056),h=n.n(d),u=n(540),c=n.n(u),p=n(1113),g=n.n(p),f=n(4096),b={};b.styleTagTransform=g(),b.setAttributes=h(),b.insert=l().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=c(),r()(f.A,b),f.A&&f.A.locals&&f.A.locals},8217:(t,e,n)=>{n.d(e,{Ay:()=>f,Bs:()=>w,hX:()=>b,te:()=>x});var o=n(6717),r=n(4778),i=n(4294),s=n(1217),a=n(1064),l=n(503),d=n(6702),h=n(2871),u=n(4338),c=n(4087),p=n(3407),g=n(3402);const f=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=o.A,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?(0,p.Jt)(e.dataProjection):this.readProjection(t);e.extent&&n&&"tile-pixels"===n.getUnits()&&(n=(0,p.Jt)(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return(0,c.b0)()}readFeature(t,e){return(0,c.b0)()}readFeatures(t,e){return(0,c.b0)()}readGeometry(t,e){return(0,c.b0)()}readProjection(t){return(0,c.b0)()}writeFeature(t,e){return(0,c.b0)()}writeFeatures(t,e){return(0,c.b0)()}writeGeometry(t,e){return(0,c.b0)()}};function b(t,e,n){const o=n?(0,p.Jt)(n.featureProjection):null,r=n?(0,p.Jt)(n.dataProjection):null;let i=t;if(o&&r&&!(0,p.tI)(o,r)){e&&(i=t.clone());const n=e?o:r,s=e?r:o;"tile-pixels"===n.getUnits()?i.transform(n,s):i.applyTransform((0,p.RG)(n,s))}if(e&&n&&void 0!==n.decimals){const e=Math.pow(10,n.decimals),o=function(t){for(let n=0,o=t.length;nw({...t,geometry:e}))).flat();const o="MultiPolygon"===n.type?"Polygon":n.type;if("GeometryCollection"===o||"Circle"===o)throw new Error("Unsupported geometry type: "+o);const i=n.layout.length;return b(new r.Ay(o,"Polygon"===o?function(t,e,n){return Array.isArray(e[0])?((0,g.mb)(t,0,e,n)||(t=t.slice(),(0,g.NK)(t,0,e,n)),t):((0,g.PA)(t,0,e,n)||(t=t.slice(),(0,g.ug)(t,0,e,n)),t)}(n.flatCoordinates,n.ends,i):n.flatCoordinates,n.ends?.flat(),i,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function x(t,e){if(!t)return null;if(Array.isArray(t)){const n=t.map((t=>x(t,e)));return new u.A(n)}return b(new(0,m[t.type])(t.flatCoordinates,t.layout,t.ends),!1,e)}},4525:(t,e,n)=>{n.d(e,{A:()=>C});var o=n(8217),r=n(1217),i=n(6702),s=n(503),a=n(2871);const l=4294967296,d=1/l,h="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");class u{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,e,n=this.length){for(;this.pos>3,r=this.pos;this.type=7&n,t(o,e,this),this.pos===r&&this.skip(n)}return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*l;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*l;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const e=this.buf;let n,o;return o=e[this.pos++],n=127&o,o<128?n:(o=e[this.pos++],n|=(127&o)<<7,o<128?n:(o=e[this.pos++],n|=(127&o)<<14,o<128?n:(o=e[this.pos++],n|=(127&o)<<21,o<128?n:(o=e[this.pos],n|=(15&o)<<28,function(t,e,n){const o=n.buf;let r,i;if(i=o[n.pos++],r=(112&i)>>4,i<128)return c(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return c(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return c(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return c(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return c(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return c(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(n,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return Boolean(this.readVarint())}readString(){const t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&h?h.decode(this.buf.subarray(e,t)):function(t,e,n){let o="",r=e;for(;r239?4:e>223?3:e>191?2:1;if(r+d>n)break;1===d?e<128&&(l=e):2===d?(i=t[r+1],128==(192&i)&&(l=(31&e)<<6|63&i,l<=127&&(l=null))):3===d?(i=t[r+1],s=t[r+2],128==(192&i)&&128==(192&s)&&(l=(15&e)<<12|(63&i)<<6|63&s,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===d&&(i=t[r+1],s=t[r+2],a=t[r+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&e)<<18|(63&i)<<12|(63&s)<<6|63&a,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,d=1):l>65535&&(l-=65536,o+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),o+=String.fromCharCode(l),r+=d}return o}(this.buf,e,t)}readBytes(){const t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){const n=this.readPackedEnd();for(;this.pos127;);else if(2===e)this.pos=this.readVarint()+this.pos;else if(5===e)this.pos+=4;else{if(1!==e)throw new Error(`Unimplemented type: ${e}`);this.pos+=8}}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e268435455||t<0?function(t,e){let n,o;if(t>=0?(n=t%4294967296|0,o=t/4294967296|0):(n=~(-t%4294967296),o=~(-t/4294967296),4294967295^n?n=n+1|0:(n=0,o=o+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){const n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(o,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))}writeSVarint(t){this.writeVarint(t<0?2*-t-1:2*t)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;const e=this.pos;this.pos=function(t,e,n){for(let o,r,i=0;i55295&&o<57344){if(!r){o>56319||i+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):r=o;continue}if(o<56320){t[n++]=239,t[n++]=191,t[n++]=189,r=o;continue}o=r-55296<<10|o-56320|65536,r=null}else r&&(t[n++]=239,t[n++]=191,t[n++]=189,r=null);o<128?t[n++]=o:(o<2048?t[n++]=o>>6|192:(o<65536?t[n++]=o>>12|224:(t[n++]=o>>18|240,t[n++]=o>>12&63|128),t[n++]=o>>6&63|128),t[n++]=63&o|128)}return n}(this.buf,t,this.pos);const n=this.pos-e;n>=128&&p(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){const e=t.length;this.writeVarint(e),this.realloc(e);for(let n=0;n=128&&p(n,o,this),this.pos=n-1,this.writeVarint(o),this.pos+=o}writeMessage(t,e,n){this.writeTag(t,2),this.writeRawMessage(e,n)}writePackedVarint(t,e){e.length&&this.writeMessage(t,g,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,f,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,w,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,b,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,m,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,x,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,y,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,v,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,k,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}}function c(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function p(t,e,n){const o=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(o);for(let e=n.pos-1;e>=t;e--)n.buf[e+o]=n.buf[e]}function g(t,e){for(let n=0;n>3}if(s--,1===i||2===i)a+=t.readSVarint(),l+=t.readSVarint(),1===i&&d>h&&(o.push(d),h=d),n.push(a,l),d+=2;else{if(7!==i)throw new Error("Invalid command found in the PBF");d>h&&(n.push(n[h],n[h+1]),d+=2)}}d>h&&(o.push(d),h=d)}createFeature_(t,e,n){const l=e.type;if(0===l)return null;let d;const h=e.properties;let u;this.idProperty_?(u=h[this.idProperty_],delete h[this.idProperty_]):u=e.id,h[this.layerName_]=e.layer.name;const c=[],p=[];this.readRawGeometry_(t,e,c,p);const g=function(t,e){let n;return 1===t?n=1===e?"Point":"MultiPoint":2===t?n=1===e?"LineString":"MultiLineString":3===t&&(n="Polygon"),n}(l,p.length);if(this.featureClass===S.Ay)d=new this.featureClass(g,c,p,2,h,u),d.transform(n.dataProjection);else{let t;if("Polygon"==g){const e=(0,A.yJ)(c,p);t=e.length>1?new a.A(c,"XY",e):new P.Ay(c,"XY",p)}else t="Point"===g?new F.A(c,"XY"):"LineString"===g?new r.A(c,"XY"):"MultiPoint"===g?new s.A(c,"XY"):"MultiLineString"===g?new i.A(c,"XY",p):null;d=new(0,this.featureClass),this.geometryName_&&d.setGeometryName(this.geometryName_);const e=(0,o.hX)(t,!1,n);d.setGeometry(e),void 0!==u&&d.setId(u),d.setProperties(h,!0)}return d}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const o=(0,_.Jt)(e.dataProjection);o.setWorldExtent(e.extent),e.dataProjection=o;const r=new u(t),i=r.readFields(M,{}),s=[];for(const t in i){if(n&&!n.includes(t))continue;const a=i[t],l=a?[0,0,a.extent,a.extent]:null;o.setExtent(l);for(let t=0,n=a.length;t>3)?n.readString():2===t?n.readFloat():3===t?n.readDouble():4===t?n.readVarint64():5===t?n.readVarint():6===t?n.readSVarint():7===t?n.readBoolean():null;e.values.push(o)}}function j(t,e,n){if(1==t)e.id=n.readVarint();else if(2==t){const t=n.readVarint()+n.pos;for(;n.pos{n.d(e,{A:()=>l});var o=n(702),r=n(7896);const i={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class a extends o.A{constructor(t){const e=t.layer.indexOf("-"),n=-1==e?t.layer:t.layer.slice(0,e),o=s[n]||{minZoom:0,maxZoom:20,retina:!0},a=i[t.layer],l=t.apiKey?"?api_key="+t.apiKey:"",d=o.retina&&t.retina?"@2x":"",h=void 0!==t.url?t.url:"https://tiles.stadiamaps.com/tiles/"+t.layer+"/{z}/{x}/{y}"+d+"."+a.extension+l,u=['© Stadia Maps','© OpenMapTiles',r.o];t.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:o.maxZoom,minZoom:void 0!==t.minZoom?t.minZoom:o.minZoom,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:h,tilePixelRatio:d?2:1,wrapX:t.wrapX,zDirection:t.zDirection})}}const l=a}}]); \ No newline at end of file diff --git a/3220.bundle.js b/3220.bundle.js index 070cc786..cc43d0e2 100644 --- a/3220.bundle.js +++ b/3220.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3220],{4096:(n,o,t)=>{t.d(o,{A:()=>i});var e=t(1601),r=t.n(e),l=t(6314),a=t.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,t)=>{var e=t(5072),r=t.n(e),l=t(7825),a=t.n(l),i=t(7659),s=t.n(i),u=t(5056),c=t.n(u),d=t(540),p=t.n(d),b=t(1113),g=t.n(b),m=t(4096),x={};x.styleTagTransform=g(),x.setAttributes=c(),x.insert=s().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),r()(m.A,x),m.A&&m.A.locals&&m.A.locals},8217:(n,o,t)=>{t.d(o,{Ay:()=>m,Bs:()=>v,hX:()=>x,te:()=>f});var e=t(6717),r=t(4778),l=t(4294),a=t(1217),i=t(1064),s=t(503),u=t(6702),c=t(2871),d=t(4338),p=t(4087),b=t(3407),g=t(3402);const m=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=e.A,this.supportedMediaTypes=null}getReadOptions(n,o){if(o){let t=o.dataProjection?(0,b.Jt)(o.dataProjection):this.readProjection(n);o.extent&&t&&"tile-pixels"===t.getUnits()&&(t=(0,b.Jt)(t),t.setWorldExtent(o.extent)),o={dataProjection:t,featureProjection:o.featureProjection}}return this.adaptOptions(o)}adaptOptions(n){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},n)}getType(){return(0,p.b0)()}readFeature(n,o){return(0,p.b0)()}readFeatures(n,o){return(0,p.b0)()}readGeometry(n,o){return(0,p.b0)()}readProjection(n){return(0,p.b0)()}writeFeature(n,o){return(0,p.b0)()}writeFeatures(n,o){return(0,p.b0)()}writeGeometry(n,o){return(0,p.b0)()}};function x(n,o,t){const e=t?(0,b.Jt)(t.featureProjection):null,r=t?(0,b.Jt)(t.dataProjection):null;let l=n;if(e&&r&&!(0,b.tI)(e,r)){o&&(l=n.clone());const t=o?e:r,a=o?r:e;"tile-pixels"===t.getUnits()?l.transform(t,a):l.applyTransform((0,b.RG)(t,a))}if(o&&t&&void 0!==t.decimals){const o=Math.pow(10,t.decimals),e=function(n){for(let t=0,e=n.length;tv({...n,geometry:o}))).flat();const e="MultiPolygon"===t.type?"Polygon":t.type;if("GeometryCollection"===e||"Circle"===e)throw new Error("Unsupported geometry type: "+e);const l=t.layout.length;return x(new r.Ay(e,"Polygon"===e?function(n,o,t){return Array.isArray(o[0])?((0,g.mb)(n,0,o,t)||(n=n.slice(),(0,g.NK)(n,0,o,t)),n):((0,g.PA)(n,0,o,t)||(n=n.slice(),(0,g.ug)(n,0,o,t)),n)}(t.flatCoordinates,t.ends,l):t.flatCoordinates,t.ends?.flat(),l,n.properties||{},n.id).enableSimplifyTransformed(),!1,o)}function f(n,o){if(!n)return null;if(Array.isArray(n)){const t=n.map((n=>f(n,o)));return new d.A(t)}return x(new(0,h[n.type])(n.flatCoordinates,n.layout,n.ends),!1,o)}},6888:(n,o,t)=>{t.d(o,{A:()=>i});var e=t(8217),r=t(4087);class l extends e.Ay{constructor(){super()}getType(){return"text"}readFeature(n,o){return this.readFeatureFromText(a(n),this.adaptOptions(o))}readFeatureFromText(n,o){return(0,r.b0)()}readFeatures(n,o){return this.readFeaturesFromText(a(n),this.adaptOptions(o))}readFeaturesFromText(n,o){return(0,r.b0)()}readGeometry(n,o){return this.readGeometryFromText(a(n),this.adaptOptions(o))}readGeometryFromText(n,o){return(0,r.b0)()}readProjection(n){return this.readProjectionFromText(a(n))}readProjectionFromText(n){return this.dataProjection}writeFeature(n,o){return this.writeFeatureText(n,this.adaptOptions(o))}writeFeatureText(n,o){return(0,r.b0)()}writeFeatures(n,o){return this.writeFeaturesText(n,this.adaptOptions(o))}writeFeaturesText(n,o){return(0,r.b0)()}writeGeometry(n,o){return this.writeGeometryText(n,this.adaptOptions(o))}writeGeometryText(n,o){return(0,r.b0)()}}function a(n){return"string"==typeof n?n:""}const i=l}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3220],{4096:(n,o,t)=>{t.d(o,{A:()=>i});var e=t(1601),r=t.n(e),l=t(6314),a=t.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,t)=>{var e=t(5072),r=t.n(e),l=t(7825),a=t.n(l),i=t(7659),s=t.n(i),u=t(5056),c=t.n(u),d=t(540),p=t.n(d),b=t(1113),g=t.n(b),m=t(4096),x={};x.styleTagTransform=g(),x.setAttributes=c(),x.insert=s().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),r()(m.A,x),m.A&&m.A.locals&&m.A.locals},8217:(n,o,t)=>{t.d(o,{Ay:()=>m,Bs:()=>v,hX:()=>x,te:()=>f});var e=t(6717),r=t(4778),l=t(4294),a=t(1217),i=t(1064),s=t(503),u=t(6702),c=t(2871),d=t(4338),p=t(4087),b=t(3407),g=t(3402);const m=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=e.A,this.supportedMediaTypes=null}getReadOptions(n,o){if(o){let t=o.dataProjection?(0,b.Jt)(o.dataProjection):this.readProjection(n);o.extent&&t&&"tile-pixels"===t.getUnits()&&(t=(0,b.Jt)(t),t.setWorldExtent(o.extent)),o={dataProjection:t,featureProjection:o.featureProjection}}return this.adaptOptions(o)}adaptOptions(n){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},n)}getType(){return(0,p.b0)()}readFeature(n,o){return(0,p.b0)()}readFeatures(n,o){return(0,p.b0)()}readGeometry(n,o){return(0,p.b0)()}readProjection(n){return(0,p.b0)()}writeFeature(n,o){return(0,p.b0)()}writeFeatures(n,o){return(0,p.b0)()}writeGeometry(n,o){return(0,p.b0)()}};function x(n,o,t){const e=t?(0,b.Jt)(t.featureProjection):null,r=t?(0,b.Jt)(t.dataProjection):null;let l=n;if(e&&r&&!(0,b.tI)(e,r)){o&&(l=n.clone());const t=o?e:r,a=o?r:e;"tile-pixels"===t.getUnits()?l.transform(t,a):l.applyTransform((0,b.RG)(t,a))}if(o&&t&&void 0!==t.decimals){const o=Math.pow(10,t.decimals),e=function(n){for(let t=0,e=n.length;tv({...n,geometry:o}))).flat();const e="MultiPolygon"===t.type?"Polygon":t.type;if("GeometryCollection"===e||"Circle"===e)throw new Error("Unsupported geometry type: "+e);const l=t.layout.length;return x(new r.Ay(e,"Polygon"===e?function(n,o,t){return Array.isArray(o[0])?((0,g.mb)(n,0,o,t)||(n=n.slice(),(0,g.NK)(n,0,o,t)),n):((0,g.PA)(n,0,o,t)||(n=n.slice(),(0,g.ug)(n,0,o,t)),n)}(t.flatCoordinates,t.ends,l):t.flatCoordinates,t.ends?.flat(),l,n.properties||{},n.id).enableSimplifyTransformed(),!1,o)}function f(n,o){if(!n)return null;if(Array.isArray(n)){const t=n.map((n=>f(n,o)));return new d.A(t)}return x(new(0,h[n.type])(n.flatCoordinates,n.layout,n.ends),!1,o)}},6888:(n,o,t)=>{t.d(o,{A:()=>i});var e=t(8217),r=t(4087);class l extends e.Ay{constructor(){super()}getType(){return"text"}readFeature(n,o){return this.readFeatureFromText(a(n),this.adaptOptions(o))}readFeatureFromText(n,o){return(0,r.b0)()}readFeatures(n,o){return this.readFeaturesFromText(a(n),this.adaptOptions(o))}readFeaturesFromText(n,o){return(0,r.b0)()}readGeometry(n,o){return this.readGeometryFromText(a(n),this.adaptOptions(o))}readGeometryFromText(n,o){return(0,r.b0)()}readProjection(n){return this.readProjectionFromText(a(n))}readProjectionFromText(n){return this.dataProjection}writeFeature(n,o){return this.writeFeatureText(n,this.adaptOptions(o))}writeFeatureText(n,o){return(0,r.b0)()}writeFeatures(n,o){return this.writeFeaturesText(n,this.adaptOptions(o))}writeFeaturesText(n,o){return(0,r.b0)()}writeGeometry(n,o){return this.writeGeometryText(n,this.adaptOptions(o))}writeGeometryText(n,o){return(0,r.b0)()}}function a(n){return"string"==typeof n?n:""}const i=l}}]); \ No newline at end of file diff --git a/3371.bundle.js b/3371.bundle.js index 26427c57..890a858b 100644 --- a/3371.bundle.js +++ b/3371.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3371],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var r=l(1601),e=l.n(r),t=l(6314),a=l.n(t)()(e());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,l)=>{var r=l(5072),e=l.n(r),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),u=l(540),p=l.n(u),d=l(1113),g=l.n(d),m=l(4096),x={};x.styleTagTransform=g(),x.setAttributes=b(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),e()(m.A,x),m.A&&m.A.locals&&m.A.locals},3371:(n,o,l)=>{l.r(o),l.d(o,{default:()=>s});var r=l(6540),e=l(3407),t=l(915),a=(l(5045),l(7240));const i=(0,t.Tr)([(0,e.Rb)([2.25,48.81]),(0,e.Rb)([2.42,48.9])]),c=(0,t.q1)(i);function s(){return r.createElement(a.f9,{className:"example-map",initial:{center:c,zoom:8},extent:i,maxZoom:16},r.createElement(a.ej,null))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[3371],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var r=l(1601),e=l.n(r),t=l(6314),a=l.n(t)()(e());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,l)=>{var r=l(5072),e=l.n(r),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),u=l(540),p=l.n(u),d=l(1113),g=l.n(d),m=l(4096),x={};x.styleTagTransform=g(),x.setAttributes=b(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),e()(m.A,x),m.A&&m.A.locals&&m.A.locals},3371:(n,o,l)=>{l.r(o),l.d(o,{default:()=>s});var r=l(6540),e=l(3407),t=l(915),a=(l(5045),l(7240));const i=(0,t.Tr)([(0,e.Rb)([2.25,48.81]),(0,e.Rb)([2.42,48.9])]),c=(0,t.q1)(i);function s(){return r.createElement(a.f9,{className:"example-map",initial:{center:c,zoom:8},extent:i,maxZoom:16},r.createElement(a.ej,null))}}}]); \ No newline at end of file diff --git a/4012.bundle.js b/4012.bundle.js index 8e11375e..dc3b4f3e 100644 --- a/4012.bundle.js +++ b/4012.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4012],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),t=e.n(l),r=e(6314),a=e.n(r)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),t=e.n(l),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),u=e.n(s),d=e(540),p=e.n(d),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),t()(g.A,x),g.A&&g.A.locals&&g.A.locals},4337:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' version='1.1' x='0px' y='0px' viewBox='0 0 100 125' style='enable-background:new 0 0 100 100;' xml:space='preserve'%3e %3cg%3e %3crect x='41.1' y='36.5' width='3.8' height='16.7'/%3e %3cpolygon points='48.1,53.2 50,53.2 51.9,53.2 51.9,36.5 48.1,36.5 '/%3e %3cpolygon points='50.1,22.9 37.7,33.2 62.5,33.2 '/%3e %3crect x='55.2' y='36.5' width='3.8' height='16.7'/%3e %3cpath d='M50,5.2c-21.2,0-38.3,17.2-38.3,38.3c0,16.9,10.9,31.2,26.1,36.3l12.2,15l12.2-14.9c15.2-5.1,26.1-19.4,26.1-36.3 C88.3,22.4,71.2,5.2,50,5.2z M61.9,62.8H38.4c-0.9,0-1.7-0.7-1.7-1.7s0.7-1.7,1.7-1.7h23.5c0.9,0,1.7,0.7,1.7,1.7 S62.8,62.8,61.9,62.8z M71.5,62.6c-0.3,0.2-0.6,0.2-0.8,0.2c-0.6,0-1.1-0.3-1.4-0.8L66,56.6H50H34L30.8,62 c-0.3,0.5-0.9,0.8-1.4,0.8c-0.3,0-0.6-0.1-0.8-0.2c-0.8-0.5-1-1.5-0.6-2.3l3.7-6.3c0.3-0.5,0.8-0.8,1.4-0.8h4.7V36.5h-4.7 c-0.7,0-1.3-0.4-1.6-1.1c-0.2-0.7,0-1.4,0.5-1.8l16.9-14c0.4-0.3,0.8-0.4,1.2-0.4c0.4,0,0.7,0.1,1,0.4l16.9,14c0,0,0,0,0.1,0.1 c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.2 c0,0,0,0.1,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0,0,0.1c0,0,0,0,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0.1,0,0.1c0,0.1,0,0.1-0.1,0.2 c0,0,0,0.1-0.1,0.1c0,0,0,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0,0,0.1c0,0,0,0,0,0c0,0.1-0.1,0.1-0.2,0.1c0,0-0.1,0.1-0.1,0.1 c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0.1c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3,0c0,0,0,0-0.1,0c0,0,0,0,0,0 h-4.8v16.7h4.7c0.6,0,1.1,0.3,1.4,0.8l3.7,6.3C72.5,61.1,72.3,62.1,71.5,62.6z'/%3e %3c/g%3e %3c!-- Created by Anton Gajdosik from the Noun Project --%3e %3c/svg%3e"},4012:(n,o,e)=>{"use strict";e.r(o),e.d(o,{coords:()=>u,default:()=>p});var l=e(6540),t=e(3407),r=e(4294),a=e(6717),i=(e(5045),e(4337)),c=e.n(i),s=e(7240);const u={"Arc de Triomphe":[2.295,48.8737],"Place d'Italie":[2.355,48.831],Bastille:[2.369,48.853],"Tour Eiffel":[2.294,48.858],Montmartre:[2.342,48.887]};let d=0;function p(){const[n,o]=l.useState((()=>Object.keys(u).map((n=>new a.A({geometry:new r.A((0,t.Rb)(u[n])),name:n,uid:d++}))))),e=l.useRef();return l.createElement(l.Fragment,null,l.createElement(s.f9,{className:"example-map",initial:{center:(0,t.Rb)([2.364,48.82]),zoom:11},onClick:e=>{const l=e.map.getCoordinateFromPixel(e.pixel);n.push(new a.A({geometry:new r.A(l),uid:d++})),o([...n])}},l.createElement(s.ej,null),l.createElement(s.j9,{ref:e},l.createElement(s.cq.RStyle,null,l.createElement(s.cq.RIcon,{src:c()})),n.map((e=>l.createElement(s.Dp,{key:e.get("uid"),feature:e,onClick:e=>{const l=n.findIndex((n=>n.get("uid")===e.target.get("uid")));if(l>=0)return n.splice(l,1),o([...n]),!1}},l.createElement(s.Rv,null,l.createElement("div",{className:"user-select-none"},e.get("uid")))))))),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"Click an empty space to add a monument or click a monument to delete it.")))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4012],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),t=e.n(l),r=e(6314),a=e.n(r)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),t=e.n(l),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),u=e.n(s),p=e(540),d=e.n(p),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),t()(g.A,x),g.A&&g.A.locals&&g.A.locals},4337:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' version='1.1' x='0px' y='0px' viewBox='0 0 100 125' style='enable-background:new 0 0 100 100;' xml:space='preserve'%3e %3cg%3e %3crect x='41.1' y='36.5' width='3.8' height='16.7'/%3e %3cpolygon points='48.1,53.2 50,53.2 51.9,53.2 51.9,36.5 48.1,36.5 '/%3e %3cpolygon points='50.1,22.9 37.7,33.2 62.5,33.2 '/%3e %3crect x='55.2' y='36.5' width='3.8' height='16.7'/%3e %3cpath d='M50,5.2c-21.2,0-38.3,17.2-38.3,38.3c0,16.9,10.9,31.2,26.1,36.3l12.2,15l12.2-14.9c15.2-5.1,26.1-19.4,26.1-36.3 C88.3,22.4,71.2,5.2,50,5.2z M61.9,62.8H38.4c-0.9,0-1.7-0.7-1.7-1.7s0.7-1.7,1.7-1.7h23.5c0.9,0,1.7,0.7,1.7,1.7 S62.8,62.8,61.9,62.8z M71.5,62.6c-0.3,0.2-0.6,0.2-0.8,0.2c-0.6,0-1.1-0.3-1.4-0.8L66,56.6H50H34L30.8,62 c-0.3,0.5-0.9,0.8-1.4,0.8c-0.3,0-0.6-0.1-0.8-0.2c-0.8-0.5-1-1.5-0.6-2.3l3.7-6.3c0.3-0.5,0.8-0.8,1.4-0.8h4.7V36.5h-4.7 c-0.7,0-1.3-0.4-1.6-1.1c-0.2-0.7,0-1.4,0.5-1.8l16.9-14c0.4-0.3,0.8-0.4,1.2-0.4c0.4,0,0.7,0.1,1,0.4l16.9,14c0,0,0,0,0.1,0.1 c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.2 c0,0,0,0.1,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0,0,0.1c0,0,0,0,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0.1,0,0.1c0,0.1,0,0.1-0.1,0.2 c0,0,0,0.1-0.1,0.1c0,0,0,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0,0,0.1c0,0,0,0,0,0c0,0.1-0.1,0.1-0.2,0.1c0,0-0.1,0.1-0.1,0.1 c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0.1c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3,0c0,0,0,0-0.1,0c0,0,0,0,0,0 h-4.8v16.7h4.7c0.6,0,1.1,0.3,1.4,0.8l3.7,6.3C72.5,61.1,72.3,62.1,71.5,62.6z'/%3e %3c/g%3e %3c!-- Created by Anton Gajdosik from the Noun Project --%3e %3c/svg%3e"},4012:(n,o,e)=>{"use strict";e.r(o),e.d(o,{coords:()=>u,default:()=>d});var l=e(6540),t=e(3407),r=e(4294),a=e(6717),i=(e(5045),e(4337)),c=e.n(i),s=e(7240);const u={"Arc de Triomphe":[2.295,48.8737],"Place d'Italie":[2.355,48.831],Bastille:[2.369,48.853],"Tour Eiffel":[2.294,48.858],Montmartre:[2.342,48.887]};let p=0;function d(){const[n,o]=l.useState((()=>Object.keys(u).map((n=>new a.A({geometry:new r.A((0,t.Rb)(u[n])),name:n,uid:p++}))))),e=l.useRef();return l.createElement(l.Fragment,null,l.createElement(s.f9,{className:"example-map",initial:{center:(0,t.Rb)([2.364,48.82]),zoom:11},onClick:e=>{const l=e.map.getCoordinateFromPixel(e.pixel);n.push(new a.A({geometry:new r.A(l),uid:p++})),o([...n])}},l.createElement(s.ej,null),l.createElement(s.j9,{ref:e},l.createElement(s.cq.RStyle,null,l.createElement(s.cq.RIcon,{src:c()})),n.map((e=>l.createElement(s.Dp,{key:e.get("uid"),feature:e,onClick:e=>{const l=n.findIndex((n=>n.get("uid")===e.target.get("uid")));if(l>=0)return n.splice(l,1),o([...n]),!1}},l.createElement(s.Rv,null,l.createElement("div",{className:"user-select-none"},e.get("uid")))))))),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"Click an empty space to add a monument or click a monument to delete it.")))}}}]); \ No newline at end of file diff --git a/4025.bundle.js b/4025.bundle.js index ad1317c3..4f470b1b 100644 --- a/4025.bundle.js +++ b/4025.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see 4025.bundle.js.LICENSE.txt */ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4025],{8168:(e,t,n)=>{e.exports=n.p+"4fb34c1567962ff5a6c9.wasm"},4025:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});var r,s=(r="file:///home/mmom/src/rlayers/node_modules/sqlite-wasm-http/deps/dist/sqlite3-bundler-friendly.mjs",function(e={}){var t,s,i=e;i.ready=new Promise(((e,n)=>{t=e,s=n})),["_malloc","_free","_realloc","_sqlite3_aggregate_context","_sqlite3_auto_extension","_sqlite3_bind_blob","_sqlite3_bind_double","_sqlite3_bind_int","_sqlite3_bind_int64","_sqlite3_bind_null","_sqlite3_bind_parameter_count","_sqlite3_bind_parameter_index","_sqlite3_bind_pointer","_sqlite3_bind_text","_sqlite3_busy_handler","_sqlite3_busy_timeout","_sqlite3_cancel_auto_extension","_sqlite3_changes","_sqlite3_changes64","_sqlite3_clear_bindings","_sqlite3_close_v2","_sqlite3_collation_needed","_sqlite3_column_blob","_sqlite3_column_bytes","_sqlite3_column_count","_sqlite3_column_double","_sqlite3_column_int","_sqlite3_column_int64","_sqlite3_column_name","_sqlite3_column_text","_sqlite3_column_type","_sqlite3_column_value","_sqlite3_commit_hook","_sqlite3_compileoption_get","_sqlite3_compileoption_used","_sqlite3_complete","_sqlite3_context_db_handle","_sqlite3_create_collation","_sqlite3_create_collation_v2","_sqlite3_create_function","_sqlite3_create_function_v2","_sqlite3_create_module","_sqlite3_create_module_v2","_sqlite3_create_window_function","_sqlite3_data_count","_sqlite3_db_filename","_sqlite3_db_handle","_sqlite3_db_name","_sqlite3_db_status","_sqlite3_declare_vtab","_sqlite3_deserialize","_sqlite3_drop_modules","_sqlite3_errcode","_sqlite3_errmsg","_sqlite3_error_offset","_sqlite3_errstr","_sqlite3_exec","_sqlite3_expanded_sql","_sqlite3_extended_errcode","_sqlite3_extended_result_codes","_sqlite3_file_control","_sqlite3_finalize","_sqlite3_free","_sqlite3_get_auxdata","_sqlite3_initialize","_sqlite3_keyword_count","_sqlite3_keyword_name","_sqlite3_keyword_check","_sqlite3_last_insert_rowid","_sqlite3_libversion","_sqlite3_libversion_number","_sqlite3_limit","_sqlite3_malloc","_sqlite3_malloc64","_sqlite3_msize","_sqlite3_open","_sqlite3_open_v2","_sqlite3_overload_function","_sqlite3_prepare_v2","_sqlite3_prepare_v3","_sqlite3_preupdate_blobwrite","_sqlite3_preupdate_count","_sqlite3_preupdate_depth","_sqlite3_preupdate_hook","_sqlite3_preupdate_new","_sqlite3_preupdate_old","_sqlite3_progress_handler","_sqlite3_randomness","_sqlite3_realloc","_sqlite3_realloc64","_sqlite3_reset","_sqlite3_reset_auto_extension","_sqlite3_result_blob","_sqlite3_result_double","_sqlite3_result_error","_sqlite3_result_error_code","_sqlite3_result_error_nomem","_sqlite3_result_error_toobig","_sqlite3_result_int","_sqlite3_result_int64","_sqlite3_result_null","_sqlite3_result_pointer","_sqlite3_result_subtype","_sqlite3_result_text","_sqlite3_result_zeroblob","_sqlite3_result_zeroblob64","_sqlite3_rollback_hook","_sqlite3_serialize","_sqlite3_set_authorizer","_sqlite3_set_auxdata","_sqlite3_set_last_insert_rowid","_sqlite3_shutdown","_sqlite3_sourceid","_sqlite3_sql","_sqlite3_status","_sqlite3_status64","_sqlite3_step","_sqlite3_stmt_isexplain","_sqlite3_stmt_readonly","_sqlite3_stmt_status","_sqlite3_strglob","_sqlite3_stricmp","_sqlite3_strlike","_sqlite3_strnicmp","_sqlite3_table_column_metadata","_sqlite3_total_changes","_sqlite3_total_changes64","_sqlite3_trace_v2","_sqlite3_txn_state","_sqlite3_update_hook","_sqlite3_uri_boolean","_sqlite3_uri_int64","_sqlite3_uri_key","_sqlite3_uri_parameter","_sqlite3_user_data","_sqlite3_value_blob","_sqlite3_value_bytes","_sqlite3_value_double","_sqlite3_value_dup","_sqlite3_value_free","_sqlite3_value_frombind","_sqlite3_value_int","_sqlite3_value_int64","_sqlite3_value_nochange","_sqlite3_value_numeric_type","_sqlite3_value_pointer","_sqlite3_value_subtype","_sqlite3_value_text","_sqlite3_value_type","_sqlite3_vfs_find","_sqlite3_vfs_register","_sqlite3_vfs_unregister","_sqlite3_vtab_collation","_sqlite3_vtab_distinct","_sqlite3_vtab_in","_sqlite3_vtab_in_first","_sqlite3_vtab_in_next","_sqlite3_vtab_nochange","_sqlite3_vtab_on_conflict","_sqlite3_vtab_rhs_value","_sqlite3changegroup_add","_sqlite3changegroup_add_strm","_sqlite3changegroup_delete","_sqlite3changegroup_new","_sqlite3changegroup_output","_sqlite3changegroup_output_strm","_sqlite3changeset_apply","_sqlite3changeset_apply_strm","_sqlite3changeset_apply_v2","_sqlite3changeset_apply_v2_strm","_sqlite3changeset_concat","_sqlite3changeset_concat_strm","_sqlite3changeset_conflict","_sqlite3changeset_finalize","_sqlite3changeset_fk_conflicts","_sqlite3changeset_invert","_sqlite3changeset_invert_strm","_sqlite3changeset_new","_sqlite3changeset_next","_sqlite3changeset_old","_sqlite3changeset_op","_sqlite3changeset_pk","_sqlite3changeset_start","_sqlite3changeset_start_strm","_sqlite3changeset_start_v2","_sqlite3changeset_start_v2_strm","_sqlite3session_attach","_sqlite3session_changeset","_sqlite3session_changeset_size","_sqlite3session_changeset_strm","_sqlite3session_config","_sqlite3session_create","_sqlite3session_delete","_sqlite3session_diff","_sqlite3session_enable","_sqlite3session_indirect","_sqlite3session_isempty","_sqlite3session_memory_used","_sqlite3session_object_config","_sqlite3session_patchset","_sqlite3session_patchset_strm","_sqlite3session_table_filter","_sqlite3_wasm_pstack_ptr","_sqlite3_wasm_pstack_restore","_sqlite3_wasm_pstack_alloc","_sqlite3_wasm_pstack_remaining","_sqlite3_wasm_pstack_quota","_sqlite3_wasm_db_error","_sqlite3_wasm_test_struct","_sqlite3_wasm_enum_json","_sqlite3_wasm_vfs_unlink","_sqlite3_wasm_db_vfs","_sqlite3_wasm_db_reset","_sqlite3_wasm_db_export_chunked","_sqlite3_wasm_db_serialize","_sqlite3_wasm_vfs_create_file","_sqlite3_wasm_posix_create_file","_sqlite3_wasm_kvvfsMakeKeyOnPstack","_sqlite3_wasm_kvvfs_methods","_sqlite3_wasm_vtab_config","_sqlite3_wasm_db_config_ip","_sqlite3_wasm_db_config_pii","_sqlite3_wasm_db_config_s","_sqlite3_wasm_config_i","_sqlite3_wasm_config_ii","_sqlite3_wasm_config_j","_sqlite3_wasm_init_wasmfs","_sqlite3_wasm_test_intptr","_sqlite3_wasm_test_voidptr","_sqlite3_wasm_test_int64_max","_sqlite3_wasm_test_int64_min","_sqlite3_wasm_test_int64_times2","_sqlite3_wasm_test_int64_minmax","_sqlite3_wasm_test_int64ptr","_sqlite3_wasm_test_stack_overflow","_sqlite3_wasm_test_str_hello","_sqlite3_wasm_SQLTester_strglob","___indirect_function_table","_fflush","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(i.ready,e)||Object.defineProperty(i.ready,e,{get:()=>G("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>G("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));const o=globalThis.sqlite3InitModuleState||Object.assign(Object.create(null),{debugModule:()=>{}});delete globalThis.sqlite3InitModuleState,o.debugModule("globalThis.location =",globalThis.location);const a="emscripten-bug-17951";i[a]=function e(t,n){t.env.foo=function(){};const r=i.locateFile(e.uri,void 0===g?"":g);o.debugModule("instantiateWasm() uri =",r);const s=()=>fetch(r,{credentials:"same-origin"});return(WebAssembly.instantiateStreaming?async()=>WebAssembly.instantiateStreaming(s(),t).then((e=>n(e.instance,e.module))):async()=>s().then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,t))).then((e=>n(e.instance,e.module))))(),{}},i[a].uri="sqlite3.wasm";var l=Object.assign({},i),c="./this.program",_="object"==typeof window,u="function"==typeof importScripts,d="object"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions&&"string"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions.node,f=!_&&!d&&!u;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var p,m,h,g="";if(f){if("function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(p=read),h=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let t=read(e,"binary");return O("object"==typeof t),t},m=(e,t,n)=>{setTimeout((()=>t(h(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():G()),"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!_&&!u)throw new Error("environment detection error");if(u?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");p=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),m=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}}var b,y,q,E=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,l),l=null,b="fetchSettings",Object.getOwnPropertyDescriptor(i,b)&&G(`\`Module.${b}\` was supplied but \`${b}\` not included in INCOMING_MODULE_JS_API`),i.arguments&&i.arguments,Z("arguments","arguments_"),i.thisProgram&&(c=i.thisProgram),Z("thisProgram","thisProgram"),i.quit&&i.quit,Z("quit","quit_"),O(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),O(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),O(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),O(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),O(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Z("asm","wasmExports"),Z("read","read_"),Z("readAsync","readAsync"),Z("readBinary","readBinary"),Z("setWindowTitle","setWindowTitle"),O(!d,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),O(!f,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),i.wasmBinary&&(y=i.wasmBinary),Z("wasmBinary","wasmBinary"),i.noExitRuntime,Z("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,A,x,T,I,k,F=!1;function O(e,t){e||G("Assertion failed"+(t?": "+t:""))}function P(){var e=q.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=x=new Int16Array(e),i.HEAPU8=A=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAP32=T=new Int32Array(e),i.HEAPU32=I=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e),i.HEAP64=k=new BigInt64Array(e),i.HEAPU64=new BigUint64Array(e)}O(!i.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),O("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var L=i.INITIAL_MEMORY||16777216;function C(){if(!F){var e=We();0==e&&(e+=4);var t=I[e>>2],n=I[e+4>>2];34821223==t&&2310721022==n||G(`Stack overflow! Stack cookie has been overwritten at ${se(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${se(n)} ${se(t)}`),1668509029!=I[0]&&G("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Z("INITIAL_MEMORY","INITIAL_MEMORY"),O(L>=524288,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+L+"! (STACK_SIZE=524288)"),q=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:L/65536,maximum:32768}),P(),O((L=q.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var N=[],D=[],R=[],M=!1;O(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var j=0,U=null,B=null,z={};function W(e){for(var t=e;;){if(!z[e])return e;e=t+Math.random()}}function H(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(!z[e]),z[e]=1,null===U&&"undefined"!=typeof setInterval&&(U=setInterval((()=>{if(F)return clearInterval(U),void(U=null);var e=!1;for(var t in z)e||(e=!0,w("still waiting on run dependencies:")),w(`dependency: ${t}`);e&&w("(end of list)")}),1e4))):w("warning: run dependency added without ID")}function Q(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(z[e]),delete z[e]):w("warning: run dependency removed without ID"),0==j&&(null!==U&&(clearInterval(U),U=null),B)){var t=B;B=null,t()}}function G(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),F=!0;var t=new WebAssembly.RuntimeError(e);throw s(t),t}var V,$;function K(e){return e.startsWith("data:application/octet-stream;base64,")}function J(e){return function(){O(M,`native function \`${e}\` called before runtime initialization`);var t=Re[e];return O(t,`exported native function \`${e}\` not found`),t.apply(null,arguments)}}function Y(e){if(e==V&&y)return new Uint8Array(y);if(h)return h(e);throw"both async and sync fetching of the wasm failed"}function X(e,t,n){return function(e){return y||!_&&!u||"function"!=typeof fetch?Promise.resolve().then((()=>Y(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Y(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(n,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),V.startsWith("file://")&&w(`warning: Loading from a file URI (${V}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),G(e)}))}function Z(e,t,n=!0){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){G(`\`Module.${e}\` has been replaced by \`${t}\``+(n?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ee(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function te(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){ie("`"+e+"` is not longer defined by emscripten. "+t)}})}function ne(e){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),G(t)}})}i.locateFile?K(V="sqlite3.wasm")||($=V,V=i.locateFile?i.locateFile($,g):g+$):V=new URL(n(8168),n.b).href,te("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),te("asm","Please use wasmExports instead");var re=e=>{for(;e.length>0;)e.shift()(i)},se=e=>(O("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),ie=e=>{ie.shown||(ie.shown={}),ie.shown[e]||(ie.shown[e]=1,w(e))},oe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var s=e[r];"."===s?e.splice(r,1):".."===s?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=oe.isAbs(e),n="/"===e.substr(-1);return(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=oe.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=oe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return oe.normalize(e.join("/"))},join2:(e,t)=>oe.normalize(e+"/"+t)},ae=e=>(ae=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);G("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),le={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:we.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=oe.isAbs(r)}return(t?"/":"")+(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=le.resolve(e).substr(1),t=le.resolve(t).substr(1);for(var r=n(e.split("/")),s=n(t.split("/")),i=Math.min(r.length,s.length),o=i,a=0;a{for(var r=t+n,s=t;e[s]&&!(s>=r);)++s;if(s-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,s));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i},ue=[],de=e=>{for(var t=0,n=0;n=55296&&r<=57343?(t+=4,++n):t+=3}return t},fe=(e,t,n,r)=>{if(O("string"==typeof e),!(r>0))return 0;for(var s=n,i=n+r-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(n>=i)break;t[n++]=a}else if(a<=2047){if(n+1>=i)break;t[n++]=192|a>>6,t[n++]=128|63&a}else if(a<=65535){if(n+2>=i)break;t[n++]=224|a>>12,t[n++]=128|a>>6&63,t[n++]=128|63&a}else{if(n+3>=i)break;a>1114111&&ie("Invalid Unicode code point "+se(a)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++]=240|a>>18,t[n++]=128|a>>12&63,t[n++]=128|a>>6&63,t[n++]=128|63&a}}return t[n]=0,n-s};function pe(e,t,n){var r=n>0?n:de(e)+1,s=new Array(r),i=fe(e,s,0,s.length);return t&&(s.length=i),s}var me,he={ttys:[],init(){},shutdown(){},register(e,t){he.ttys[e]={input:[],output:[],ops:t},we.registerDevice(e,he.stream_ops)},stream_ops:{open(e){var t=he.ttys[e.node.rdev];if(!t)throw new we.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,s){if(!e.tty||!e.tty.ops.get_char)throw new we.ErrnoError(60);for(var i=0,o=0;o(()=>{if(!ue.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ue=pe(e,!0)}return ue.shift()})(),put_char(e,t){null===t||10===t?(E(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(_e(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(_e(e.output,0)),e.output=[])}}},ge=e=>{e=((e,t)=>(O(t,"alignment argument is required"),Math.ceil(e/t)*t))(e,65536);var t=Be(65536,e);return t?((e,t)=>(A.fill(0,e,e+t),e))(t,e):0},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,n,r){if(we.isBlkdev(n)||we.isFIFO(n))throw new we.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:we.chrdev_stream_ops}});var s=we.createNode(e,t,n,r);return we.isDir(s.mode)?(s.node_ops=be.ops_table.dir.node,s.stream_ops=be.ops_table.dir.stream,s.contents={}):we.isFile(s.mode)?(s.node_ops=be.ops_table.file.node,s.stream_ops=be.ops_table.file.stream,s.usedBytes=0,s.contents=null):we.isLink(s.mode)?(s.node_ops=be.ops_table.link.node,s.stream_ops=be.ops_table.link.stream):we.isChrdev(s.mode)&&(s.node_ops=be.ops_table.chrdev.node,s.stream_ops=be.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=we.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,we.isDir(e.mode)?t.size=4096:we.isFile(e.mode)?t.size=e.usedBytes:we.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw we.genericErrors[44]},mknod:(e,t,n,r)=>be.createNode(e,t,n,r),rename(e,t,n){if(we.isDir(e.mode)){var r;try{r=we.lookupNode(t,n)}catch(e){}if(r)for(var s in r.contents)throw new we.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=we.lookupNode(e,t);for(var r in n.contents)throw new we.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n in e.contents)e.contents.hasOwnProperty(n)&&t.push(n);return t},symlink(e,t,n){var r=be.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!we.isLink(e.mode))throw new we.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,s){var i=e.node.contents;if(s>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-s,r);if(O(o>=0),o>8&&i.subarray)t.set(i.subarray(s,s+o),n);else for(var a=0;a0||n+t(be.stream_ops.write(e,t,0,r,n,!1),0)}},ye=i.preloadPlugins||[],qe=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Ee={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},ve={},we={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=le.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new we.ErrnoError(32);for(var n=e.split("/").filter((e=>!!e)),r=we.root,s="/",i=0;i40)throw new we.ErrnoError(32)}}return{path:s,node:r}},getPath(e){for(var t;;){if(we.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?`${n}/${t}`:n+t:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r>>0)%we.nameTable.length},hashAddNode(e){var t=we.hashName(e.parent.id,e.name);e.name_next=we.nameTable[t],we.nameTable[t]=e},hashRemoveNode(e){var t=we.hashName(e.parent.id,e.name);if(we.nameTable[t]===e)we.nameTable[t]=e.name_next;else for(var n=we.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=we.mayLookup(e);if(n)throw new we.ErrnoError(n,e);for(var r=we.hashName(e.id,t),s=we.nameTable[r];s;s=s.name_next){var i=s.name;if(s.parent.id===e.id&&i===t)return s}return we.lookup(e,t)},createNode(e,t,n,r){O("object"==typeof e);var s=new we.FSNode(e,t,n,r);return we.hashAddNode(s),s},destroyNode(e){we.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>we.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>we.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,t){try{return we.lookupNode(e,t),20}catch(e){}return we.nodePermissions(e,"wx")},mayDelete(e,t,n){var r;try{r=we.lookupNode(e,t)}catch(e){return e.errno}var s=we.nodePermissions(e,"wx");if(s)return s;if(n){if(!we.isDir(r.mode))return 54;if(we.isRoot(r)||we.getPath(r)===we.cwd())return 10}else if(we.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?we.isLink(e.mode)?32:we.isDir(e.mode)&&("r"!==we.flagsToPermissionString(t)||512&t)?31:we.nodePermissions(e,we.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=we.MAX_OPEN_FDS;e++)if(!we.streams[e])return e;throw new we.ErrnoError(33)},getStreamChecked(e){var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);return t},getStream:e=>we.streams[e],createStream:(e,t=-1)=>(we.FSStream||(we.FSStream=function(){this.shared={}},we.FSStream.prototype={},Object.defineProperties(we.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new we.FSStream,e),-1==t&&(t=we.nextfd()),e.fd=t,we.streams[t]=e,e),closeStream(e){we.streams[e]=null},chrdev_stream_ops:{open(e){var t=we.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new we.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){we.devices[e]={stream_ops:t}},getDevice:e=>we.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push.apply(n,r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),we.syncFSRequests++,we.syncFSRequests>1&&w(`warning: ${we.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=we.getMounts(we.root.mount),r=0;function s(e){return O(we.syncFSRequests>0),we.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,s(e));++r>=n.length&&s(null)}n.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,n){if("string"==typeof e)throw e;var r,s="/"===n,i=!n;if(s&&we.root)throw new we.ErrnoError(10);if(!s&&!i){var o=we.lookupPath(n,{follow_mount:!1});if(n=o.path,r=o.node,we.isMountpoint(r))throw new we.ErrnoError(10);if(!we.isDir(r.mode))throw new we.ErrnoError(54)}var a={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,s?we.root=l:r&&(r.mounted=a,r.mount&&r.mount.mounts.push(a)),l},unmount(e){var t=we.lookupPath(e,{follow_mount:!1});if(!we.isMountpoint(t.node))throw new we.ErrnoError(28);var n=t.node,r=n.mounted,s=we.getMounts(r);Object.keys(we.nameTable).forEach((e=>{for(var t=we.nameTable[e];t;){var n=t.name_next;s.includes(t.mount)&&we.destroyNode(t),t=n}})),n.mounted=null;var i=n.mount.mounts.indexOf(r);O(-1!==i),n.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=we.lookupPath(e,{parent:!0}).node,s=oe.basename(e);if(!s||"."===s||".."===s)throw new we.ErrnoError(28);var i=we.mayCreate(r,s);if(i)throw new we.ErrnoError(i);if(!r.node_ops.mknod)throw new we.ErrnoError(63);return r.node_ops.mknod(r,s,t,n)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,we.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,we.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",s=0;s(void 0===n&&(n=t,t=438),t|=8192,we.mknod(e,t,n)),symlink(e,t){if(!le.resolve(e))throw new we.ErrnoError(44);var n=we.lookupPath(t,{parent:!0}).node;if(!n)throw new we.ErrnoError(44);var r=oe.basename(t),s=we.mayCreate(n,r);if(s)throw new we.ErrnoError(s);if(!n.node_ops.symlink)throw new we.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,s=oe.dirname(e),i=oe.dirname(t),o=oe.basename(e),a=oe.basename(t);if(n=we.lookupPath(e,{parent:!0}).node,r=we.lookupPath(t,{parent:!0}).node,!n||!r)throw new we.ErrnoError(44);if(n.mount!==r.mount)throw new we.ErrnoError(75);var l,c=we.lookupNode(n,o),_=le.relative(e,i);if("."!==_.charAt(0))throw new we.ErrnoError(28);if("."!==(_=le.relative(t,s)).charAt(0))throw new we.ErrnoError(55);try{l=we.lookupNode(r,a)}catch(e){}if(c!==l){var u=we.isDir(c.mode),d=we.mayDelete(n,o,u);if(d)throw new we.ErrnoError(d);if(d=l?we.mayDelete(r,a,u):we.mayCreate(r,a))throw new we.ErrnoError(d);if(!n.node_ops.rename)throw new we.ErrnoError(63);if(we.isMountpoint(c)||l&&we.isMountpoint(l))throw new we.ErrnoError(10);if(r!==n&&(d=we.nodePermissions(n,"w")))throw new we.ErrnoError(d);we.hashRemoveNode(c);try{n.node_ops.rename(c,r,a)}catch(e){throw e}finally{we.hashAddNode(c)}}},rmdir(e){var t=we.lookupPath(e,{parent:!0}).node,n=oe.basename(e),r=we.lookupNode(t,n),s=we.mayDelete(t,n,!0);if(s)throw new we.ErrnoError(s);if(!t.node_ops.rmdir)throw new we.ErrnoError(63);if(we.isMountpoint(r))throw new we.ErrnoError(10);t.node_ops.rmdir(t,n),we.destroyNode(r)},readdir(e){var t=we.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new we.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=we.lookupPath(e,{parent:!0}).node;if(!t)throw new we.ErrnoError(44);var n=oe.basename(e),r=we.lookupNode(t,n),s=we.mayDelete(t,n,!1);if(s)throw new we.ErrnoError(s);if(!t.node_ops.unlink)throw new we.ErrnoError(63);if(we.isMountpoint(r))throw new we.ErrnoError(10);t.node_ops.unlink(t,n),we.destroyNode(r)},readlink(e){var t=we.lookupPath(e).node;if(!t)throw new we.ErrnoError(44);if(!t.node_ops.readlink)throw new we.ErrnoError(28);return le.resolve(we.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=we.lookupPath(e,{follow:!t}).node;if(!n)throw new we.ErrnoError(44);if(!n.node_ops.getattr)throw new we.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>we.stat(e,!0),chmod(e,t,n){var r;if(!(r="string"==typeof e?we.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new we.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){we.chmod(e,t,!0)},fchmod(e,t){var n=we.getStreamChecked(e);we.chmod(n.node,t)},chown(e,t,n,r){var s;if(!(s="string"==typeof e?we.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new we.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown(e,t,n){we.chown(e,t,n,!0)},fchown(e,t,n){var r=we.getStreamChecked(e);we.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new we.ErrnoError(28);var n;if(!(n="string"==typeof e?we.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new we.ErrnoError(63);if(we.isDir(n.mode))throw new we.ErrnoError(31);if(!we.isFile(n.mode))throw new we.ErrnoError(28);var r=we.nodePermissions(n,"w");if(r)throw new we.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=we.getStreamChecked(e);if(!(2097155&n.flags))throw new we.ErrnoError(28);we.truncate(n.node,t)},utime(e,t,n){var r=we.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,t,n){if(""===e)throw new we.ErrnoError(44);var r;if(n=void 0===n?438:n,n=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&n|32768:0,"object"==typeof e)r=e;else{e=oe.normalize(e);try{r=we.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(r){if(128&t)throw new we.ErrnoError(20)}else r=we.mknod(e,n,0),s=!0;if(!r)throw new we.ErrnoError(44);if(we.isChrdev(r.mode)&&(t&=-513),65536&t&&!we.isDir(r.mode))throw new we.ErrnoError(54);if(!s){var o=we.mayOpen(r,t);if(o)throw new we.ErrnoError(o)}512&t&&!s&&we.truncate(r,0),t&=-131713;var a=we.createStream({node:r,path:we.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(we.readFiles||(we.readFiles={}),e in we.readFiles||(we.readFiles[e]=1)),a},close(e){if(we.isClosed(e))throw new we.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{we.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(we.isClosed(e))throw new we.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new we.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new we.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,s){if(O(n>=0),r<0||s<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(1==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.read)throw new we.ErrnoError(28);var i=void 0!==s;if(i){if(!e.seekable)throw new we.ErrnoError(70)}else s=e.position;var o=e.stream_ops.read(e,t,n,r,s);return i||(e.position+=o),o},write(e,t,n,r,s,i){if(O(n>=0),r<0||s<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.write)throw new we.ErrnoError(28);e.seekable&&1024&e.flags&&we.llseek(e,0,2);var o=void 0!==s;if(o){if(!e.seekable)throw new we.ErrnoError(70)}else s=e.position;var a=e.stream_ops.write(e,t,n,r,s,i);return o||(e.position+=a),a},allocate(e,t,n){if(we.isClosed(e))throw new we.ErrnoError(8);if(t<0||n<=0)throw new we.ErrnoError(28);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(!we.isFile(e.node.mode)&&!we.isDir(e.node.mode))throw new we.ErrnoError(43);if(!e.stream_ops.allocate)throw new we.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,s){if(2&r&&!(2&s)&&2!=(2097155&e.flags))throw new we.ErrnoError(2);if(1==(2097155&e.flags))throw new we.ErrnoError(2);if(!e.stream_ops.mmap)throw new we.ErrnoError(43);return e.stream_ops.mmap(e,t,n,r,s)},msync:(e,t,n,r,s)=>(O(n>=0),e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,s):0),munmap:e=>0,ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new we.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var n,r=we.open(e,t.flags),s=we.stat(e).size,i=new Uint8Array(s);return we.read(r,i,0,s,0),"utf8"===t.encoding?n=_e(i,0):"binary"===t.encoding&&(n=i),we.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=we.open(e,n.flags,n.mode);if("string"==typeof t){var s=new Uint8Array(de(t)+1),i=fe(t,s,0,s.length);we.write(r,s,0,i,void 0,n.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");we.write(r,t,0,t.byteLength,void 0,n.canOwn)}we.close(r)},cwd:()=>we.currentPath,chdir(e){var t=we.lookupPath(e,{follow:!0});if(null===t.node)throw new we.ErrnoError(44);if(!we.isDir(t.node.mode))throw new we.ErrnoError(54);var n=we.nodePermissions(t.node,"x");if(n)throw new we.ErrnoError(n);we.currentPath=t.path},createDefaultDirectories(){we.mkdir("/tmp"),we.mkdir("/home"),we.mkdir("/home/web_user")},createDefaultDevices(){we.mkdir("/dev"),we.registerDevice(we.makedev(1,3),{read:()=>0,write:(e,t,n,r,s)=>r}),we.mkdev("/dev/null",we.makedev(1,3)),he.register(we.makedev(5,0),he.default_tty_ops),he.register(we.makedev(6,0),he.default_tty1_ops),we.mkdev("/dev/tty",we.makedev(5,0)),we.mkdev("/dev/tty1",we.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=ae(e).byteLength),e[--t]);we.createDevice("/dev","random",n),we.createDevice("/dev","urandom",n),we.mkdir("/dev/shm"),we.mkdir("/dev/shm/tmp")},createSpecialDirectories(){we.mkdir("/proc");var e=we.mkdir("/proc/self");we.mkdir("/proc/self/fd"),we.mount({mount(){var t=we.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=+t,r=we.getStreamChecked(n),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?we.createDevice("/dev","stdin",i.stdin):we.symlink("/dev/tty","/dev/stdin"),i.stdout?we.createDevice("/dev","stdout",null,i.stdout):we.symlink("/dev/tty","/dev/stdout"),i.stderr?we.createDevice("/dev","stderr",null,i.stderr):we.symlink("/dev/tty1","/dev/stderr");var e=we.open("/dev/stdin",0),t=we.open("/dev/stdout",1),n=we.open("/dev/stderr",1);O(0===e.fd,`invalid handle for stdin (${e.fd})`),O(1===t.fd,`invalid handle for stdout (${t.fd})`),O(2===n.fd,`invalid handle for stderr (${n.fd})`)},ensureErrnoError(){we.ErrnoError||(we.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){for(var t in this.errno=e,ve)if(ve[t]===e){this.code=t;break}},this.setErrno(e),this.message=Ee[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=this.stack.replace(/\b_Z[\w\d_]+/g,(function(e){var t,n=(t=e,ie("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),t);return e===n?e:n+" ["+e+"]"})))},we.ErrnoError.prototype=new Error,we.ErrnoError.prototype.constructor=we.ErrnoError,[44].forEach((e=>{we.genericErrors[e]=new we.ErrnoError(e),we.genericErrors[e].stack=""})))},staticInit(){we.ensureErrnoError(),we.nameTable=new Array(4096),we.mount(be,{},"/"),we.createDefaultDirectories(),we.createDefaultDevices(),we.createSpecialDirectories(),we.filesystems={MEMFS:be}},init(e,t,n){O(!we.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),we.init.initialized=!0,we.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=n||i.stderr,we.createStandardStreams()},quit(){we.init.initialized=!1,Ue(0);for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),s=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;s||(o=r);var a=this;a.setDataGetter((e=>{var t=e*o,s=(e+1)*o-1;if(s=Math.min(s,r-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",n,!1),r!==o&&s.setRequestHeader("Range","bytes="+e+"-"+t),s.responseType="arraybuffer",s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(s.status>=200&&s.status<300||304===s.status))throw new Error("Couldn't load "+n+". Status: "+s.status);return void 0!==s.response?new Uint8Array(s.response||[]):pe(s.responseText||"",!0)})(t,s)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!i&&r||(o=r=1,r=this.getter(0).length,o=r,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new i;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:n};var l=we.createFile(e,t,a,r,s);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={};function _(e,t,n,r,s){var i=e.node.contents;if(s>=i.length)return 0;var o=Math.min(i.length-s,r);if(O(o>=0),i.slice)for(var a=0;a{var t=l.stream_ops[e];c[e]=function(){return we.forceLoadFile(l),t.apply(null,arguments)}})),c.read=(e,t,n,r,s)=>(we.forceLoadFile(l),_(e,t,n,r,s)),c.mmap=(e,t,n,r,s)=>{we.forceLoadFile(l);var i=ge(t);if(!i)throw new we.ErrnoError(48);return _(e,S,i,t,n),{ptr:i,allocated:!0}},l.stream_ops=c,l},absolutePath(){G("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){G("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){G("FS.createLink has been removed; use FS.symlink instead")},joinPath(){G("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){G("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){G("FS.standardizePath has been removed; use PATH.normalize instead")}},Se={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(oe.isAbs(t))return t;var r;if(r=-100===e?we.cwd():Se.getStreamFromFD(e).path,0==t.length){if(!n)throw new we.ErrnoError(44);return r}return oe.join2(r,t)},doStat(e,t,n){try{var r=e(t)}catch(e){if(e&&e.node&&oe.normalize(t)!==oe.normalize(we.getPath(e.node)))return-54;throw e}T[n>>2]=r.dev,T[n+4>>2]=r.mode,I[n+8>>2]=r.nlink,T[n+12>>2]=r.uid,T[n+16>>2]=r.gid,T[n+20>>2]=r.rdev,k[n+24>>3]=BigInt(r.size),T[n+32>>2]=4096,T[n+36>>2]=r.blocks;var s=r.atime.getTime(),i=r.mtime.getTime(),o=r.ctime.getTime();return k[n+40>>3]=BigInt(Math.floor(s/1e3)),I[n+48>>2]=s%1e3*1e3,k[n+56>>3]=BigInt(Math.floor(i/1e3)),I[n+64>>2]=i%1e3*1e3,k[n+72>>3]=BigInt(Math.floor(o/1e3)),I[n+80>>2]=o%1e3*1e3,k[n+88>>3]=BigInt(r.ino),0},doMsync(e,t,n,r,s){if(!we.isFile(t.node.mode))throw new we.ErrnoError(43);if(2&r)return 0;var i=A.slice(e,e+n);we.msync(t,i,s,n,r)},varargs:void 0,get(){O(null!=Se.varargs);var e=T[+Se.varargs>>2];return Se.varargs+=4,e},getp:()=>Se.get(),getStr(e){var t=((e,t)=>(O("number"==typeof e),e?_e(A,e,void 0):""))(e);return t},getStreamFromFD:e=>we.getStreamChecked(e)},Ae=e=>e<-9007199254740992||e>9007199254740992?NaN:Number(e),xe=(e,t,n)=>(O("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),fe(e,A,t,n)),Te=e=>I[e>>2]+4294967296*T[e+4>>2],Ie=[0,31,60,91,121,152,182,213,244,274,305,335],ke=[0,31,59,90,120,151,181,212,243,273,304,334],Fe=e=>{var t=de(e)+1,n=je(t);return n&&xe(e,n,t),n};me=()=>performance.now();var Oe=e=>{var t=q.buffer,n=(e-t.byteLength+65535)/65536;try{return q.grow(n),P(),1}catch(n){w(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},Pe={},Le=()=>{if(!Le.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var t in Pe)void 0===Pe[t]?delete e[t]:e[t]=Pe[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Le.strings=n}return Le.strings},Ce=function(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=we.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r};Object.defineProperties(Ce.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return we.isDir(this.mode)}},isDevice:{get:function(){return we.isChrdev(this.mode)}}}),we.FSNode=Ce,we.createPreloadedFile=(e,t,n,r,s,i,o,a,l,c)=>{var _=t?le.resolve(oe.join2(e,t)):e,u=W(`cp ${_}`);function d(n){function d(n){c&&c(),a||((e,t,n,r,s,i)=>{we.createDataFile(e,t,n,r,s,i)})(e,t,n,r,s,l),i&&i(),Q(u)}((e,t,n,r)=>{"undefined"!=typeof Browser&&Browser.init();var s=!1;return ye.forEach((i=>{s||i.canHandle(t)&&(i.handle(e,t,n,r),s=!0)})),s})(n,_,d,(()=>{o&&o(),Q(u)}))||d(n)}H(u),"string"==typeof n?((e,t,n,r)=>{var s=W(`al ${e}`);m(e,(t=>{O(t,`Loading data file "${e}" failed (no arrayBuffer).`),d(new Uint8Array(t)),s&&Q(s)}),(t=>{if(!n)throw`Loading data file "${e}" failed.`;n()})),s&&H(s)})(n,0,o):d(n)},we.staticInit(),ve={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Ne,De={__syscall_chmod:function(e,t){try{return e=Se.getStr(e),we.chmod(e,t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_faccessat:function(e,t,n,r){try{if(t=Se.getStr(t),O(0===r),t=Se.calculateAt(e,t),-8&n)return-28;var s=we.lookupPath(t,{follow:!0}).node;if(!s)return-44;var i="";return 4&n&&(i+="r"),2&n&&(i+="w"),1&n&&(i+="x"),i&&we.nodePermissions(s,i)?-2:0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchmod:function(e,t){try{return we.fchmod(e,t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchown32:function(e,t,n){try{return we.fchown(e,t,n),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fcntl64:function(e,t,n){Se.varargs=n;try{var r=Se.getStreamFromFD(e);switch(t){case 0:if((s=Se.get())<0)return-28;for(;we.streams[s];)s++;return we.createStream(r,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:var s=Se.get();return r.flags|=s,0;case 5:return s=Se.getp(),x[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return 28,T[Me()>>2]=28,-1}}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){try{var n=Se.getStreamFromFD(e);return Se.doStat(we.stat,n.path,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t){t=Ae(t);try{return isNaN(t)?61:(we.ftruncate(e,t),0)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getcwd:function(e,t){try{if(0===t)return-28;var n=we.cwd(),r=de(n)+1;return t>2]=s.c_iflag||0,T[i+4>>2]=s.c_oflag||0,T[i+8>>2]=s.c_cflag||0,T[i+12>>2]=s.c_lflag||0;for(var o=0;o<32;o++)S[i+o+17|0]=s.c_cc[o]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){i=Se.getp();var a=T[i>>2],l=T[i+4>>2],c=T[i+8>>2],_=T[i+12>>2],u=[];for(o=0;o<32;o++)u.push(S[i+o+17|0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:a,c_oflag:l,c_cflag:c,c_lflag:_,c_cc:u})}return 0;case 21519:return r.tty?(i=Se.getp(),T[i>>2]=0,0):-59;case 21520:return r.tty?-28:-59;case 21531:return i=Se.getp(),we.ioctl(r,t,i);case 21523:if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var d=r.tty.ops.ioctl_tiocgwinsz(r.tty);i=Se.getp(),x[i>>1]=d[0],x[i+2>>1]=d[1]}return 0;default:return-28}}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(we.lstat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_mkdirat:function(e,t,n){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),"/"===(t=oe.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),we.mkdir(t,n,0),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,n,r){try{t=Se.getStr(t);var s=256&r,i=4096&r;return O(!(r&=-6401),`unknown flags in __syscall_newfstatat: ${r}`),t=Se.calculateAt(e,t,i),Se.doStat(s?we.lstat:we.stat,t,n)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){Se.varargs=r;try{t=Se.getStr(t),t=Se.calculateAt(e,t);var s=r?Se.get():0;return we.open(t,n,s).fd}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_readlinkat:function(e,t,n,r){try{if(t=Se.getStr(t),t=Se.calculateAt(e,t),r<=0)return-28;var s=we.readlink(t),i=Math.min(r,de(s)),o=S[n+i];return xe(s,n,r+1),S[n+i]=o,i}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){try{return e=Se.getStr(e),we.rmdir(e),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(we.stat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,n){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),0===n?we.unlink(t):512===n?we.rmdir(t):G("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_utimensat:function(e,t,n,r){try{if(t=Se.getStr(t),O(0===r),t=Se.calculateAt(e,t,!0),n){var s=Te(n),i=T[n+8>>2];o=1e3*s+i/1e6,a=1e3*(s=Te(n+=16))+(i=T[n+8>>2])/1e6}else var o=Date.now(),a=o;return we.utime(t,o,a),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},_emscripten_get_now_is_monotonic:()=>!0,_localtime_js:function(e,t){e=Ae(e);var n=new Date(1e3*e);T[t>>2]=n.getSeconds(),T[t+4>>2]=n.getMinutes(),T[t+8>>2]=n.getHours(),T[t+12>>2]=n.getDate(),T[t+16>>2]=n.getMonth(),T[t+20>>2]=n.getFullYear()-1900,T[t+24>>2]=n.getDay();var r=0|(e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?ke:Ie)[e.getMonth()]+e.getDate()-1})(n);T[t+28>>2]=r,T[t+36>>2]=-60*n.getTimezoneOffset();var s=new Date(n.getFullYear(),0,1),i=new Date(n.getFullYear(),6,1).getTimezoneOffset(),o=s.getTimezoneOffset(),a=0|(i!=o&&n.getTimezoneOffset()==Math.min(o,i));T[t+32>>2]=a},_mmap_js:function(e,t,n,r,s,i,o){s=Ae(s);try{if(isNaN(s))return 61;var a=Se.getStreamFromFD(r),l=we.mmap(a,e,s,t,n),c=l.ptr;return T[i>>2]=l.allocated,I[o>>2]=c,0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,n,r,s,i){i=Ae(i);try{if(isNaN(i))return 61;var o=Se.getStreamFromFD(s);2&n&&Se.doMsync(e,o,t,r,i),we.munmap(o)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:(e,t,n)=>{var r=(new Date).getFullYear(),s=new Date(r,0,1),i=new Date(r,6,1),o=s.getTimezoneOffset(),a=i.getTimezoneOffset(),l=Math.max(o,a);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[e>>2]=60*l,T[t>>2]=Number(o!=a);var _=c(s),u=c(i),d=Fe(_),f=Fe(u);a>2]=d,I[n+4>>2]=f):(I[n>>2]=f,I[n+4>>2]=d)},emscripten_date_now:()=>Date.now(),emscripten_get_now:me,emscripten_memcpy_js:(e,t,n)=>A.copyWithin(e,t,t+n),emscripten_resize_heap:e=>{var t=A.length;O((e>>>=0)>t);var n=2147483648;if(e>n)return w(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var r,s=1;s<=4;s*=2){var i=t*(1+.2/s);i=Math.min(i,e+100663296);var o=Math.min(n,(r=Math.max(e,i))+(65536-r%65536)%65536);if(Oe(o))return!0}return w(`Failed to grow the heap from ${t} bytes to ${o} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var n=0;return Le().forEach(((r,s)=>{var i=t+n;I[e+4*s>>2]=i,((e,t)=>{for(var n=0;n{var n=Le();I[e>>2]=n.length;var r=0;return n.forEach((e=>r+=e.length+1)),I[t>>2]=r,0},fd_close:function(e){try{var t=Se.getStreamFromFD(e);return we.close(t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var n=Se.getStreamFromFD(e),r=n.tty?2:we.isDir(n.mode)?3:we.isLink(n.mode)?7:4;return S[0|t]=r,x[t+2>>1]=0,k[t+8>>3]=BigInt(0),k[t+16>>3]=BigInt(0),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){try{var s=((e,t,n,r)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=we.read(e,S,o,a,r);if(l<0)return-1;if(s+=l,l>2]=s,0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r){t=Ae(t);try{if(isNaN(t))return 61;var s=Se.getStreamFromFD(e);return we.llseek(s,t,n),k[r>>3]=BigInt(s.position),s.getdents&&0===t&&0===n&&(s.getdents=null),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=Se.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?t.stream_ops.fsync(t):0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){try{var s=((e,t,n,r)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=we.write(e,S,o,a,r);if(l<0)return-1;s+=l,void 0!==r&&(r+=l)}return s})(Se.getStreamFromFD(e),t,n);return I[r>>2]=s,0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},memory:q},Re=function(){var e={env:De,wasi_snapshot_preview1:De};function t(e,t){var n;return n=(Re=e.exports).__wasm_call_ctors,D.unshift(n),Q("wasm-instantiate"),Re}H("wasm-instantiate");var n,r,o,a,l=i;if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),s(e)}return(n=y,r=V,o=e,a=function(e){O(i===l,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),l=null,t(e.instance)},n||"function"!=typeof WebAssembly.instantiateStreaming||K(r)||"function"!=typeof fetch?X(r,o,a):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),X(r,o,a)}))))).catch(s),{}}(),Me=(J("__wasm_call_ctors"),i._sqlite3_status64=J("sqlite3_status64"),i._sqlite3_status=J("sqlite3_status"),i._sqlite3_db_status=J("sqlite3_db_status"),i._sqlite3_msize=J("sqlite3_msize"),i._sqlite3_vfs_find=J("sqlite3_vfs_find"),i._sqlite3_initialize=J("sqlite3_initialize"),i._sqlite3_vfs_register=J("sqlite3_vfs_register"),i._sqlite3_vfs_unregister=J("sqlite3_vfs_unregister"),i._sqlite3_malloc=J("sqlite3_malloc"),i._sqlite3_malloc64=J("sqlite3_malloc64"),i._sqlite3_free=J("sqlite3_free"),i._sqlite3_realloc=J("sqlite3_realloc"),i._sqlite3_realloc64=J("sqlite3_realloc64"),i._sqlite3_value_int64=J("sqlite3_value_int64"),i._sqlite3_value_double=J("sqlite3_value_double"),i._sqlite3_value_text=J("sqlite3_value_text"),i._sqlite3_randomness=J("sqlite3_randomness"),i._sqlite3_stricmp=J("sqlite3_stricmp"),i._sqlite3_strnicmp=J("sqlite3_strnicmp"),J("__errno_location")),je=(i._sqlite3_serialize=J("sqlite3_serialize"),i._sqlite3_prepare_v2=J("sqlite3_prepare_v2"),i._sqlite3_step=J("sqlite3_step"),i._sqlite3_column_int64=J("sqlite3_column_int64"),i._sqlite3_column_int=J("sqlite3_column_int"),i._sqlite3_finalize=J("sqlite3_finalize"),i._sqlite3_file_control=J("sqlite3_file_control"),i._sqlite3_reset=J("sqlite3_reset"),i._sqlite3_value_int=J("sqlite3_value_int"),i._sqlite3_deserialize=J("sqlite3_deserialize"),i._sqlite3_clear_bindings=J("sqlite3_clear_bindings"),i._sqlite3_value_blob=J("sqlite3_value_blob"),i._sqlite3_value_bytes=J("sqlite3_value_bytes"),i._sqlite3_value_subtype=J("sqlite3_value_subtype"),i._sqlite3_value_pointer=J("sqlite3_value_pointer"),i._sqlite3_value_type=J("sqlite3_value_type"),i._sqlite3_value_nochange=J("sqlite3_value_nochange"),i._sqlite3_value_frombind=J("sqlite3_value_frombind"),i._sqlite3_value_dup=J("sqlite3_value_dup"),i._sqlite3_value_free=J("sqlite3_value_free"),i._sqlite3_result_blob=J("sqlite3_result_blob"),i._sqlite3_result_error_toobig=J("sqlite3_result_error_toobig"),i._sqlite3_result_error_nomem=J("sqlite3_result_error_nomem"),i._sqlite3_result_double=J("sqlite3_result_double"),i._sqlite3_result_error=J("sqlite3_result_error"),i._sqlite3_result_int=J("sqlite3_result_int"),i._sqlite3_result_int64=J("sqlite3_result_int64"),i._sqlite3_result_null=J("sqlite3_result_null"),i._sqlite3_result_pointer=J("sqlite3_result_pointer"),i._sqlite3_result_subtype=J("sqlite3_result_subtype"),i._sqlite3_result_text=J("sqlite3_result_text"),i._sqlite3_result_zeroblob=J("sqlite3_result_zeroblob"),i._sqlite3_result_zeroblob64=J("sqlite3_result_zeroblob64"),i._sqlite3_result_error_code=J("sqlite3_result_error_code"),i._sqlite3_sql=J("sqlite3_sql"),i._sqlite3_user_data=J("sqlite3_user_data"),i._sqlite3_context_db_handle=J("sqlite3_context_db_handle"),i._sqlite3_vtab_nochange=J("sqlite3_vtab_nochange"),i._sqlite3_vtab_in_first=J("sqlite3_vtab_in_first"),i._sqlite3_vtab_in_next=J("sqlite3_vtab_in_next"),i._sqlite3_aggregate_context=J("sqlite3_aggregate_context"),i._sqlite3_get_auxdata=J("sqlite3_get_auxdata"),i._sqlite3_set_auxdata=J("sqlite3_set_auxdata"),i._sqlite3_column_count=J("sqlite3_column_count"),i._sqlite3_data_count=J("sqlite3_data_count"),i._sqlite3_column_blob=J("sqlite3_column_blob"),i._sqlite3_column_bytes=J("sqlite3_column_bytes"),i._sqlite3_column_double=J("sqlite3_column_double"),i._sqlite3_column_text=J("sqlite3_column_text"),i._sqlite3_column_value=J("sqlite3_column_value"),i._sqlite3_column_type=J("sqlite3_column_type"),i._sqlite3_column_name=J("sqlite3_column_name"),i._sqlite3_bind_blob=J("sqlite3_bind_blob"),i._sqlite3_bind_double=J("sqlite3_bind_double"),i._sqlite3_bind_int=J("sqlite3_bind_int"),i._sqlite3_bind_int64=J("sqlite3_bind_int64"),i._sqlite3_bind_null=J("sqlite3_bind_null"),i._sqlite3_bind_pointer=J("sqlite3_bind_pointer"),i._sqlite3_bind_text=J("sqlite3_bind_text"),i._sqlite3_bind_parameter_count=J("sqlite3_bind_parameter_count"),i._sqlite3_bind_parameter_index=J("sqlite3_bind_parameter_index"),i._sqlite3_db_handle=J("sqlite3_db_handle"),i._sqlite3_stmt_readonly=J("sqlite3_stmt_readonly"),i._sqlite3_stmt_isexplain=J("sqlite3_stmt_isexplain"),i._sqlite3_stmt_status=J("sqlite3_stmt_status"),i._sqlite3_expanded_sql=J("sqlite3_expanded_sql"),i._sqlite3_preupdate_old=J("sqlite3_preupdate_old"),i._sqlite3_preupdate_count=J("sqlite3_preupdate_count"),i._sqlite3_preupdate_depth=J("sqlite3_preupdate_depth"),i._sqlite3_preupdate_blobwrite=J("sqlite3_preupdate_blobwrite"),i._sqlite3_preupdate_new=J("sqlite3_preupdate_new"),i._sqlite3_value_numeric_type=J("sqlite3_value_numeric_type"),i._sqlite3_errmsg=J("sqlite3_errmsg"),i._sqlite3_set_authorizer=J("sqlite3_set_authorizer"),i._sqlite3_strglob=J("sqlite3_strglob"),i._sqlite3_strlike=J("sqlite3_strlike"),i._sqlite3_exec=J("sqlite3_exec"),i._sqlite3_auto_extension=J("sqlite3_auto_extension"),i._sqlite3_cancel_auto_extension=J("sqlite3_cancel_auto_extension"),i._sqlite3_reset_auto_extension=J("sqlite3_reset_auto_extension"),i._sqlite3_prepare_v3=J("sqlite3_prepare_v3"),i._sqlite3_create_module=J("sqlite3_create_module"),i._sqlite3_create_module_v2=J("sqlite3_create_module_v2"),i._sqlite3_drop_modules=J("sqlite3_drop_modules"),i._sqlite3_declare_vtab=J("sqlite3_declare_vtab"),i._sqlite3_vtab_on_conflict=J("sqlite3_vtab_on_conflict"),i._sqlite3_vtab_collation=J("sqlite3_vtab_collation"),i._sqlite3_vtab_in=J("sqlite3_vtab_in"),i._sqlite3_vtab_rhs_value=J("sqlite3_vtab_rhs_value"),i._sqlite3_vtab_distinct=J("sqlite3_vtab_distinct"),i._sqlite3_keyword_name=J("sqlite3_keyword_name"),i._sqlite3_keyword_count=J("sqlite3_keyword_count"),i._sqlite3_keyword_check=J("sqlite3_keyword_check"),i._sqlite3_complete=J("sqlite3_complete"),i._sqlite3_libversion=J("sqlite3_libversion"),i._sqlite3_libversion_number=J("sqlite3_libversion_number"),i._sqlite3_shutdown=J("sqlite3_shutdown"),i._sqlite3_last_insert_rowid=J("sqlite3_last_insert_rowid"),i._sqlite3_set_last_insert_rowid=J("sqlite3_set_last_insert_rowid"),i._sqlite3_changes64=J("sqlite3_changes64"),i._sqlite3_changes=J("sqlite3_changes"),i._sqlite3_total_changes64=J("sqlite3_total_changes64"),i._sqlite3_total_changes=J("sqlite3_total_changes"),i._sqlite3_txn_state=J("sqlite3_txn_state"),i._sqlite3_close_v2=J("sqlite3_close_v2"),i._sqlite3_busy_handler=J("sqlite3_busy_handler"),i._sqlite3_progress_handler=J("sqlite3_progress_handler"),i._sqlite3_busy_timeout=J("sqlite3_busy_timeout"),i._sqlite3_create_function=J("sqlite3_create_function"),i._sqlite3_create_function_v2=J("sqlite3_create_function_v2"),i._sqlite3_create_window_function=J("sqlite3_create_window_function"),i._sqlite3_overload_function=J("sqlite3_overload_function"),i._sqlite3_trace_v2=J("sqlite3_trace_v2"),i._sqlite3_commit_hook=J("sqlite3_commit_hook"),i._sqlite3_update_hook=J("sqlite3_update_hook"),i._sqlite3_rollback_hook=J("sqlite3_rollback_hook"),i._sqlite3_preupdate_hook=J("sqlite3_preupdate_hook"),i._sqlite3_error_offset=J("sqlite3_error_offset"),i._sqlite3_errcode=J("sqlite3_errcode"),i._sqlite3_extended_errcode=J("sqlite3_extended_errcode"),i._sqlite3_errstr=J("sqlite3_errstr"),i._sqlite3_limit=J("sqlite3_limit"),i._sqlite3_open=J("sqlite3_open"),i._sqlite3_open_v2=J("sqlite3_open_v2"),i._sqlite3_create_collation=J("sqlite3_create_collation"),i._sqlite3_create_collation_v2=J("sqlite3_create_collation_v2"),i._sqlite3_collation_needed=J("sqlite3_collation_needed"),i._sqlite3_table_column_metadata=J("sqlite3_table_column_metadata"),i._sqlite3_extended_result_codes=J("sqlite3_extended_result_codes"),i._sqlite3_uri_parameter=J("sqlite3_uri_parameter"),i._sqlite3_uri_key=J("sqlite3_uri_key"),i._sqlite3_uri_boolean=J("sqlite3_uri_boolean"),i._sqlite3_uri_int64=J("sqlite3_uri_int64"),i._sqlite3_db_name=J("sqlite3_db_name"),i._sqlite3_db_filename=J("sqlite3_db_filename"),i._sqlite3_compileoption_used=J("sqlite3_compileoption_used"),i._sqlite3_compileoption_get=J("sqlite3_compileoption_get"),i._sqlite3session_diff=J("sqlite3session_diff"),i._sqlite3session_attach=J("sqlite3session_attach"),i._sqlite3session_create=J("sqlite3session_create"),i._sqlite3session_delete=J("sqlite3session_delete"),i._sqlite3session_table_filter=J("sqlite3session_table_filter"),i._sqlite3session_changeset=J("sqlite3session_changeset"),i._sqlite3session_changeset_strm=J("sqlite3session_changeset_strm"),i._sqlite3session_patchset_strm=J("sqlite3session_patchset_strm"),i._sqlite3session_patchset=J("sqlite3session_patchset"),i._sqlite3session_enable=J("sqlite3session_enable"),i._sqlite3session_indirect=J("sqlite3session_indirect"),i._sqlite3session_isempty=J("sqlite3session_isempty"),i._sqlite3session_memory_used=J("sqlite3session_memory_used"),i._sqlite3session_object_config=J("sqlite3session_object_config"),i._sqlite3session_changeset_size=J("sqlite3session_changeset_size"),i._sqlite3changeset_start=J("sqlite3changeset_start"),i._sqlite3changeset_start_v2=J("sqlite3changeset_start_v2"),i._sqlite3changeset_start_strm=J("sqlite3changeset_start_strm"),i._sqlite3changeset_start_v2_strm=J("sqlite3changeset_start_v2_strm"),i._sqlite3changeset_next=J("sqlite3changeset_next"),i._sqlite3changeset_op=J("sqlite3changeset_op"),i._sqlite3changeset_pk=J("sqlite3changeset_pk"),i._sqlite3changeset_old=J("sqlite3changeset_old"),i._sqlite3changeset_new=J("sqlite3changeset_new"),i._sqlite3changeset_conflict=J("sqlite3changeset_conflict"),i._sqlite3changeset_fk_conflicts=J("sqlite3changeset_fk_conflicts"),i._sqlite3changeset_finalize=J("sqlite3changeset_finalize"),i._sqlite3changeset_invert=J("sqlite3changeset_invert"),i._sqlite3changeset_invert_strm=J("sqlite3changeset_invert_strm"),i._sqlite3changeset_apply_v2=J("sqlite3changeset_apply_v2"),i._sqlite3changeset_apply=J("sqlite3changeset_apply"),i._sqlite3changeset_apply_v2_strm=J("sqlite3changeset_apply_v2_strm"),i._sqlite3changeset_apply_strm=J("sqlite3changeset_apply_strm"),i._sqlite3changegroup_new=J("sqlite3changegroup_new"),i._sqlite3changegroup_add=J("sqlite3changegroup_add"),i._sqlite3changegroup_output=J("sqlite3changegroup_output"),i._sqlite3changegroup_add_strm=J("sqlite3changegroup_add_strm"),i._sqlite3changegroup_output_strm=J("sqlite3changegroup_output_strm"),i._sqlite3changegroup_delete=J("sqlite3changegroup_delete"),i._sqlite3changeset_concat=J("sqlite3changeset_concat"),i._sqlite3changeset_concat_strm=J("sqlite3changeset_concat_strm"),i._sqlite3session_config=J("sqlite3session_config"),i._sqlite3_sourceid=J("sqlite3_sourceid"),i._sqlite3_wasm_pstack_ptr=J("sqlite3_wasm_pstack_ptr"),i._sqlite3_wasm_pstack_restore=J("sqlite3_wasm_pstack_restore"),i._sqlite3_wasm_pstack_alloc=J("sqlite3_wasm_pstack_alloc"),i._sqlite3_wasm_pstack_remaining=J("sqlite3_wasm_pstack_remaining"),i._sqlite3_wasm_pstack_quota=J("sqlite3_wasm_pstack_quota"),i._sqlite3_wasm_db_error=J("sqlite3_wasm_db_error"),i._sqlite3_wasm_test_struct=J("sqlite3_wasm_test_struct"),i._sqlite3_wasm_enum_json=J("sqlite3_wasm_enum_json"),i._sqlite3_wasm_vfs_unlink=J("sqlite3_wasm_vfs_unlink"),i._sqlite3_wasm_db_vfs=J("sqlite3_wasm_db_vfs"),i._sqlite3_wasm_db_reset=J("sqlite3_wasm_db_reset"),i._sqlite3_wasm_db_export_chunked=J("sqlite3_wasm_db_export_chunked"),i._sqlite3_wasm_db_serialize=J("sqlite3_wasm_db_serialize"),i._sqlite3_wasm_vfs_create_file=J("sqlite3_wasm_vfs_create_file"),i._sqlite3_wasm_posix_create_file=J("sqlite3_wasm_posix_create_file"),i._sqlite3_wasm_kvvfsMakeKeyOnPstack=J("sqlite3_wasm_kvvfsMakeKeyOnPstack"),i._sqlite3_wasm_kvvfs_methods=J("sqlite3_wasm_kvvfs_methods"),i._sqlite3_wasm_vtab_config=J("sqlite3_wasm_vtab_config"),i._sqlite3_wasm_db_config_ip=J("sqlite3_wasm_db_config_ip"),i._sqlite3_wasm_db_config_pii=J("sqlite3_wasm_db_config_pii"),i._sqlite3_wasm_db_config_s=J("sqlite3_wasm_db_config_s"),i._sqlite3_wasm_config_i=J("sqlite3_wasm_config_i"),i._sqlite3_wasm_config_ii=J("sqlite3_wasm_config_ii"),i._sqlite3_wasm_config_j=J("sqlite3_wasm_config_j"),i._sqlite3_wasm_init_wasmfs=J("sqlite3_wasm_init_wasmfs"),i._sqlite3_wasm_test_intptr=J("sqlite3_wasm_test_intptr"),i._sqlite3_wasm_test_voidptr=J("sqlite3_wasm_test_voidptr"),i._sqlite3_wasm_test_int64_max=J("sqlite3_wasm_test_int64_max"),i._sqlite3_wasm_test_int64_min=J("sqlite3_wasm_test_int64_min"),i._sqlite3_wasm_test_int64_times2=J("sqlite3_wasm_test_int64_times2"),i._sqlite3_wasm_test_int64_minmax=J("sqlite3_wasm_test_int64_minmax"),i._sqlite3_wasm_test_int64ptr=J("sqlite3_wasm_test_int64ptr"),i._sqlite3_wasm_test_stack_overflow=J("sqlite3_wasm_test_stack_overflow"),i._sqlite3_wasm_test_str_hello=J("sqlite3_wasm_test_str_hello"),i._sqlite3_wasm_SQLTester_strglob=J("sqlite3_wasm_SQLTester_strglob"),i._malloc=J("malloc")),Ue=(i._free=J("free"),i._realloc=J("realloc"),i._fflush=J("fflush")),Be=J("emscripten_builtin_memalign"),ze=()=>(ze=Re.emscripten_stack_init)(),We=()=>(We=Re.emscripten_stack_get_end)();function He(){function e(){Ne||(Ne=!0,i.calledRun=!0,F||(O(!M),M=!0,C(),i.noFSInit||we.init.initialized||we.init(),we.ignorePermissions=!1,he.init(),re(D),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(C(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),R.unshift(e);var e;re(R)}()))}var n;j>0||(ze(),O(!(3&(n=We()))),0==n&&(n+=4),I[n>>2]=34821223,I[n+4>>2]=2310721022,I[0]=1668509029,function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),N.unshift(e);var e;re(N)}(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e(),C()))}if(J("stackSave"),J("stackRestore"),J("stackAlloc"),i.wasmMemory=q,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","exitJS","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","handleAllocatorInit","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",n=e;n.startsWith("_")||(n="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+n+"')",ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ie(t)}}),ne(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","keepRuntimeAlive","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","readI53FromI64","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","getExecutableName","asyncLoad","alignMemory","mmapAlloc","wasmTable","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToNewUTF8","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack"].forEach(ne),B=function e(){Ne||He(),Ne||(B=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return He(),i.postRun||(i.postRun=[]),i.postRun.push((function(e){if(globalThis.sqlite3ApiBootstrap=function t(n=globalThis.sqlite3ApiConfig||t.defaultConfig){if(t.sqlite3)return console.warn("sqlite3ApiBootstrap() called multiple times.","Config and external initializers are ignored on calls after the first."),t.sqlite3;const r=Object.assign(Object.create(null),{exports:void 0,memory:void 0,bigIntEnabled:void 0!==e?!!e.HEAPU64:!!globalThis.BigInt64Array,debug:console.debug.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),log:console.log.bind(console),wasmfsOpfsDir:"/opfs",useStdAlloc:!1},n||{});Object.assign(r,{allocExportName:r.useStdAlloc?"malloc":"sqlite3_malloc",deallocExportName:r.useStdAlloc?"free":"sqlite3_free",reallocExportName:r.useStdAlloc?"realloc":"sqlite3_realloc"},r),["exports","memory","wasmfsOpfsDir"].forEach((e=>{"function"==typeof r[e]&&(r[e]=r[e]())}));const s=Object.create(null),i=Object.create(null),o=e=>s.sqlite3_js_rc_str&&s.sqlite3_js_rc_str(e)||"Unknown result code #"+e;class a extends Error{constructor(...e){let t;if(e.length)if("number"==typeof(n=e[0])&&n===(0|n))if(t=e[0],1===e.length)super(o(e[0]));else{const n=o(t);"object"==typeof e[1]?super(n,e[1]):(e[0]=n+":",super(e.join(" ")))}else 2===e.length&&"object"==typeof e[1]?super(...e):super(e.join(" "));var n;this.resultCode=t||s.SQLITE_ERROR,this.name="SQLite3Error"}}a.toss=(...e)=>{throw new a(...e)};const l=a.toss;r.wasmfsOpfsDir&&!/^\/[^/]+$/.test(r.wasmfsOpfsDir)&&l("config.wasmfsOpfsDir must be falsy or in the form '/dir-name'.");const c=e=>"bigint"!=typeof e&&!!(e===(0|e)&&e<=2147483647&&e>=-2147483648),_="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,u=e=>e.buffer instanceof _,d=(e,t,n)=>u(e)?e.slice(t,n):e.subarray(t,n),f=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),p=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),m=e=>f(e)||l("Value is not of a supported TypedArray type."),h=new TextDecoder("utf-8"),g=function(e,t,n){return h.decode(d(e,t,n))},b=function(e){return p(e)?g(e instanceof ArrayBuffer?new Uint8Array(e):e):Array.isArray(e)?e.join(""):(i.isPtr(e)&&(e=i.cstrToJs(e)),e)};class y extends Error{constructor(...e){2===e.length&&"object"==typeof e[1]?super(...e):e.length?super(e.join(" ")):super("Allocation failed."),this.resultCode=s.SQLITE_NOMEM,this.name="WasmAllocError"}}y.toss=(...e)=>{throw new y(...e)},Object.assign(s,{sqlite3_bind_blob:void 0,sqlite3_bind_text:void 0,sqlite3_create_function_v2:(e,t,n,r,s,i,o,a,l)=>{},sqlite3_create_function:(e,t,n,r,s,i,o,a)=>{},sqlite3_create_window_function:(e,t,n,r,s,i,o,a,l,c)=>{},sqlite3_prepare_v3:(e,t,n,r,s,i)=>{},sqlite3_prepare_v2:(e,t,n,r,s)=>{},sqlite3_exec:(e,t,n,r,s)=>{},sqlite3_randomness:(e,t)=>{}});const q={affirmBindableTypedArray:m,flexibleString:b,bigIntFits32:e=>e>=-2147483648n&&e<=0x7fffffffn,bigIntFits64:function e(t){return e._max||(e._max=BigInt("0x7fffffffffffffff"),e._min=~e._max),t>=e._min&&t<=e._max},bigIntFitsDouble:function e(t){return e._min||(e._min=Number.MIN_SAFE_INTEGER,e._max=Number.MAX_SAFE_INTEGER),t>=e._min&&t<=e._max},isBindableTypedArray:f,isInt32:c,isSQLableTypedArray:p,isTypedArray:e=>!!(e&&e.constructor&&c(e.constructor.BYTES_PER_ELEMENT))&&e,typedArrayToString:g,isUIThread:()=>globalThis.window===globalThis&&!!globalThis.document,isSharedTypedArray:u,toss:function(...e){throw new Error(e.join(" "))},toss3:l,typedArrayPart:d,affirmDbHeader:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));15>e.byteLength&&l("Input does not contain an SQLite3 database header.");for(let t=0;t<15;++t)"SQLite format 3".charCodeAt(t)!==e[t]&&l("Input does not contain an SQLite3 database header.")},affirmIsDb:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=e.byteLength;(t<512||t%512!=0)&&l("Byte array size",t,"is invalid for an SQLite3 db."),q.affirmDbHeader(e)}};Object.assign(i,{ptrSizeof:r.wasmPtrSizeof||4,ptrIR:r.wasmPtrIR||"i32",bigIntEnabled:!!r.bigIntEnabled,exports:r.exports||l("Missing API config.exports (WASM module exports)."),memory:r.memory||r.exports.memory||l("API config object requires a WebAssembly.Memory object","in either config.exports.memory (exported)","or config.memory (imported)."),alloc:void 0,realloc:void 0,dealloc:void 0}),i.allocFromTypedArray=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e)),m(e);const t=i.alloc(e.byteLength||1);return i.heapForSize(e.constructor).set(e.byteLength?e:[0],t),t};{const e=r.allocExportName,t=r.deallocExportName,n=r.reallocExportName;for(const r of[e,t,n])i.exports[r]instanceof Function||l("Missing required exports[",r,"] function.");i.alloc=function e(t){return e.impl(t)||y.toss("Failed to allocate",t," bytes.")},i.alloc.impl=i.exports[e],i.realloc=function e(t,n){const r=e.impl(t,n);return n?r||y.toss("Failed to reallocate",n," bytes."):0},i.realloc.impl=i.exports[n],i.dealloc=i.exports[t]}let E;if(i.compileOptionUsed=function e(t){if(!arguments.length){if(e._result)return e._result;e._opt||(e._rx=/^([^=]+)=(.+)/,e._rxInt=/^-?\d+$/,e._opt=function(t,n){const r=e._rx.exec(t);n[0]=r?r[1]:t,n[1]=!r||(e._rxInt.test(r[2])?+r[2]:r[2])});const t={},n=[0,0];let r,i=0;for(;r=s.sqlite3_compileoption_get(i++);)e._opt(r,n),t[n[0]]=n[1];return e._result=t}if(Array.isArray(t)){const e={};return t.forEach((t=>{e[t]=s.sqlite3_compileoption_used(t)})),e}return"object"==typeof t?(Object.keys(t).forEach((e=>{t[e]=s.sqlite3_compileoption_used(e)})),t):"string"==typeof t&&!!s.sqlite3_compileoption_used(t)},i.pstack=Object.assign(Object.create(null),{restore:i.exports.sqlite3_wasm_pstack_restore,alloc:function(e){return"string"!=typeof e||(e=i.sizeofIR(e))||y.toss("Invalid value for pstack.alloc(",arguments[0],")"),i.exports.sqlite3_wasm_pstack_alloc(e)||y.toss("Could not allocate",e,"bytes from the pstack.")},allocChunks:function(e,t){"string"!=typeof t||(t=i.sizeofIR(t))||y.toss("Invalid size value for allocChunks(",arguments[1],")");const n=i.pstack.alloc(e*t),r=[];let s=0,o=0;for(;s1===e?i.pstack.alloc(t?8:i.ptrSizeof):i.pstack.allocChunks(e,t?8:i.ptrSizeof),call:function(e){const t=i.pstack.pointer;try{return e(S)}finally{i.pstack.restore(t)}}}),Object.defineProperties(i.pstack,{pointer:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_ptr},quota:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_quota},remaining:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_remaining}}),s.sqlite3_randomness=(...e)=>{if(1===e.length&&q.isTypedArray(e[0])&&1===e[0].BYTES_PER_ELEMENT){const t=e[0];if(0===t.byteLength)return i.exports.sqlite3_randomness(0,0),t;const n=i.pstack.pointer;try{let e=t.byteLength,n=0;const r=i.exports.sqlite3_randomness,s=i.heap8u(),o=e<512?e:512,a=i.pstack.alloc(o);do{const i=e>o?o:e;r(i,a),t.set(d(s,a,a+i),n),e-=i,n+=i}while(e>0)}catch(e){console.error("Highly unexpected (and ignored!) exception in sqlite3_randomness():",e)}finally{i.pstack.restore(n)}return t}i.exports.sqlite3_randomness(...e)},s.sqlite3_wasmfs_opfs_dir=function(){if(void 0!==E)return E;const e=r.wasmfsOpfsDir;if(!(e&&globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle))return E="";try{return E=e&&0===i.xCallWrapped("sqlite3_wasm_init_wasmfs","i32",["string"],e)?e:""}catch(e){return E=""}},s.sqlite3_wasmfs_filename_is_persistent=function(e){const t=s.sqlite3_wasmfs_opfs_dir();return!(!t||!e)&&e.startsWith(t+"/")},s.sqlite3_js_db_uses_vfs=function(e,t,n=0){try{const r=s.sqlite3_vfs_find(t);return!!r&&(e?r===s.sqlite3_js_db_vfs(e,n)&&r:r===s.sqlite3_vfs_find(0)&&r)}catch(e){return!1}},s.sqlite3_js_vfs_list=function(){const e=[];let t=s.sqlite3_vfs_find(0);for(;t;){const n=new s.sqlite3_vfs(t);e.push(i.cstrToJs(n.$zName)),t=n.$pNext,n.dispose()}return e},s.sqlite3_js_db_export=function(e,t=0){(e=i.xWrap.testConvertArg("sqlite3*",e))||l("Invalid sqlite3* argument."),i.bigIntEnabled||l("BigInt64 support is not enabled.");const n=i.scopedAllocPush();let r;try{const n=i.scopedAlloc(8+i.ptrSizeof),s=n+8,o=t?i.isPtr(t)?t:i.scopedAllocCString(""+t):0;let a=i.exports.sqlite3_wasm_db_serialize(e,o,s,n,0);a&&l("Database serialization failed with code",S.capi.sqlite3_js_rc_str(a)),r=i.peekPtr(s);const c=i.peek(n,"i64");return a=c?i.heap8u().slice(r,r+Number(c)):new Uint8Array,a}finally{r&&i.exports.sqlite3_free(r),i.scopedAllocPop(n)}},s.sqlite3_js_db_vfs=(e,t=0)=>i.sqlite3_wasm_db_vfs(e,t),s.sqlite3_js_aggregate_context=(e,t)=>s.sqlite3_aggregate_context(e,t)||(t?y.toss("Cannot allocate",t,"bytes for sqlite3_aggregate_context()"):0),s.sqlite3_js_posix_create_file=function(e,t,n){let r;t&&i.isPtr(t)?r=t:t instanceof ArrayBuffer||t instanceof Uint8Array?(r=i.allocFromTypedArray(t),(arguments.length<3||!q.isInt32(n)||n<0)&&(n=t.byteLength)):a.toss("Invalid 2nd argument for sqlite3_js_posix_create_file().");try{(!q.isInt32(n)||n<0)&&a.toss("Invalid 3rd argument for sqlite3_js_posix_create_file().");const t=i.sqlite3_wasm_posix_create_file(e,r,n);t&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(t))}finally{i.dealloc(r)}},s.sqlite3_js_vfs_create_file=function(e,t,n,o){let l;r.warn("sqlite3_js_vfs_create_file() is deprecated and","should be avoided because it can lead to C-level crashes.","See its documentation for alternative options."),n?(i.isPtr(n)?l=n:n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array?(l=i.allocFromTypedArray(n),(arguments.length<4||!q.isInt32(o)||o<0)&&(o=n.byteLength)):a.toss("Invalid 3rd argument type for sqlite3_js_vfs_create_file().")):l=0,(!q.isInt32(o)||o<0)&&(i.dealloc(l),a.toss("Invalid 4th argument for sqlite3_js_vfs_create_file()."));try{const n=i.sqlite3_wasm_vfs_create_file(e,t,l,o);n&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(n))}finally{i.dealloc(l)}},s.sqlite3_js_sql_to_string=e=>{if("string"==typeof e)return e;const t=b(v);return t===v?void 0:t},q.isUIThread()){const e=function(e){const t=Object.create(null);return t.prefix="kvvfs-"+e,t.stores=[],"session"!==e&&""!==e||t.stores.push(globalThis.sessionStorage),"local"!==e&&""!==e||t.stores.push(globalThis.localStorage),t};s.sqlite3_js_kvvfs_clear=function(t=""){let n=0;const r=e(t);return r.stores.forEach((e=>{const t=[];let s;for(s=0;se.removeItem(t))),n+=t.length})),n},s.sqlite3_js_kvvfs_size=function(t=""){let n=0;const r=e(t);return r.stores.forEach((e=>{let t;for(t=0;tw(e,t,"sqlite3_preupdate_new"),s.sqlite3_preupdate_old_js=(e,t)=>w(e,t,"sqlite3_preupdate_old"),s.sqlite3changeset_new_js=(e,t)=>w(e,t,"sqlite3changeset_new"),s.sqlite3changeset_old_js=(e,t)=>w(e,t,"sqlite3changeset_old");const S={WasmAllocError:y,SQLite3Error:a,capi:s,util:q,wasm:i,config:r,version:Object.create(null),client:void 0,asyncPostInit:async function e(){if(e.isReady instanceof Promise)return e.isReady;let n=t.initializersAsync;delete t.initializersAsync;const s=async()=>(S.__isUnderTest||(delete S.util,delete S.StructBinder),S),i=e=>{throw r.error("an async sqlite3 initializer failed:",e),e};if(!n||!n.length)return e.isReady=s().catch(i);n=n.map((e=>e instanceof Function?async t=>e(S):e)),n.push(s);let o=Promise.resolve(S);for(;n.length;)o=o.then(n.shift());return e.isReady=o.catch(i)},scriptInfo:void 0};try{t.initializers.forEach((e=>{e(S)}))}catch(e){throw console.error("sqlite3 bootstrap initializer threw:",e),e}return delete t.initializers,t.sqlite3=S,S},globalThis.sqlite3ApiBootstrap.initializers=[],globalThis.sqlite3ApiBootstrap.initializersAsync=[],globalThis.sqlite3ApiBootstrap.defaultConfig=Object.create(null),globalThis.sqlite3ApiBootstrap.sqlite3=void 0,globalThis.WhWasmUtilInstaller=function(e){void 0===e.bigIntEnabled&&(e.bigIntEnabled=!!globalThis.BigInt64Array);const t=(...e)=>{throw new Error(e.join(" "))};e.exports||Object.defineProperty(e,"exports",{enumerable:!0,configurable:!0,get:()=>e.instance&&e.instance.exports});const n=e.pointerIR||"i32",r=e.ptrSizeof="i32"===n?4:"i64"===n?8:t("Unhandled ptrSizeof:",n),s=Object.create(null);s.heapSize=0,s.memory=null,s.freeFuncIndexes=[],s.scopedAlloc=[],s.utf8Decoder=new TextDecoder,s.utf8Encoder=new TextEncoder("utf-8"),e.sizeofIR=e=>{switch(e){case"i8":return 1;case"i16":return 2;case"i32":case"f32":case"float":return 4;case"i64":case"f64":case"double":return 8;case"*":return r;default:return(""+e).endsWith("*")?r:void 0}};const i=function(){if(s.memory){if(s.heapSize===s.memory.buffer.byteLength)return s}else s.memory=e.memory instanceof WebAssembly.Memory?e.memory:e.exports.memory;const t=s.memory.buffer;return s.HEAP8=new Int8Array(t),s.HEAP8U=new Uint8Array(t),s.HEAP16=new Int16Array(t),s.HEAP16U=new Uint16Array(t),s.HEAP32=new Int32Array(t),s.HEAP32U=new Uint32Array(t),e.bigIntEnabled&&(s.HEAP64=new BigInt64Array(t),s.HEAP64U=new BigUint64Array(t)),s.HEAP32F=new Float32Array(t),s.HEAP64F=new Float64Array(t),s.heapSize=t.byteLength,s};e.heap8=()=>i().HEAP8,e.heap8u=()=>i().HEAP8U,e.heap16=()=>i().HEAP16,e.heap16u=()=>i().HEAP16U,e.heap32=()=>i().HEAP32,e.heap32u=()=>i().HEAP32U,e.heapForSize=function(n,r=!0){const o=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();switch(n){case Int8Array:return o.HEAP8;case Uint8Array:return o.HEAP8U;case Int16Array:return o.HEAP16;case Uint16Array:return o.HEAP16U;case Int32Array:return o.HEAP32;case Uint32Array:return o.HEAP32U;case 8:return r?o.HEAP8U:o.HEAP8;case 16:return r?o.HEAP16U:o.HEAP16;case 32:return r?o.HEAP32U:o.HEAP32;case 64:if(o.HEAP64)return r?o.HEAP64U:o.HEAP64;break;default:if(e.bigIntEnabled){if(n===globalThis.BigUint64Array)return o.HEAP64U;if(n===globalThis.BigInt64Array)return o.HEAP64;break}}t("Invalid heapForSize() size: expecting 8, 16, 32,","or (if BigInt is enabled) 64.")},e.functionTable=function(){return e.exports.__indirect_function_table},e.functionEntry=function(t){const n=e.functionTable();return t>7)},rxJSig:/^(\w)\((\w*)\)$/,sigParams:function(t){const n=e._.rxJSig.exec(t);return n?n[2]:t.substr(1)},letterType:n=>e._.sigTypes[n]||t("Invalid signature letter:",n),pushSigType:(t,n)=>t.push(e._.typeCodes[e._.letterType(n)])}),"string"==typeof n){const e=r;r=n,n=e}const s=e._.sigParams(r),i=[1,96];e._.uleb128Encode(i,"push",s.length);for(const t of s)e._.pushSigType(i,t);return"v"===r[0]?i.push(0):(i.push(1),e._.pushSigType(i,r[0])),e._.uleb128Encode(i,"unshift",i.length),i.unshift(0,97,115,109,1,0,0,0,1),i.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array(i)),{e:{f:n}}).exports.f};const o=function(n,r,i){if(i&&!s.scopedAlloc.length&&t("No scopedAllocPush() scope is active."),"string"==typeof n){const e=r;r=n,n=e}"string"==typeof r&&n instanceof Function||t("Invalid arguments: expecting (function,signature) or (signature,function).");const o=e.functionTable(),a=o.length;let l;for(;s.freeFuncIndexes.length&&(l=s.freeFuncIndexes.pop(),o.get(l));)l=null;l||(l=a,o.grow(1));try{return o.set(l,n),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l),l}catch(e){if(!(e instanceof TypeError))throw l===a&&s.freeFuncIndexes.push(a),e}try{const t=e.jsFuncToWasm(n,r);o.set(l,t),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l)}catch(e){throw l===a&&s.freeFuncIndexes.push(a),e}return l};e.installFunction=(e,t)=>o(e,t,!1),e.scopedInstallFunction=(e,t)=>o(e,t,!0),e.uninstallFunction=function(t){if(!t&&0!==t)return;const n=s.freeFuncIndexes,r=e.functionTable();n.push(t);const i=r.get(t);return r.set(t,null),i},e.peek=function(r,o="i8"){o.endsWith("*")&&(o=n);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i(),l=Array.isArray(r)?[]:void 0;let c;do{switch(l&&(r=arguments[0].shift()),o){case"i1":case"i8":c=a.HEAP8[0|r];break;case"i16":c=a.HEAP16[r>>1];break;case"i32":c=a.HEAP32[r>>2];break;case"float":case"f32":c=a.HEAP32F[r>>2];break;case"double":case"f64":c=Number(a.HEAP64F[r>>3]);break;case"i64":if(e.bigIntEnabled){c=BigInt(a.HEAP64[r>>3]);break}default:t("Invalid type for peek():",o)}l&&l.push(c)}while(l&&arguments[0].length);return l||c},e.poke=function(e,r,o="i8"){o.endsWith("*")&&(o=n);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();for(const n of Array.isArray(e)?e:[e])switch(o){case"i1":case"i8":a.HEAP8[0|n]=r;continue;case"i16":a.HEAP16[n>>1]=r;continue;case"i32":a.HEAP32[n>>2]=r;continue;case"float":case"f32":a.HEAP32F[n>>2]=r;continue;case"double":case"f64":a.HEAP64F[n>>3]=r;continue;case"i64":if(a.HEAP64){a.HEAP64[n>>3]=BigInt(r);continue}default:t("Invalid type for poke(): "+o)}return this},e.peekPtr=(...t)=>e.peek(1===t.length?t[0]:t,n),e.pokePtr=(t,r=0)=>e.poke(t,r,n),e.peek8=(...t)=>e.peek(1===t.length?t[0]:t,"i8"),e.poke8=(t,n)=>e.poke(t,n,"i8"),e.peek16=(...t)=>e.peek(1===t.length?t[0]:t,"i16"),e.poke16=(t,n)=>e.poke(t,n,"i16"),e.peek32=(...t)=>e.peek(1===t.length?t[0]:t,"i32"),e.poke32=(t,n)=>e.poke(t,n,"i32"),e.peek64=(...t)=>e.peek(1===t.length?t[0]:t,"i64"),e.poke64=(t,n)=>e.poke(t,n,"i64"),e.peek32f=(...t)=>e.peek(1===t.length?t[0]:t,"f32"),e.poke32f=(t,n)=>e.poke(t,n,"f32"),e.peek64f=(...t)=>e.peek(1===t.length?t[0]:t,"f64"),e.poke64f=(t,n)=>e.poke(t,n,"f64"),e.getMemValue=e.peek,e.getPtrValue=e.peekPtr,e.setMemValue=e.poke,e.setPtrValue=e.pokePtr,e.isPtr32=e=>"number"==typeof e&&e===(0|e)&&e>=0,e.isPtr=e.isPtr32,e.cstrlen=function(t){if(!t||!e.isPtr(t))return null;const n=i().HEAP8U;let r=t;for(;0!==n[r];++r);return r-t};const a="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer;e.cstrToJs=function(t){const n=e.cstrlen(t);return n?(r=i().HEAP8U,o=t,l=t+n,s.utf8Decoder.decode(r.buffer instanceof a?r.slice(o,l):r.subarray(o,l))):null===n?n:"";var r,o,l},e.jstrlen=function(e){if("string"!=typeof e)return null;const t=e.length;let n=0;for(let r=0;r=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++r)),t<=127?++n:n+=t<=2047?2:t<=65535?3:4}return n},e.jstrcpy=function(e,n,r=0,s=-1,i=!0){if(n&&(n instanceof Int8Array||n instanceof Uint8Array)||t("jstrcpy() target must be an Int8Array or Uint8Array."),s<0&&(s=n.length-r),!(s>0&&r>=0))return 0;let o=0,a=e.length;const l=r,c=r+s-(i?1:0);for(;o=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++o)),t<=127){if(r>=c)break;n[r++]=t}else if(t<=2047){if(r+1>=c)break;n[r++]=192|t>>6,n[r++]=128|63&t}else if(t<=65535){if(r+2>=c)break;n[r++]=224|t>>12,n[r++]=128|t>>6&63,n[r++]=128|63&t}else{if(r+3>=c)break;n[r++]=240|t>>18,n[r++]=128|t>>12&63,n[r++]=128|t>>6&63,n[r++]=128|63&t}}return i&&(n[r++]=0),r-l},e.cstrncpy=function(n,r,s){if(n&&r||t("cstrncpy() does not accept NULL strings."),s<0)s=e.cstrlen(strPtr)+1;else if(!(s>0))return 0;const i=e.heap8u();let o,a=0;for(;as.utf8Encoder.encode(t?e+"\0":e);const l=(e,n)=>{e.alloc instanceof Function&&e.dealloc instanceof Function||t("Object is missing alloc() and/or dealloc() function(s)","required by",n+"().")},c=function(t,n,r,o){if(l(e,o),"string"!=typeof t)return null;{const e=s.utf8Encoder.encode(t),o=r(e.length+1),a=i().HEAP8U;return a.set(e,o),a[o+e.length]=0,n?[o,e.length]:o}};e.allocCString=(t,n=!1)=>c(t,n,e.alloc,"allocCString()"),e.scopedAllocPush=function(){l(e,"scopedAllocPush");const t=[];return s.scopedAlloc.push(t),t},e.scopedAllocPop=function(n){l(e,"scopedAllocPop");const r=arguments.length?s.scopedAlloc.indexOf(n):s.scopedAlloc.length-1;r<0&&t("Invalid state object for scopedAllocPop()."),0===arguments.length&&(n=s.scopedAlloc[r]),s.scopedAlloc.splice(r,1);for(let t;t=n.pop();)e.functionEntry(t)?e.uninstallFunction(t):e.dealloc(t)},e.scopedAlloc=function(n){s.scopedAlloc.length||t("No scopedAllocPush() scope is active.");const r=e.alloc(n);return s.scopedAlloc[s.scopedAlloc.length-1].push(r),r},Object.defineProperty(e.scopedAlloc,"level",{configurable:!1,enumerable:!1,get:()=>s.scopedAlloc.length,set:()=>t("The 'active' property is read-only.")}),e.scopedAllocCString=(t,n=!1)=>c(t,n,e.scopedAlloc,"scopedAllocCString()");const _=function(t,n){const r=e[t?"scopedAlloc":"alloc"]((n.length+1)*e.ptrSizeof);let s=0;return n.forEach((n=>{e.pokePtr(r+e.ptrSizeof*s++,e[t?"scopedAllocCString":"allocCString"](""+n))})),e.pokePtr(r+e.ptrSizeof*s,0),r};e.scopedAllocMainArgv=e=>_(!0,e),e.allocMainArgv=e=>_(!1,e),e.cArgvToJs=(t,n)=>{const r=[];for(let s=0;su(e,t,"alloc"),e.scopedAllocPtr=(e=1,t=!0)=>u(e,t,"scopedAlloc"),e.xGet=function(n){return e.exports[n]||t("Cannot find exported symbol:",n)};const d=(e,n)=>t(e+"() requires",n,"argument(s).");e.xCall=function(n,...r){const s=e.xGet(n);return s instanceof Function||t("Exported symbol",n,"is not a function."),s.length!==r.length&&d(n,s.length),2===arguments.length&&Array.isArray(arguments[1])?s.apply(null,arguments[1]):s.apply(null,r)},s.xWrap=Object.create(null),s.xWrap.convert=Object.create(null),s.xWrap.convert.arg=new Map,s.xWrap.convert.result=new Map;const f=s.xWrap.convert.arg,p=s.xWrap.convert.result;e.bigIntEnabled&&f.set("i64",(e=>BigInt(e)));const m="i32"===n?e=>0|e:e=>BigInt(e)|BigInt(0);f.set("i32",m).set("i16",(e=>65535&e)).set("i8",(e=>255&e)).set("f32",(e=>Number(e).valueOf())).set("float",f.get("f32")).set("f64",f.get("f32")).set("double",f.get("f64")).set("int",f.get("i32")).set("null",(e=>e)).set(null,f.get("null")).set("**",m).set("*",m),p.set("*",m).set("pointer",m).set("number",(e=>Number(e))).set("void",(e=>{})).set("null",(e=>e)).set(null,p.get("null"));{const r=["i8","i16","i32","int","f32","float","f64","double"];e.bigIntEnabled&&r.push("i64");const s=f.get(n);for(const e of r)f.set(e+"*",s),p.set(e+"*",s),p.set(e,f.get(e)||t("Missing arg converter:",e))}const h=function(t){return"string"==typeof t?e.scopedAllocCString(t):t?m(t):null};f.set("string",h).set("utf8",h).set("pointer",h),p.set("string",(t=>e.cstrToJs(t))).set("utf8",p.get("string")).set("string:dealloc",(t=>{try{return t?e.cstrToJs(t):null}finally{e.dealloc(t)}})).set("utf8:dealloc",p.get("string:dealloc")).set("json",(t=>JSON.parse(e.cstrToJs(t)))).set("json:dealloc",(t=>{try{return t?JSON.parse(e.cstrToJs(t)):null}finally{e.dealloc(t)}}));const g=class{constructor(e){this.name=e.name||"unnamed adapter"}convertArg(e,n,r){t("AbstractArgAdapter must be subclassed.")}};f.FuncPtrAdapter=class n extends g{constructor(e){super(e),f.FuncPtrAdapter.warnOnUse&&console.warn("xArg.FuncPtrAdapter is an internal-only API","and is not intended to be invoked from","client-level code. Invoked with:",e),this.name=e.name||"unnamed",this.signature=e.signature,e.contextKey instanceof Function&&(this.contextKey=e.contextKey,e.bindScope||(e.bindScope="context")),this.bindScope=e.bindScope||t("FuncPtrAdapter options requires a bindScope (explicit or implied)."),n.bindScopes.indexOf(e.bindScope)<0&&t("Invalid options.bindScope ("+e.bindMod+") for FuncPtrAdapter. Expecting one of: ("+n.bindScopes.join(", ")+")"),this.isTransient="transient"===this.bindScope,this.isContext="context"===this.bindScope,this.isPermanent="permanent"===this.bindScope,this.singleton="singleton"===this.bindScope?[]:void 0,this.callProxy=e.callProxy instanceof Function?e.callProxy:void 0}contextKey(e,t){return this}contextMap(e){const t=this.__cmap||(this.__cmap=new Map);let n=t.get(e);return void 0===n&&t.set(e,n=[]),n}convertArg(t,r,i){let a=this.singleton;if(!a&&this.isContext&&(a=this.contextMap(this.contextKey(r,i))),a&&a[0]===t)return a[1];if(t instanceof Function){this.callProxy&&(t=this.callProxy(t));const e=o(t,this.signature,this.isTransient);if(n.debugFuncInstall&&n.debugOut("FuncPtrAdapter installed",this,this.contextKey(r,i),"@"+e,t),a){if(a[1]){n.debugFuncInstall&&n.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(r,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}}a[0]=t,a[1]=e}return e}if(e.isPtr(t)||null==t){if(a&&a[1]&&a[1]!==t){n.debugFuncInstall&&n.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(r,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}a[0]=a[1]=0|t}return t||0}throw new TypeError("Invalid FuncPtrAdapter argument type. Expecting a function pointer or a "+(this.name?this.name+" ":"")+"function matching signature "+this.signature+".")}},f.FuncPtrAdapter.warnOnUse=!1,f.FuncPtrAdapter.debugFuncInstall=!1,f.FuncPtrAdapter.debugOut=console.debug.bind(console),f.FuncPtrAdapter.bindScopes=["transient","context","singleton","permanent"];const b=e=>f.get(e)||t("Argument adapter not found:",e),y=e=>p.get(e)||t("Result adapter not found:",e);s.xWrap.convertArg=(e,...t)=>b(e)(...t),s.xWrap.convertArgNoCheck=(e,...t)=>f.get(e)(...t),s.xWrap.convertResult=(e,t)=>null===e?t:e?y(e)(t):void 0,s.xWrap.convertResultNoCheck=(e,t)=>null===e?t:e?p.get(e)(t):void 0,e.xWrap=function(n,r,...i){3===arguments.length&&Array.isArray(arguments[2])&&(i=arguments[2]),e.isPtr(n)&&(n=e.functionEntry(n)||t("Function pointer not found in WASM function table."));const o=n instanceof Function,a=o?n:e.xGet(n);if(o&&(n=a.name||"unnamed function"),i.length!==a.length&&d(n,a.length),null===r&&0===a.length)return a;null!=r&&y(r);for(const e of i)e instanceof g?f.set(e,((...t)=>e.convertArg(...t))):b(e);const l=s.xWrap;return 0===a.length?(...e)=>e.length?d(n,a.length):l.convertResult(r,a.call(null)):function(...t){t.length!==a.length&&d(n,a.length);const s=e.scopedAllocPush();try{for(const e in t)t[e]=l.convertArgNoCheck(i[e],t[e],t,e);return l.convertResultNoCheck(r,a.apply(null,t))}finally{e.scopedAllocPop(s)}}};const q=function(e,n,r,s,i,o){if("string"==typeof r){if(1===n)return o.get(r);if(2===n)return s?(s instanceof Function||t(i,"requires a function argument."),o.set(r,s),e):(o.get(r),e)}t("Invalid arguments to",i)};return e.xWrap.resultAdapter=function e(t,n){return q(e,arguments.length,t,n,"resultAdapter()",p)},e.xWrap.argAdapter=function e(t,n){return q(e,arguments.length,t,n,"argAdapter()",f)},e.xWrap.FuncPtrAdapter=f.FuncPtrAdapter,e.xCallWrapped=function(t,n,r,...s){return Array.isArray(arguments[3])&&(s=arguments[3]),e.xWrap(t,n,r||[]).apply(null,s||[])},e.xWrap.testConvertArg=s.xWrap.convertArg,e.xWrap.testConvertResult=s.xWrap.convertResult,e},globalThis.WhWasmUtilInstaller.yawl=function(e){const t=()=>fetch(e.uri,{credentials:"same-origin"}),n=this,r=function(t){if(e.wasmUtilTarget){const r=(...e)=>{throw new Error(e.join(" "))},s=e.wasmUtilTarget;if(s.module=t.module,s.instance=t.instance,s.instance.exports.memory||(s.memory=e.imports&&e.imports.env&&e.imports.env.memory||r("Missing 'memory' object!")),!s.alloc&&t.instance.exports.malloc){const e=t.instance.exports;s.alloc=function(t){return e.malloc(t)||r("Allocation of",t,"bytes failed.")},s.dealloc=function(t){e.free(t)}}n(s)}return e.onload&&e.onload(t,e),t};return WebAssembly.instantiateStreaming?function(){return WebAssembly.instantiateStreaming(t(),e.imports||{}).then(r)}:function(){return t().then((e=>e.arrayBuffer())).then((t=>WebAssembly.instantiate(t,e.imports||{}))).then(r)}}.bind(globalThis.WhWasmUtilInstaller),globalThis.Jaccwabyt=function e(t){const n=(...e)=>{throw new Error(e.join(" "))};t.heap instanceof WebAssembly.Memory||t.heap instanceof Function||n("config.heap must be WebAssembly.Memory instance or a function."),["alloc","dealloc"].forEach((function(e){t[e]instanceof Function||n("Config option '"+e+"' must be a function.")}));const r=e,s=t.heap instanceof Function?t.heap:()=>new Uint8Array(t.heap.buffer),i=t.alloc,o=t.dealloc,a=t.log||console.log.bind(console),l=t.memberPrefix||"",c=t.memberSuffix||"",_=void 0===t.bigIntEnabled?!!globalThis.BigInt64Array:!!t.bigIntEnabled,u=globalThis.BigInt,d=globalThis.BigInt64Array,f=t.ptrSizeof||4,p=t.ptrIR||"i32";r.debugFlags||(r.__makeDebugFlags=function(e=null){e&&e.__flags&&(e=e.__flags);const t=function e(t){return 0===arguments.length?e.__flags:(t<0?(delete e.__flags.getter,delete e.__flags.setter,delete e.__flags.alloc,delete e.__flags.dealloc):(e.__flags.getter=!!(1&t),e.__flags.setter=!!(2&t),e.__flags.alloc=!!(4&t),e.__flags.dealloc=!!(8&t)),e._flags)};return Object.defineProperty(t,"__flags",{iterable:!1,writable:!1,value:Object.create(e)}),e||t(0),t},r.debugFlags=r.__makeDebugFlags());const m=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),h=e=>(e=>"("===e[1])(e)?"p":e[0],g=function(e){switch(h(e)){case"c":case"C":return"i8";case"i":return"i32";case"p":case"P":case"s":return p;case"j":return"i64";case"f":return"float";case"d":return"double"}n("Unhandled signature IR:",e)},b=d?()=>!0:()=>n("BigInt64Array is not available."),y=(e,t)=>e+"::"+t,q=new WeakMap,E="(pointer-is-external)",v=function(e,t,n){if(n||(n=q.get(t)),n){if(q.delete(t),Array.isArray(t.ondispose)){let r;for(;r=t.ondispose.shift();)try{r instanceof Function?r.call(t):r instanceof D?r.dispose():"number"==typeof r&&o(r)}catch(t){console.warn("ondispose() for",e.structName,"@",n,"threw. NOT propagating it.",t)}}else if(t.ondispose instanceof Function)try{t.ondispose()}catch(t){console.warn("ondispose() for",e.structName,"@",n,"threw. NOT propagating it.",t)}delete t.ondispose,e.debugFlags.__flags.dealloc&&a("debug.dealloc:",t[E]?"EXTERNAL":"",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+n),t[E]||o(n)}},w=e=>({configurable:!1,writable:!1,iterable:!1,value:e}),S=function(e,t,r){let o=!r;r?Object.defineProperty(t,E,w(r)):(r=i(e.structInfo.sizeof))||n("Allocation of",e.structName,"structure failed.");try{e.debugFlags.__flags.alloc&&a("debug.alloc:",o?"":"EXTERNAL",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+r),o&&s().fill(0,r,r+e.structInfo.sizeof),q.set(t,r)}catch(n){throw v(e,t,r),n}},A=w((e=>l+e+c)),x=function(e,t,r=!0){let s=e.members[t];if(!s&&(l||c)){for(const n of Object.values(e.members))if(n.key===t){s=n;break}!s&&r&&n(y(e.name,t),"is not a mapped struct member.")}return s},T=function e(t,n,r=!1){e._||(e._=e=>e.replace(/[^vipPsjrdcC]/g,"").replace(/[pPscC]/g,"i"));const s=x(t.structInfo,n,!0);return r?e._(s.signature):s.signature},I={configurable:!1,enumerable:!1,get:function(){return q.get(this)},set:()=>n("Cannot assign the 'pointer' property of a struct.")},k=w((function(){const e=[];for(const t of Object.keys(this.structInfo.members))e.push(this.memberKey(t));return e})),F=new TextDecoder("utf-8"),O=new TextEncoder,P="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,L=function(e){"s"!==e.signature&&n("Invalid member type signature for C-string value:",JSON.stringify(e))},C=function(e,...t){e.ondispose?Array.isArray(e.ondispose)||(e.ondispose=[e.ondispose]):e.ondispose=[],e.ondispose.push(...t)},N=function(e){const t=O.encode(e),r=i(t.length+1);r||n("Allocation error while duplicating string:",e);const o=s();return o.set(t,r),o[r+t.length]=0,r},D=function(e,t){arguments[2]!==w&&n("Do not call the StructType constructor","from client-level code."),Object.defineProperties(this,{structName:w(e),structInfo:w(t)})};D.prototype=Object.create(null,{dispose:w((function(){v(this.constructor,this)})),lookupMember:w((function(e,t=!0){return x(this.structInfo,e,t)})),memberToJsString:w((function(e){return function(e,t){const n=x(e.structInfo,t,!0);L(n);const r=e[n.key];if(!r)return null;let i=r;const o=s();for(;0!==o[i];++i);return r===i?"":(a=o,l=r,c=i,F.decode(a.buffer instanceof P?a.slice(l,c):a.subarray(l,c)));var a,l,c}(this,e)})),memberIsString:w((function(e,t=!0){return function(e,t,n=!1){const r=x(e.structInfo,t,n);return!(!r||1!==r.signature.length||"s"!==r.signature[0])&&r}(this,e,t)})),memberKey:A,memberKeys:k,memberSignature:w((function(e,t=!1){return T(this,e,t)})),memoryDump:w((function(){const e=this.pointer;return e?new Uint8Array(s().slice(e,e+this.structInfo.sizeof)):null})),pointer:I,setMemberCString:w((function(e,t){return function(e,t,n){const r=x(e.structInfo,t,!0);L(r);const s=N(n);return e[r.key]=s,C(e,s),e}(this,e,t)}))}),Object.assign(D.prototype,{addOnDispose:function(...e){return C(this,...e),this}}),Object.defineProperties(D,{allocCString:w(N),isA:w((e=>e instanceof D)),hasExternalPointer:w((e=>e instanceof D&&!!e[E])),memberKey:A});const R=e=>Number.isFinite(e)||e instanceof(u||Number),M=function e(t,r,i){if(!e._){e._={getters:{},setters:{},sw:{}};const t=["i","c","C","p","P","s","f","d","v()"];_&&t.push("j"),t.forEach((function(t){e._.getters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"getInt32";case 8:return b()&&"getBigInt64"}break;case"i":return"getInt32";case"c":return"getInt8";case"C":return"getUint8";case"j":return b()&&"getBigInt64";case"f":return"getFloat32";case"d":return"getFloat64"}n("Unhandled DataView getter for signature:",e)}(t),e._.setters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"setInt32";case 8:return b()&&"setBigInt64"}break;case"i":return"setInt32";case"c":return"setInt8";case"C":return"setUint8";case"j":return b()&&"setBigInt64";case"f":return"setFloat32";case"d":return"setFloat64"}n("Unhandled DataView setter for signature:",e)}(t),e._.sw[t]=function(e){switch(h(e)){case"i":case"f":case"c":case"C":case"d":return Number;case"j":return b()&&u;case"p":case"P":case"s":switch(f){case 4:return Number;case 8:return b()&&u}}n("Unhandled DataView set wrapper for signature:",e)}(t)}));const r=/^[ipPsjfdcC]$/,s=/^[vipPsjfdcC]\([ipPsjfdcC]*\)$/;e.sigCheck=function(e,t,i,o){Object.prototype.hasOwnProperty.call(e,i)&&n(e.structName,"already has a property named",i+"."),r.test(o)||s.test(o)||n("Malformed signature for",y(e.structName,t)+":",o)}}const o=t.memberKey(r);e.sigCheck(t.prototype,r,o,i.signature),i.key=o,i.name=r;const l=h(i.signature),c=y(t.prototype.structName,o),d=t.prototype.debugFlags.__flags,p=Object.create(null);var q,E;p.configurable=!1,p.enumerable=!1,p.get=function(){d.getter&&a("debug.getter:",e._.getters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof);let t=new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.getters[l]](0,m);return d.getter&&a("debug.getter:",c,"result =",t),t},i.readOnly?p.set=(q=t.prototype.structName,E=o,()=>n(y(q,E),"is read-only.")):p.set=function(t){if(d.setter&&a("debug.setter:",e._.setters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof,t),this.pointer||n("Cannot set struct property on disposed instance."),null===t)t=0;else for(;!R(t);){if("P"===i.signature&&t instanceof D){t=t.pointer||0,d.setter&&a("debug.setter:",c,"resolved to",t);break}n("Invalid value for pointer-type",c+".")}new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.setters[l]](0,e._.sw[l](t),m)},Object.defineProperty(t.prototype,o,p)},j=function e(t,s){1===arguments.length?t=(s=t).name:s.name||(s.name=t),t||n("Struct name is required.");let i=!1;Object.keys(s.members).forEach((e=>{const r=s.members[e];r.sizeof?1===r.sizeof?"c"===r.signature||"C"===r.signature||n("Unexpected sizeof==1 member",y(s.name,e),"with signature",r.signature):(0!=r.sizeof%4&&(console.warn("Invalid struct member description =",r,"from",s),n(t,"member",e,"sizeof is not aligned. sizeof="+r.sizeof)),0!=r.offset%4&&(console.warn("Invalid struct member description =",r,"from",s),n(t,"member",e,"offset is not aligned. offset="+r.offset))):n(t,"member",e,"is missing sizeof."),(!i||i.offsete instanceof a)),memberKey:A,memberKeys:k,methodInfoForKey:w((function(e){})),structInfo:w(s),structName:w(t)}),a.prototype=new D(t,s,w),Object.defineProperties(a.prototype,{debugFlags:o,constructor:w(a)}),Object.keys(s.members).forEach((e=>M(a,e,s.members[e]))),a};return j.StructType=D,j.config=t,j.allocCString=N,j.debugFlags||(j.debugFlags=r.__makeDebugFlags(r.debugFlags)),j},globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...e)=>{throw new Error(e.join(" "))},n=(e.SQLite3Error.toss,e.capi),r=e.wasm,s=e.util;if(globalThis.WhWasmUtilInstaller(r),delete globalThis.WhWasmUtilInstaller,r.bindingSignatures=[["sqlite3_aggregate_context","void*","sqlite3_context*","int"],["sqlite3_bind_double","int","sqlite3_stmt*","int","f64"],["sqlite3_bind_int","int","sqlite3_stmt*","int","int"],["sqlite3_bind_null",void 0,"sqlite3_stmt*","int"],["sqlite3_bind_parameter_count","int","sqlite3_stmt*"],["sqlite3_bind_parameter_index","int","sqlite3_stmt*","string"],["sqlite3_bind_pointer","int","sqlite3_stmt*","int","*","string:static","*"],["sqlite3_busy_handler","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({signature:"i(pi)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_busy_timeout","int","sqlite3*","int"],["sqlite3_changes","int","sqlite3*"],["sqlite3_clear_bindings","int","sqlite3_stmt*"],["sqlite3_collation_needed","int","sqlite3*","*","*"],["sqlite3_column_blob","*","sqlite3_stmt*","int"],["sqlite3_column_bytes","int","sqlite3_stmt*","int"],["sqlite3_column_count","int","sqlite3_stmt*"],["sqlite3_column_double","f64","sqlite3_stmt*","int"],["sqlite3_column_int","int","sqlite3_stmt*","int"],["sqlite3_column_name","string","sqlite3_stmt*","int"],["sqlite3_column_text","string","sqlite3_stmt*","int"],["sqlite3_column_type","int","sqlite3_stmt*","int"],["sqlite3_column_value","sqlite3_value*","sqlite3_stmt*","int"],["sqlite3_commit_hook","void*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_commit_hook",signature:"i(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_compileoption_get","string","int"],["sqlite3_compileoption_used","int","string"],["sqlite3_complete","int","string:flexible"],["sqlite3_context_db_handle","sqlite3*","sqlite3_context*"],["sqlite3_data_count","int","sqlite3_stmt*"],["sqlite3_db_filename","string","sqlite3*","string"],["sqlite3_db_handle","sqlite3*","sqlite3_stmt*"],["sqlite3_db_name","string","sqlite3*","int"],["sqlite3_db_status","int","sqlite3*","int","*","*","int"],["sqlite3_errcode","int","sqlite3*"],["sqlite3_errmsg","string","sqlite3*"],["sqlite3_error_offset","int","sqlite3*"],["sqlite3_errstr","string","int"],["sqlite3_exec","int",["sqlite3*","string:flexible",new r.xWrap.FuncPtrAdapter({signature:"i(pipp)",bindScope:"transient",callProxy:e=>{let t;return(s,i,o,a)=>{try{const n=r.cArgvToJs(i,o);return t||(t=r.cArgvToJs(i,a)),0|e(n,t)}catch(e){return e.resultCode||n.SQLITE_ERROR}}}}),"*","**"]],["sqlite3_expanded_sql","string","sqlite3_stmt*"],["sqlite3_extended_errcode","int","sqlite3*"],["sqlite3_extended_result_codes","int","sqlite3*","int"],["sqlite3_file_control","int","sqlite3*","string","int","*"],["sqlite3_finalize","int","sqlite3_stmt*"],["sqlite3_free",void 0,"*"],["sqlite3_get_auxdata","*","sqlite3_context*","int"],["sqlite3_initialize",void 0],["sqlite3_keyword_count","int"],["sqlite3_keyword_name","int",["int","**","*"]],["sqlite3_keyword_check","int",["string","int"]],["sqlite3_libversion","string"],["sqlite3_libversion_number","int"],["sqlite3_limit","int",["sqlite3*","int","int"]],["sqlite3_malloc","*","int"],["sqlite3_open","int","string","*"],["sqlite3_open_v2","int","string","*","int","string"],["sqlite3_progress_handler",void 0,["sqlite3*","int",new r.xWrap.FuncPtrAdapter({name:"xProgressHandler",signature:"i(p)",bindScope:"context",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_realloc","*","*","int"],["sqlite3_reset","int","sqlite3_stmt*"],["sqlite3_result_blob",void 0,"sqlite3_context*","*","int","*"],["sqlite3_result_double",void 0,"sqlite3_context*","f64"],["sqlite3_result_error",void 0,"sqlite3_context*","string","int"],["sqlite3_result_error_code",void 0,"sqlite3_context*","int"],["sqlite3_result_error_nomem",void 0,"sqlite3_context*"],["sqlite3_result_error_toobig",void 0,"sqlite3_context*"],["sqlite3_result_int",void 0,"sqlite3_context*","int"],["sqlite3_result_null",void 0,"sqlite3_context*"],["sqlite3_result_pointer",void 0,"sqlite3_context*","*","string:static","*"],["sqlite3_result_subtype",void 0,"sqlite3_value*","int"],["sqlite3_result_text",void 0,"sqlite3_context*","string","int","*"],["sqlite3_result_zeroblob",void 0,"sqlite3_context*","int"],["sqlite3_rollback_hook","void*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_rollback_hook",signature:"v(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_set_authorizer","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_set_authorizer::xAuth",signature:"i(pissss)",contextKey:(e,t)=>e[0],callProxy:e=>(t,s,i,o,a,l)=>{try{return i=i&&r.cstrToJs(i),o=o&&r.cstrToJs(o),a=a&&r.cstrToJs(a),l=l&&r.cstrToJs(l),e(t,s,i,o,a,l)||0}catch(e){return e.resultCode||n.SQLITE_ERROR}}}),"*"]],["sqlite3_set_auxdata",void 0,["sqlite3_context*","int","*",new r.xWrap.FuncPtrAdapter({name:"xDestroyAuxData",signature:"v(*)",contextKey:(e,t)=>e[0]})]],["sqlite3_shutdown",void 0],["sqlite3_sourceid","string"],["sqlite3_sql","string","sqlite3_stmt*"],["sqlite3_status","int","int","*","*","int"],["sqlite3_step","int","sqlite3_stmt*"],["sqlite3_stmt_isexplain","int",["sqlite3_stmt*"]],["sqlite3_stmt_readonly","int",["sqlite3_stmt*"]],["sqlite3_stmt_status","int","sqlite3_stmt*","int","int"],["sqlite3_strglob","int","string","string"],["sqlite3_stricmp","int","string","string"],["sqlite3_strlike","int","string","string","int"],["sqlite3_strnicmp","int","string","string","int"],["sqlite3_table_column_metadata","int","sqlite3*","string","string","string","**","**","*","*","*"],["sqlite3_total_changes","int","sqlite3*"],["sqlite3_trace_v2","int",["sqlite3*","int",new r.xWrap.FuncPtrAdapter({name:"sqlite3_trace_v2::callback",signature:"i(ippp)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_txn_state","int",["sqlite3*","string"]],["sqlite3_uri_boolean","int","sqlite3_filename","string","int"],["sqlite3_uri_key","string","sqlite3_filename","int"],["sqlite3_uri_parameter","string","sqlite3_filename","string"],["sqlite3_user_data","void*","sqlite3_context*"],["sqlite3_value_blob","*","sqlite3_value*"],["sqlite3_value_bytes","int","sqlite3_value*"],["sqlite3_value_double","f64","sqlite3_value*"],["sqlite3_value_dup","sqlite3_value*","sqlite3_value*"],["sqlite3_value_free",void 0,"sqlite3_value*"],["sqlite3_value_frombind","int","sqlite3_value*"],["sqlite3_value_int","int","sqlite3_value*"],["sqlite3_value_nochange","int","sqlite3_value*"],["sqlite3_value_numeric_type","int","sqlite3_value*"],["sqlite3_value_pointer","*","sqlite3_value*","string:static"],["sqlite3_value_subtype","int","sqlite3_value*"],["sqlite3_value_text","string","sqlite3_value*"],["sqlite3_value_type","int","sqlite3_value*"],["sqlite3_vfs_find","*","string"],["sqlite3_vfs_register","int","sqlite3_vfs*","int"],["sqlite3_vfs_unregister","int","sqlite3_vfs*"]],r.exports.sqlite3_activate_see instanceof Function&&r.bindingSignatures.push(["sqlite3_key","int","sqlite3*","string","int"],["sqlite3_key_v2","int","sqlite3*","string","*","int"],["sqlite3_rekey","int","sqlite3*","string","int"],["sqlite3_rekey_v2","int","sqlite3*","string","*","int"],["sqlite3_activate_see",void 0,"string"]),r.bindingSignatures.int64=[["sqlite3_bind_int64","int",["sqlite3_stmt*","int","i64"]],["sqlite3_changes64","i64",["sqlite3*"]],["sqlite3_column_int64","i64",["sqlite3_stmt*","int"]],["sqlite3_create_module","int",["sqlite3*","string","sqlite3_module*","*"]],["sqlite3_create_module_v2","int",["sqlite3*","string","sqlite3_module*","*","*"]],["sqlite3_declare_vtab","int",["sqlite3*","string:flexible"]],["sqlite3_deserialize","int","sqlite3*","string","*","i64","i64","int"],["sqlite3_drop_modules","int",["sqlite3*","**"]],["sqlite3_last_insert_rowid","i64",["sqlite3*"]],["sqlite3_malloc64","*","i64"],["sqlite3_msize","i64","*"],["sqlite3_overload_function","int",["sqlite3*","string","int"]],["sqlite3_preupdate_blobwrite","int","sqlite3*"],["sqlite3_preupdate_count","int","sqlite3*"],["sqlite3_preupdate_depth","int","sqlite3*"],["sqlite3_preupdate_hook","*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_preupdate_hook",signature:"v(ppippjj)",contextKey:e=>e[0],callProxy:e=>(t,n,s,i,o,a,l)=>{e(t,n,s,r.cstrToJs(i),r.cstrToJs(o),a,l)}}),"*"]],["sqlite3_preupdate_new","int",["sqlite3*","int","**"]],["sqlite3_preupdate_old","int",["sqlite3*","int","**"]],["sqlite3_realloc64","*","*","i64"],["sqlite3_result_int64",void 0,"*","i64"],["sqlite3_result_zeroblob64","int","*","i64"],["sqlite3_serialize","*","sqlite3*","string","*","int"],["sqlite3_set_last_insert_rowid",void 0,["sqlite3*","i64"]],["sqlite3_status64","int","int","*","*","int"],["sqlite3_total_changes64","i64",["sqlite3*"]],["sqlite3_update_hook","*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_update_hook",signature:"v(iippj)",contextKey:e=>e[0],callProxy:e=>(t,n,s,i,o)=>{e(t,n,r.cstrToJs(s),r.cstrToJs(i),o)}}),"*"]],["sqlite3_uri_int64","i64",["sqlite3_filename","string","i64"]],["sqlite3_value_int64","i64","sqlite3_value*"],["sqlite3_vtab_collation","string","sqlite3_index_info*","int"],["sqlite3_vtab_distinct","int","sqlite3_index_info*"],["sqlite3_vtab_in","int","sqlite3_index_info*","int","int"],["sqlite3_vtab_in_first","int","sqlite3_value*","**"],["sqlite3_vtab_in_next","int","sqlite3_value*","**"],["sqlite3_vtab_nochange","int","sqlite3_context*"],["sqlite3_vtab_on_conflict","int","sqlite3*"],["sqlite3_vtab_rhs_value","int","sqlite3_index_info*","int","**"]],r.bigIntEnabled&&r.exports.sqlite3changegroup_add){const e={signature:"i(ps)",callProxy:e=>(t,s)=>{try{return 0|e(t,r.cstrToJs(s))}catch(e){return e.resultCode||n.SQLITE_ERROR}}};r.bindingSignatures.int64.push(["sqlite3changegroup_add","int",["sqlite3_changegroup*","int","void*"]],["sqlite3changegroup_add_strm","int",["sqlite3_changegroup*",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changegroup_delete",void 0,["sqlite3_changegroup*"]],["sqlite3changegroup_new","int",["**"]],["sqlite3changegroup_output","int",["sqlite3_changegroup*","int*","**"]],["sqlite3changegroup_output_strm","int",["sqlite3_changegroup*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply","int",["sqlite3*","int","void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_strm","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_v2","int",["sqlite3*","int","void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_apply_v2_strm","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_concat","int",["int","void*","int","void*","int*","**"]],["sqlite3changeset_concat_strm","int",[new r.xWrap.FuncPtrAdapter({name:"xInputA",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xInputB",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_conflict","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_finalize","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_fk_conflicts","int",["sqlite3_changeset_iter*","int*"]],["sqlite3changeset_invert","int",["int","void*","int*","**"]],["sqlite3changeset_invert_strm","int",[new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_new","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_next","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_old","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_op","int",["sqlite3_changeset_iter*","**","int*","int*","int*"]],["sqlite3changeset_pk","int",["sqlite3_changeset_iter*","**","int*"]],["sqlite3changeset_start","int",["**","int","*"]],["sqlite3changeset_start_strm","int",["**",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changeset_start_v2","int",["**","int","*","int"]],["sqlite3changeset_start_v2_strm","int",["**",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*","int"]],["sqlite3session_attach","int",["sqlite3_session*","string"]],["sqlite3session_changeset","int",["sqlite3_session*","int*","**"]],["sqlite3session_changeset_size","i64",["sqlite3_session*"]],["sqlite3session_changeset_strm","int",["sqlite3_session*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_config","int",["int","void*"]],["sqlite3session_create","int",["sqlite3*","string","**"]],["sqlite3session_diff","int",["sqlite3_session*","string","string","**"]],["sqlite3session_enable","int",["sqlite3_session*","int"]],["sqlite3session_indirect","int",["sqlite3_session*","int"]],["sqlite3session_isempty","int",["sqlite3_session*"]],["sqlite3session_memory_used","i64",["sqlite3_session*"]],["sqlite3session_object_config","int",["sqlite3_session*","int","void*"]],["sqlite3session_patchset","int",["sqlite3_session*","*","**"]],["sqlite3session_patchset_strm","int",["sqlite3_session*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_table_filter",void 0,["sqlite3_session*",new r.xWrap.FuncPtrAdapter({name:"xFilter",...e,contextKey:(e,t)=>e[0]}),"*"]])}r.bindingSignatures.wasm=[["sqlite3_wasm_db_reset","int","sqlite3*"],["sqlite3_wasm_db_vfs","sqlite3_vfs*","sqlite3*","string"],["sqlite3_wasm_vfs_create_file","int","sqlite3_vfs*","string","*","int"],["sqlite3_wasm_posix_create_file","int","string","*","int"],["sqlite3_wasm_vfs_unlink","int","sqlite3_vfs*","string"]],e.StructBinder=globalThis.Jaccwabyt({heap:r.heap8u,alloc:r.alloc,dealloc:r.dealloc,bigIntEnabled:r.bigIntEnabled,memberPrefix:"$"}),delete globalThis.Jaccwabyt;{const i=r.xWrap.argAdapter("string");r.xWrap.argAdapter("string:flexible",(e=>i(s.flexibleString(e)))),r.xWrap.argAdapter("string:static",function(e){return r.isPtr(e)?e:this[e=""+e]||(this[e]=r.allocCString(e))}.bind(Object.create(null)));const o=r.xWrap.argAdapter("*"),a=function(){};r.xWrap.argAdapter("sqlite3_filename",o)("sqlite3_context*",o)("sqlite3_value*",o)("void*",o)("sqlite3_changegroup*",o)("sqlite3_changeset_iter*",o)("sqlite3_session*",o)("sqlite3_stmt*",(t=>o(t instanceof(e?.oo1?.Stmt||a)?t.pointer:t)))("sqlite3*",(t=>o(t instanceof(e?.oo1?.DB||a)?t.pointer:t)))("sqlite3_index_info*",(e=>o(e instanceof(n.sqlite3_index_info||a)?e.pointer:e)))("sqlite3_module*",(e=>o(e instanceof(n.sqlite3_module||a)?e.pointer:e)))("sqlite3_vfs*",(t=>"string"==typeof t?n.sqlite3_vfs_find(t)||e.SQLite3Error.toss(n.SQLITE_NOTFOUND,"Unknown sqlite3_vfs name:",t):o(t instanceof(n.sqlite3_vfs||a)?t.pointer:t)));const l=r.xWrap.resultAdapter("*");r.xWrap.resultAdapter("sqlite3*",l)("sqlite3_context*",l)("sqlite3_stmt*",l)("sqlite3_value*",l)("sqlite3_vfs*",l)("void*",l),0===r.exports.sqlite3_step.length&&(r.xWrap.doArgcCheck=!1,e.config.warn("Disabling sqlite3.wasm.xWrap.doArgcCheck due to environmental quirks."));for(const e of r.bindingSignatures)n[e[0]]=r.xWrap.apply(null,e);for(const e of r.bindingSignatures.wasm)r[e[0]]=r.xWrap.apply(null,e);const c=function(e){return()=>t(e+"() is unavailable due to lack","of BigInt support in this build.")};for(const e of r.bindingSignatures.int64)n[e[0]]=r.bigIntEnabled?r.xWrap.apply(null,e):c(e[0]);if(delete r.bindingSignatures,r.exports.sqlite3_wasm_db_error){const t=r.xWrap("sqlite3_wasm_db_error","int","sqlite3*","int","string");s.sqlite3_wasm_db_error=function(r,s,i){return s instanceof e.WasmAllocError?(s=n.SQLITE_NOMEM,i=0):s instanceof Error&&(i=i||""+s,s=s.resultCode||n.SQLITE_ERROR),r?t(r,s,i):s}}else s.sqlite3_wasm_db_error=function(e,t,n){return console.warn("sqlite3_wasm_db_error() is not exported.",arguments),t}}{const i=r.xCall("sqlite3_wasm_enum_json");i||t("Maintenance required: increase sqlite3_wasm_enum_json()'s","static buffer size!"),r.ctype=JSON.parse(r.cstrToJs(i));const o=["access","authorizer","blobFinalizers","changeset","config","dataTypes","dbConfig","dbStatus","encodings","fcntl","flock","ioCap","limits","openFlags","prepareFlags","resultCodes","sqlite3Status","stmtStatus","syncFlags","trace","txnState","udfFlags","version"];r.bigIntEnabled&&o.push("serialize","session","vtab");for(const e of o)for(const t of Object.entries(r.ctype[e]))n[t[0]]=t[1];r.functionEntry(n.SQLITE_WASM_DEALLOC)||t("Internal error: cannot resolve exported function","entry SQLITE_WASM_DEALLOC (=="+n.SQLITE_WASM_DEALLOC+").");const a=Object.create(null);for(const e of["resultCodes"])for(const t of Object.entries(r.ctype[e]))a[t[1]]=t[0];n.sqlite3_js_rc_str=e=>a[e];const l=Object.assign(Object.create(null),{WasmTestStruct:!0,sqlite3_kvvfs_methods:!s.isUIThread(),sqlite3_index_info:!r.bigIntEnabled,sqlite3_index_constraint:!r.bigIntEnabled,sqlite3_index_orderby:!r.bigIntEnabled,sqlite3_index_constraint_usage:!r.bigIntEnabled});for(const t of r.ctype.structs)l[t.name]||(n[t.name]=e.StructBinder(t));if(n.sqlite3_index_info){for(const e of["sqlite3_index_constraint","sqlite3_index_orderby","sqlite3_index_constraint_usage"])n.sqlite3_index_info[e]=n[e],delete n[e];n.sqlite3_vtab_config=r.xWrap("sqlite3_wasm_vtab_config","int",["sqlite3*","int","int"])}}const i=(e,t,r)=>s.sqlite3_wasm_db_error(e,n.SQLITE_MISUSE,t+"() requires "+r+" argument"+(1===r?"":"s")+"."),o=e=>s.sqlite3_wasm_db_error(e,n.SQLITE_FORMAT,"SQLITE_UTF8 is the only supported encoding."),a=e=>r.xWrap.argAdapter("sqlite3*")(e),l=e=>r.isPtr(e)?r.cstrToJs(e):e,c=function(e,t){e=a(e);let n=this.dbMap.get(e);return t?(!n&&t>0&&this.dbMap.set(e,n=Object.create(null)),n):(this.dbMap.delete(e),n)}.bind(Object.assign(Object.create(null),{dbMap:new Map}));c.addCollation=function(e,t){const n=c(e,1);n.collation||(n.collation=new Set),n.collation.add(l(t).toLowerCase())},c._addUDF=function(e,t,n,r){t=l(t).toLowerCase();let s=r.get(t);s||r.set(t,s=new Set),s.add(n<0?-1:n)},c.addFunction=function(e,t,n){const r=c(e,1);r.udf||(r.udf=new Map),this._addUDF(e,t,n,r.udf)},c.addWindowFunc=function(e,t,n){const r=c(e,1);r.wudf||(r.wudf=new Map),this._addUDF(e,t,n,r.wudf)},c.cleanup=function(e){const t=[e=a(e)];for(const e of["sqlite3_busy_handler","sqlite3_commit_hook","sqlite3_preupdate_hook","sqlite3_progress_handler","sqlite3_rollback_hook","sqlite3_set_authorizer","sqlite3_trace_v2","sqlite3_update_hook"]){const s=r.exports[e];t.length=s.length;try{n[e](...t)}catch(n){console.warn("close-time call of",e+"(",t,") threw:",n)}}const s=c(e,0);if(!s)return;if(s.collation){for(const t of s.collation)try{n.sqlite3_create_collation_v2(e,t,n.SQLITE_UTF8,0,0,0)}catch(e){}delete s.collation}let i;for(i=0;i<2;++i){const t=i?s.wudf:s.udf;if(!t)continue;const r=i?n.sqlite3_create_window_function:n.sqlite3_create_function_v2;for(const s of t){const t=s[0],o=s[1],a=[e,t,0,n.SQLITE_UTF8,0,0,0,0,0];i&&a.push(0);for(const e of o)try{a[2]=e,r.apply(null,a)}catch(e){}o.clear()}t.clear()}delete s.udf,delete s.wudf};{const e=r.xWrap("sqlite3_close_v2","int","sqlite3*");n.sqlite3_close_v2=function(t){if(1!==arguments.length)return i(t,"sqlite3_close_v2",1);if(t)try{c.cleanup(t)}catch(e){}return e(t)}}if(n.sqlite3session_table_filter){const e=r.xWrap("sqlite3session_delete",void 0,["sqlite3_session*"]);n.sqlite3session_delete=function(t){if(1!==arguments.length)return i(pDb,"sqlite3session_delete",1);t&&n.sqlite3session_table_filter(t,0,0),e(t)}}{const e=(e,t)=>"argv["+t+"]:"+e[0]+":"+r.cstrToJs(e[1]).toLowerCase(),t=r.xWrap("sqlite3_create_collation_v2","int",["sqlite3*","string","int","*",new r.xWrap.FuncPtrAdapter({name:"xCompare",signature:"i(pipip)",contextKey:e}),new r.xWrap.FuncPtrAdapter({name:"xDestroy",signature:"v(p)",contextKey:e})]);n.sqlite3_create_collation_v2=function(e,r,a,l,_,u){if(6!==arguments.length)return i(e,"sqlite3_create_collation_v2",6);if(15&a){if(n.SQLITE_UTF8!==(15&a))return o(e)}else a|=n.SQLITE_UTF8;try{const n=t(e,r,a,l,_,u);return 0===n&&_ instanceof Function&&c.addCollation(e,r),n}catch(t){return s.sqlite3_wasm_db_error(e,t)}},n.sqlite3_create_collation=(e,t,r,s,o)=>5===arguments.length?n.sqlite3_create_collation_v2(e,t,r,s,o,0):i(e,"sqlite3_create_collation",5)}{const e=function(e,t){return e[0]+":"+(e[2]<0?-1:e[2])+":"+t+":"+r.cstrToJs(e[1]).toLowerCase()},t=Object.assign(Object.create(null),{xInverseAndStep:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,r,s)=>{try{e(t,...n.sqlite3_values_to_js(r,s))}catch(e){n.sqlite3_result_error_js(t,e)}}},xFinalAndValue:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{n.sqlite3_result_js(t,e(t))}catch(e){n.sqlite3_result_error_js(t,e)}}},xFunc:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,r,s)=>{try{n.sqlite3_result_js(t,e(t,...n.sqlite3_values_to_js(r,s)))}catch(e){n.sqlite3_result_error_js(t,e)}}},xDestroy:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{e(t)}catch(e){console.error("UDF xDestroy method threw:",e)}}}}),a=r.xWrap("sqlite3_create_function_v2","int",["sqlite3*","string","int","int","*",new r.xWrap.FuncPtrAdapter({name:"xFunc",...t.xFunc}),new r.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new r.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new r.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]),l=r.xWrap("sqlite3_create_window_function","int",["sqlite3*","string","int","int","*",new r.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new r.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new r.xWrap.FuncPtrAdapter({name:"xValue",...t.xFinalAndValue}),new r.xWrap.FuncPtrAdapter({name:"xInverse",...t.xInverseAndStep}),new r.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]);n.sqlite3_create_function_v2=function e(t,r,l,_,u,d,f,p,m){if(e.length!==arguments.length)return i(t,"sqlite3_create_function_v2",e.length);if(15&_){if(n.SQLITE_UTF8!==(15&_))return o(t)}else _|=n.SQLITE_UTF8;try{const e=a(t,r,l,_,u,d,f,p,m);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function)&&c.addFunction(t,r,l),e}catch(e){return console.error("sqlite3_create_function_v2() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},n.sqlite3_create_function=function e(t,r,s,o,a,l,c,_){return e.length===arguments.length?n.sqlite3_create_function_v2(t,r,s,o,a,l,c,_,0):i(t,"sqlite3_create_function",e.length)},n.sqlite3_create_window_function=function e(t,r,a,_,u,d,f,p,m,h){if(e.length!==arguments.length)return i(t,"sqlite3_create_window_function",e.length);if(15&_){if(n.SQLITE_UTF8!==(15&_))return o(t)}else _|=n.SQLITE_UTF8;try{const e=l(t,r,a,_,u,d,f,p,m,h);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function||h instanceof Function)&&c.addWindowFunc(t,r,a),e}catch(e){return console.error("sqlite3_create_window_function() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},n.sqlite3_create_function_v2.udfSetResult=n.sqlite3_create_function.udfSetResult=n.sqlite3_create_window_function.udfSetResult=n.sqlite3_result_js,n.sqlite3_create_function_v2.udfConvertArgs=n.sqlite3_create_function.udfConvertArgs=n.sqlite3_create_window_function.udfConvertArgs=n.sqlite3_values_to_js,n.sqlite3_create_function_v2.udfSetError=n.sqlite3_create_function.udfSetError=n.sqlite3_create_window_function.udfSetError=n.sqlite3_result_error_js}{const e=(e,t)=>("string"==typeof e?t=-1:s.isSQLableTypedArray(e)?(t=e.byteLength,e=s.typedArrayToString(e instanceof ArrayBuffer?new Uint8Array(e):e)):Array.isArray(e)&&(e=e.join(""),t=-1),[e,t]),t={basic:r.xWrap("sqlite3_prepare_v3","int",["sqlite3*","string","int","int","**","**"]),full:r.xWrap("sqlite3_prepare_v3","int",["sqlite3*","*","int","int","**","**"])};n.sqlite3_prepare_v3=function r(o,a,l,c,_,u){if(r.length!==arguments.length)return i(o,"sqlite3_prepare_v3",r.length);const[d,f]=e(a,l);switch(typeof d){case"string":return t.basic(o,d,f,c,_,null);case"number":return t.full(o,d,f,c,_,u);default:return s.sqlite3_wasm_db_error(o,n.SQLITE_MISUSE,"Invalid SQL argument type for sqlite3_prepare_v2/v3().")}},n.sqlite3_prepare_v2=function e(t,r,s,o,a){return e.length===arguments.length?n.sqlite3_prepare_v3(t,r,s,0,o,a):i(t,"sqlite3_prepare_v2",e.length)}}{const e=r.xWrap("sqlite3_bind_text","int",["sqlite3_stmt*","int","string","int","*"]),t=r.xWrap("sqlite3_bind_blob","int",["sqlite3_stmt*","int","*","int","*"]);n.sqlite3_bind_text=function t(o,a,l,c,_){if(t.length!==arguments.length)return i(n.sqlite3_db_handle(o),"sqlite3_bind_text",t.length);if(r.isPtr(l)||null===l)return e(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(pMem)&&(l=pMem.join(""));try{if(s.isSQLableTypedArray(l))u=r.allocFromTypedArray(l),d=l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),n.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_text().");[u,d]=r.allocCString(l)}return e(o,a,u,d,n.SQLITE_WASM_DEALLOC)}catch(e){return r.dealloc(u),s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),e)}},n.sqlite3_bind_blob=function e(o,a,l,c,_){if(e.length!==arguments.length)return i(n.sqlite3_db_handle(o),"sqlite3_bind_blob",e.length);if(r.isPtr(l)||null===l)return t(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(l)&&(l=l.join(""));try{if(s.isBindableTypedArray(l))u=r.allocFromTypedArray(l),d=c>=0?c:l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),n.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_blob().");[u,d]=r.allocCString(l)}return t(o,a,u,d,n.SQLITE_WASM_DEALLOC)}catch(e){return r.dealloc(u),s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),e)}}}n.sqlite3_config=function(e,...t){if(arguments.length<2)return n.SQLITE_MISUSE;switch(e){case n.SQLITE_CONFIG_COVERING_INDEX_SCAN:case n.SQLITE_CONFIG_MEMSTATUS:case n.SQLITE_CONFIG_SMALL_MALLOC:case n.SQLITE_CONFIG_SORTERREF_SIZE:case n.SQLITE_CONFIG_STMTJRNL_SPILL:case n.SQLITE_CONFIG_URI:return r.exports.sqlite3_wasm_config_i(e,t[0]);case n.SQLITE_CONFIG_LOOKASIDE:return r.exports.sqlite3_wasm_config_ii(e,t[0],t[1]);case n.SQLITE_CONFIG_MEMDB_MAXSIZE:return r.exports.sqlite3_wasm_config_j(e,t[0]);case n.SQLITE_CONFIG_GETMALLOC:case n.SQLITE_CONFIG_GETMUTEX:case n.SQLITE_CONFIG_GETPCACHE2:case n.SQLITE_CONFIG_GETPCACHE:case n.SQLITE_CONFIG_HEAP:case n.SQLITE_CONFIG_LOG:case n.SQLITE_CONFIG_MALLOC:case n.SQLITE_CONFIG_MMAP_SIZE:case n.SQLITE_CONFIG_MULTITHREAD:case n.SQLITE_CONFIG_MUTEX:case n.SQLITE_CONFIG_PAGECACHE:case n.SQLITE_CONFIG_PCACHE2:case n.SQLITE_CONFIG_PCACHE:case n.SQLITE_CONFIG_PCACHE_HDRSZ:case n.SQLITE_CONFIG_PMASZ:case n.SQLITE_CONFIG_SERIALIZED:case n.SQLITE_CONFIG_SINGLETHREAD:case n.SQLITE_CONFIG_SQLLOG:case n.SQLITE_CONFIG_WIN32_HEAPSIZE:default:return n.SQLITE_NOTFOUND}};{const e=new Set;n.sqlite3_auto_extension=function(t){if(t instanceof Function)t=r.installFunction("i(ppp)",t);else if(1!==arguments.length||!r.isPtr(t))return n.SQLITE_MISUSE;const s=r.exports.sqlite3_auto_extension(t);return t!==arguments[0]&&(0===s?e.add(t):r.uninstallFunction(t)),s},n.sqlite3_cancel_auto_extension=function(e){return e&&1===arguments.length&&r.isPtr(e)?r.exports.sqlite3_cancel_auto_extension(e):0},n.sqlite3_reset_auto_extension=function(){r.exports.sqlite3_reset_auto_extension();for(const t of e)r.uninstallFunction(t);e.clear()}}const _=n.sqlite3_vfs_find("kvvfs");if(_)if(s.isUIThread()){const e=new n.sqlite3_kvvfs_methods(r.exports.sqlite3_wasm_kvvfs_methods());delete n.sqlite3_kvvfs_methods;const t=r.exports.sqlite3_wasm_kvvfsMakeKeyOnPstack,s=r.pstack,i=e=>115===r.peek(e)?sessionStorage:localStorage,o={xRead:(e,n,o,a)=>{const l=s.pointer,c=r.scopedAllocPush();try{const s=t(e,n);if(!s)return-3;const l=r.cstrToJs(s),c=i(e).getItem(l);if(!c)return-1;const _=c.length;if(a<=0)return _;if(1===a)return r.poke(o,0),_;const u=r.scopedAllocCString(c);return a>_+1&&(a=_+1),r.heap8u().copyWithin(o,u,u+a-1),r.poke(o+a-1,0),a-1}catch(e){return console.error("kvstorageRead()",e),-2}finally{s.restore(l),r.scopedAllocPop(c)}},xWrite:(e,o,a)=>{const l=s.pointer;try{const n=t(e,o);if(!n)return 1;const s=r.cstrToJs(n);return i(e).setItem(s,r.cstrToJs(a)),0}catch(e){return console.error("kvstorageWrite()",e),n.SQLITE_IOERR}finally{s.restore(l)}},xDelete:(e,o)=>{const a=s.pointer;try{const n=t(e,o);return n?(i(e).removeItem(r.cstrToJs(n)),0):1}catch(e){return console.error("kvstorageDelete()",e),n.SQLITE_IOERR}finally{s.restore(a)}}};for(const t of Object.keys(o))e[e.memberKey(t)]=r.installFunction(e.memberSignature(t),o[t])}else n.sqlite3_vfs_unregister(_);r.xWrap.FuncPtrAdapter.warnOnUse=!0})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.version={libVersion:"3.44.2",libVersionNumber:3044002,sourceId:"2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f",downloadVersion:3440200}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...t)=>{throw new e.SQLite3Error(...t)},n=e.capi,r=e.wasm,s=e.util,i=new WeakMap,o=new WeakMap,a=(e,t,n)=>{const r=Object.getOwnPropertyDescriptor(e,t);return r?r.value:n},l=function(e,r){return r&&(e instanceof d&&(e=e.pointer),t(r,"sqlite3 result code",r+":",e?n.sqlite3_errmsg(e):n.sqlite3_errstr(r))),arguments[0]},c=r.installFunction("i(ippp)",function(e,t,s,i){n.SQLITE_TRACE_STMT===e&&console.log("SQL TRACE #"+ ++this.counter+" via sqlite3@"+t+":",r.cstrToJs(i))}.bind({counter:0})),_=Object.create(null),u=function s(...a){if(!s._name2vfs){s._name2vfs=Object.create(null);const e="function"==typeof importScripts&&(e=>t("The VFS for",e,"is only available in the main window thread."));s._name2vfs[":localStorage:"]={vfs:"kvvfs",filename:e||(()=>"local")},s._name2vfs[":sessionStorage:"]={vfs:"kvvfs",filename:e||(()=>"session")}}const u=s.normalizeArgs(...a);let d=u.filename,f=u.vfs,p=u.flags;("string"!=typeof d&&"number"!=typeof d||"string"!=typeof p||f&&"string"!=typeof f&&"number"!=typeof f)&&(e.config.error("Invalid DB ctor args",u,arguments),t("Invalid arguments for DB constructor."));let m="number"==typeof d?r.cstrToJs(d):d;const h=s._name2vfs[m];h&&(f=h.vfs,d=m=h.filename(m));let g,b=0;p.indexOf("c")>=0&&(b|=n.SQLITE_OPEN_CREATE|n.SQLITE_OPEN_READWRITE),p.indexOf("w")>=0&&(b|=n.SQLITE_OPEN_READWRITE),0===b&&(b|=n.SQLITE_OPEN_READONLY),b|=n.SQLITE_OPEN_EXRESCODE;const y=r.pstack.pointer;try{const e=r.pstack.allocPtr();let t=n.sqlite3_open_v2(d,e,b,f||0);g=r.peekPtr(e),l(g,t),n.sqlite3_extended_result_codes(g,1),p.indexOf("t")>=0&&n.sqlite3_trace_v2(g,n.SQLITE_TRACE_STMT,c,g)}catch(e){throw g&&n.sqlite3_close_v2(g),e}finally{r.pstack.restore(y)}this.filename=m,i.set(this,g),o.set(this,Object.create(null));try{const r=n.sqlite3_js_db_vfs(g);r||t("Internal error: cannot get VFS for new db handle.");const s=_[r];s instanceof Function?s(this,e):s&&l(g,n.sqlite3_exec(g,s,0,0,0))}catch(e){throw this.close(),e}};u.setVfsPostOpenSql=function(e,t){_[e]=t},u.normalizeArgs=function(e=":memory:",t="c",n=null){const r={};return 1===arguments.length&&arguments[0]&&"object"==typeof arguments[0]?(Object.assign(r,arguments[0]),void 0===r.flags&&(r.flags="c"),void 0===r.vfs&&(r.vfs=null),void 0===r.filename&&(r.filename=":memory:")):(r.filename=e,r.flags=t,r.vfs=n),r};const d=function(...e){u.apply(this,e)};d.dbCtorHelper=u;const f={null:1,number:2,string:3,boolean:4,blob:5};f[void 0],f.null,r.bigIntEnabled&&(f.bigint=f.number);const p=function(){f!==arguments[2]&&t(n.SQLITE_MISUSE,"Do not call the Stmt constructor directly. Use DB.prepare()."),this.db=arguments[0],i.set(this,arguments[1]),this.parameterCount=n.sqlite3_bind_parameter_count(this.pointer)},m=function(e){return e.pointer||t("DB has been closed."),e},h=function(e,n){return(n!==(0|n)||n<0||n>=e.columnCount)&&t("Column index",n,"is out of range."),e},g=(e,t,n,...r)=>{const s=e.prepare(t);try{const e=s.bind(n).step()?s.get(...r):void 0;return s.reset(),e}finally{s.finalize()}},b=(e,t,n,r)=>e.exec({sql:t,bind:n,rowMode:r,returnValue:"resultRows"});d.checkRc=(e,t)=>l(e,t),d.prototype={isOpen:function(){return!!this.pointer},affirmOpen:function(){return m(this)},close:function(){if(this.pointer){if(this.onclose&&this.onclose.before instanceof Function)try{this.onclose.before(this)}catch(e){}const e=this.pointer;if(Object.keys(o.get(this)).forEach(((e,t)=>{if(t&&t.pointer)try{t.finalize()}catch(e){}})),i.delete(this),o.delete(this),n.sqlite3_close_v2(e),this.onclose&&this.onclose.after instanceof Function)try{this.onclose.after(this)}catch(e){}delete this.filename}},changes:function(e=!1,t=!1){const r=m(this).pointer;return e?t?n.sqlite3_total_changes64(r):n.sqlite3_total_changes(r):t?n.sqlite3_changes64(r):n.sqlite3_changes(r)},dbFilename:function(e="main"){return n.sqlite3_db_filename(m(this).pointer,e)},dbName:function(e=0){return n.sqlite3_db_name(m(this).pointer,e)},dbVfsName:function(e=0){let t;const s=n.sqlite3_js_db_vfs(m(this).pointer,e);if(s){const e=new n.sqlite3_vfs(s);try{t=r.cstrToJs(e.$zName)}finally{e.dispose()}}return t},prepare:function(e){m(this);const s=r.pstack.pointer;let i,a;try{i=r.pstack.alloc(8),d.checkRc(this,n.sqlite3_prepare_v2(this.pointer,e,-1,i,null)),a=r.peekPtr(i)}finally{r.pstack.restore(s)}a||t("Cannot prepare empty SQL.");const l=new p(this,a,f);return o.get(this)[a]=l,l},exec:function(){m(this);const e=function(e,r){const i=Object.create(null);switch(i.opt=Object.create(null),r.length){case 1:"string"==typeof r[0]||s.isSQLableTypedArray(r[0])||Array.isArray(r[0])?i.sql=r[0]:r[0]&&"object"==typeof r[0]&&(i.opt=r[0],i.sql=i.opt.sql);break;case 2:i.sql=r[0],i.opt=r[1];break;default:t("Invalid argument count for exec().")}i.sql=s.flexibleString(i.sql),"string"!=typeof i.sql&&t("Missing SQL argument or unsupported SQL value type.");const o=i.opt;switch(o.returnValue){case"resultRows":o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows;break;case"saveSql":o.saveSql||(o.saveSql=[]),i.returnVal=()=>o.saveSql;break;case void 0:case"this":i.returnVal=()=>e;break;default:t("Invalid returnValue value:",o.returnValue)}if(o.callback||o.returnValue||void 0===o.rowMode||(o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows),o.callback||o.resultRows)switch(void 0===o.rowMode?"array":o.rowMode){case"object":i.cbArg=e=>e.get(Object.create(null));break;case"array":i.cbArg=e=>e.get([]);break;case"stmt":Array.isArray(o.resultRows)&&t("exec(): invalid rowMode for a resultRows array: must","be one of 'array', 'object',","a result column number, or column name reference."),i.cbArg=e=>e;break;default:if(s.isInt32(o.rowMode)){i.cbArg=e=>e.get(o.rowMode);break}if("string"==typeof o.rowMode&&o.rowMode.length>1&&"$"===o.rowMode[0]){const e=o.rowMode.substr(1);i.cbArg=r=>{const s=r.get(Object.create(null))[e];return void 0===s?t(n.SQLITE_NOTFOUND,"exec(): unknown result column:",e):s};break}t("Invalid rowMode:",o.rowMode)}return i}(this,arguments);if(!e.sql)return t("exec() requires an SQL string.");const i=e.opt,o=i.callback,a=Array.isArray(i.resultRows)?i.resultRows:void 0;let l,c=i.bind,_=!!(e.cbArg||i.columnNames||a);const u=r.scopedAllocPush(),h=Array.isArray(i.saveSql)?i.saveSql:void 0;try{const t=s.isSQLableTypedArray(e.sql);let u=t?e.sql.byteLength:r.jstrlen(e.sql);const m=r.scopedAlloc(2*r.ptrSizeof+(u+1)),g=m+r.ptrSizeof;let b=g+r.ptrSizeof;const y=b+u;for(t?r.heap8().set(e.sql,b):r.jstrcpy(e.sql,r.heap8(),b,u,!1),r.poke(b+u,0);b&&r.peek(b,"i8");){r.pokePtr([m,g],0),d.checkRc(this,n.sqlite3_prepare_v3(this.pointer,b,u,0,m,g));const t=r.peekPtr(m);if(b=r.peekPtr(g),u=y-b,t){if(h&&h.push(n.sqlite3_sql(t).trim()),l=new p(this,t,f),c&&l.parameterCount&&(l.bind(c),c=null),_&&l.columnCount){let t=Array.isArray(i.columnNames)?0:1;if(_=!1,e.cbArg||a){for(;l.step();l._lockedByExec=!1){0==t++&&l.getColumnNames(i.columnNames),l._lockedByExec=!0;const n=e.cbArg(l);if(a&&a.push(n),o&&!1===o.call(i,n,l))break}l._lockedByExec=!1}0===t&&l.getColumnNames(i.columnNames)}else l.step();l.reset().finalize(),l=null}}}finally{r.scopedAllocPop(u),l&&(delete l._lockedByExec,l.finalize())}return e.returnVal()},createFunction:function(e,r,i){const o=e=>e instanceof Function;switch(arguments.length){case 1:e=(i=e).name,r=i.xFunc||0;break;case 2:o(r)||(r=(i=r).xFunc||0)}i||(i={}),"string"!=typeof e&&t("Invalid arguments: missing function name.");let l=i.xStep||0,c=i.xFinal||0;const _=i.xValue||0,u=i.xInverse||0;let f;o(r)?(f=!1,(o(l)||o(c))&&t("Ambiguous arguments: scalar or aggregate?"),l=c=null):o(l)?(o(c)||t("Missing xFinal() callback for aggregate or window UDF."),r=null):o(c)?t("Missing xStep() callback for aggregate or window UDF."):t("Missing function-type properties."),!1===f?(o(_)||o(u))&&t("xValue and xInverse are not permitted for non-window UDFs."):o(_)?(o(u)||t("xInverse must be provided if xValue is."),f=!0):o(u)&&t("xValue must be provided if xInverse is.");const p=i.pApp;null==p||"number"==typeof p&&s.isInt32(p)||t("Invalid value for pApp property. Must be a legal WASM pointer value.");const m=i.xDestroy||0;m&&!o(m)&&t("xDestroy property must be a function.");let h=0;a(i,"deterministic")&&(h|=n.SQLITE_DETERMINISTIC),a(i,"directOnly")&&(h|=n.SQLITE_DIRECTONLY),a(i,"innocuous")&&(h|=n.SQLITE_INNOCUOUS),e=e.toLowerCase();const g=r||l,b=a(i,"arity"),y="number"==typeof b?b:g.length?g.length-1:0;let q;return q=f?n.sqlite3_create_window_function(this.pointer,e,y,n.SQLITE_UTF8|h,p||0,l,c,_,u,m):n.sqlite3_create_function_v2(this.pointer,e,y,n.SQLITE_UTF8|h,p||0,r,l,c,m),d.checkRc(this,q),this},selectValue:function(e,t,n){return g(this,e,t,0,n)},selectValues:function(e,t,n){const r=this.prepare(e),s=[];try{for(r.bind(t);r.step();)s.push(r.get(0,n));r.reset()}finally{r.finalize()}return s},selectArray:function(e,t){return g(this,e,t,[])},selectObject:function(e,t){return g(this,e,t,{})},selectArrays:function(e,t){return b(this,e,t,"array")},selectObjects:function(e,t){return b(this,e,t,"object")},openStatementCount:function(){return this.pointer?Object.keys(o.get(this)).length:0},transaction:function(e){let r="BEGIN";arguments.length>1&&(/[^a-zA-Z]/.test(arguments[0])&&t(n.SQLITE_MISUSE,"Invalid argument for BEGIN qualifier."),r+=" "+arguments[0],e=arguments[1]),m(this).exec(r);try{const t=e(this);return this.exec("COMMIT"),t}catch(e){throw this.exec("ROLLBACK"),e}},savepoint:function(e){m(this).exec("SAVEPOINT oo1");try{const t=e(this);return this.exec("RELEASE oo1"),t}catch(e){throw this.exec("ROLLBACK to SAVEPOINT oo1; RELEASE SAVEPOINT oo1"),e}},checkRc:function(e){return l(this,e)}};const y=function(e){return e.pointer||t("Stmt has been closed."),e},q=function(e){return function(e){let t=f[null==e?"null":typeof e];switch(t){case f.boolean:case f.null:case f.number:case f.string:return t;case f.bigint:if(r.bigIntEnabled)return t;default:return s.isBindableTypedArray(e)?f.blob:void 0}}(e)||t("Unsupported bind() argument type:",typeof e)},E=function(e,n){return e._lockedByExec&&t("Operation is illegal when statement is locked:",n),e},v=function i(o,a,l,c){E(y(o),"bind()"),i._||(i._tooBigInt=e=>t("BigInt value is too big to store without precision loss:",e),i._={string:function(e,t,s,i){const[o,a]=r.allocCString(s,!0);return(i?n.sqlite3_bind_blob:n.sqlite3_bind_text)(e.pointer,t,o,a,n.SQLITE_WASM_DEALLOC)}}),q(c),a=function(e,r){const i="number"==typeof r?r:n.sqlite3_bind_parameter_index(e.pointer,r);return 0!==i&&s.isInt32(i)?(i<1||i>e.parameterCount)&&t("Bind index",r,"is out of range."):t("Invalid bind() parameter name: "+r),i}(o,a);let _=0;switch(null==c?f.null:l){case f.null:_=n.sqlite3_bind_null(o.pointer,a);break;case f.string:_=i._.string(o,a,c,!1);break;case f.number:{let e;s.isInt32(c)?e=n.sqlite3_bind_int:"bigint"==typeof c?s.bigIntFits64(c)?r.bigIntEnabled?e=n.sqlite3_bind_int64:s.bigIntFitsDouble(c)?(c=Number(c),e=n.sqlite3_bind_double):i._tooBigInt(c):i._tooBigInt(c):(c=Number(c),e=r.bigIntEnabled&&Number.isInteger(c)?n.sqlite3_bind_int64:n.sqlite3_bind_double),_=e(o.pointer,a,c);break}case f.boolean:_=n.sqlite3_bind_int(o.pointer,a,c?1:0);break;case f.blob:{if("string"==typeof c){_=i._.string(o,a,c,!0);break}c instanceof ArrayBuffer?c=new Uint8Array(c):s.isBindableTypedArray(c)||t("Binding a value as a blob requires","that it be a string, Uint8Array, Int8Array, or ArrayBuffer.");const e=r.alloc(c.byteLength||1);r.heap8().set(c.byteLength?c:[0],e),_=n.sqlite3_bind_blob(o.pointer,a,e,c.byteLength,n.SQLITE_WASM_DEALLOC);break}default:e.config.warn("Unsupported bind() argument type:",c),t("Unsupported bind() argument type: "+typeof c)}return _&&d.checkRc(o.db.pointer,_),o._mayGet=!1,o};p.prototype={finalize:function(){if(this.pointer){E(this,"finalize()");const e=n.sqlite3_finalize(this.pointer);return delete o.get(this.db)[this.pointer],i.delete(this),delete this._mayGet,delete this.parameterCount,delete this._lockedByExec,delete this.db,e}},clearBindings:function(){return E(y(this),"clearBindings()"),n.sqlite3_clear_bindings(this.pointer),this._mayGet=!1,this},reset:function(e){E(this,"reset()"),e&&this.clearBindings();const t=n.sqlite3_reset(y(this).pointer);return this._mayGet=!1,l(this.db,t),this},bind:function(){let e,n;switch(y(this),arguments.length){case 1:e=1,n=arguments[0];break;case 2:e=arguments[0],n=arguments[1];break;default:t("Invalid bind() arguments.")}return void 0===n?this:(this.parameterCount||t("This statement has no bindable parameters."),this._mayGet=!1,null===n?v(this,e,f.null,n):Array.isArray(n)?(1!==arguments.length&&t("When binding an array, an index argument is not permitted."),n.forEach(((e,t)=>v(this,t+1,q(e),e))),this):(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),"object"!=typeof n||s.isBindableTypedArray(n)?v(this,e,q(n),n):(1!==arguments.length&&t("When binding an object, an index argument is not permitted."),Object.keys(n).forEach((e=>v(this,e,q(n[e]),n[e]))),this)))},bindAsBlob:function(e,n){y(this),1===arguments.length&&(n=e,e=1);const r=q(n);return f.string!==r&&f.blob!==r&&f.null!==r&&t("Invalid value type for bindAsBlob()"),v(this,e,f.blob,n)},step:function(){E(this,"step()");const t=n.sqlite3_step(y(this).pointer);switch(t){case n.SQLITE_DONE:return this._mayGet=!1;case n.SQLITE_ROW:return this._mayGet=!0;default:this._mayGet=!1,e.config.warn("sqlite3_step() rc=",t,n.sqlite3_js_rc_str(t),"SQL =",n.sqlite3_sql(this.pointer)),d.checkRc(this.db.pointer,t)}},stepReset:function(){return this.step(),this.reset()},stepFinalize:function(){try{const e=this.step();return this.reset(),e}finally{try{this.finalize()}catch(e){}}},get:function(e,i){if(y(this)._mayGet||t("Stmt.step() has not (recently) returned true."),Array.isArray(e)){let t=0;const n=this.columnCount;for(;t=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t).valueOf():t}{const r=n.sqlite3_column_double(this.pointer,e);return(r>Number.MAX_SAFE_INTEGER||rt("The pointer property is read-only.")};Object.defineProperty(p.prototype,"pointer",e),Object.defineProperty(d.prototype,"pointer",e)}if(Object.defineProperty(p.prototype,"columnCount",{enumerable:!1,get:function(){return n.sqlite3_column_count(this.pointer)},set:()=>t("The columnCount property is read-only.")}),e.oo1={DB:d,Stmt:p},s.isUIThread()){e.oo1.JsStorageDb=function(e="session"){"session"!==e&&"local"!==e&&t("JsStorageDb db name must be one of 'session' or 'local'."),u.call(this,{filename:e,flags:"c",vfs:"kvvfs"})};const r=e.oo1.JsStorageDb;r.prototype=Object.create(d.prototype),r.clearStorage=n.sqlite3_js_kvvfs_clear,r.prototype.clearStorage=function(){return r.clearStorage(m(this).filename)},r.storageSize=n.sqlite3_js_kvvfs_size,r.prototype.storageSize=function(){return r.storageSize(m(this).filename)}}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.initWorker1API=function(){const e=(...e)=>{throw new Error(e.join(" "))};globalThis.WorkerGlobalScope instanceof Function||e("initWorker1API() must be run from a Worker thread.");const t=this.sqlite3||e("Missing this.sqlite3 object."),n=t.oo1.DB,r=function(e){let t=s.idMap.get(e);return t||(t="db#"+ ++s.idSeq+"@"+e.pointer,s.idMap.set(e,t),t)},s={dbList:[],idSeq:0,idMap:new WeakMap,xfer:[],open:function(e){const t=new n(e);return this.dbs[r(t)]=t,this.dbList.indexOf(t)<0&&this.dbList.push(t),t},close:function(e,n){if(e){delete this.dbs[r(e)];const s=e.filename,i=t.wasm.sqlite3_wasm_db_vfs(e.pointer,0);e.close();const o=this.dbList.indexOf(e);o>=0&&this.dbList.splice(o,1),n&&s&&i&&t.wasm.sqlite3_wasm_vfs_unlink(i,s)}},post:function(e,t){t&&t.length?(globalThis.postMessage(e,Array.from(t)),t.length=0):globalThis.postMessage(e)},dbs:Object.create(null),getDb:function(t,n=!0){return this.dbs[t]||(n?e("Unknown (or closed) DB ID:",t):void 0)}},i=function(t,n=!0){const r=s.getDb(t.dbId,!1)||s.dbList[0];return n?function(t=s.dbList[0]){return t&&t.pointer?t:e("DB is not opened.")}(r):r},o={open:function(n){const i=Object.create(null),o=n.args||Object.create(null);o.simulateError&&e("Throwing because of simulateError flag.");const a=Object.create(null);let l,c;var _;if(i.vfs=o.vfs,""===(_=o.filename)||":"===_[0]?i.filename=o.filename||"":(i.filename=o.filename,l=o.byteArray,l&&(c=function(e){const n=/^file:.+(vfs=(\w+))/.exec(e);return t.capi.sqlite3_vfs_find(n?n[2]:0)}(o.filename))),c){let e;try{e=t.wasm.allocFromTypedArray(l);const n=t.wasm.sqlite3_wasm_vfs_create_file(c,i.filename,e,l.byteLength);n&&t.SQLite3Error.toss(n)}catch(e){throw new t.SQLite3Error(e.name+" creating "+o.filename+": "+e.message,{cause:e})}finally{e&&t.wasm.dealloc(e)}}const u=s.open(i);return a.filename=u.filename,a.persistent=!!t.capi.sqlite3_js_db_uses_vfs(u.pointer,"opfs"),a.dbId=r(u),a.vfs=u.dbVfsName(),a},close:function(e){const t=i(e,!1),n={filename:t&&t.filename};if(t){const n=!(!e.args||"object"!=typeof e.args||!e.args.unlink);s.close(t,n)}return n},exec:function(t){const n="string"==typeof t.args?{sql:t.args}:t.args||Object.create(null);"stmt"===n.rowMode?e("Invalid rowMode for 'exec': stmt mode","does not work in the Worker API."):n.sql||e("'exec' requires input SQL.");const r=i(t);(n.callback||Array.isArray(n.resultRows))&&(r._blobXfer=s.xfer);const o=n.callback;let a=0;const l=!!n.columnNames;"string"==typeof o&&(l||(n.columnNames=[]),n.callback=function(e,t){s.post({type:o,columnNames:n.columnNames,rowNumber:++a,row:e},s.xfer)});try{const e=n.countChanges?r.changes(!0,64===n.countChanges):void 0;r.exec(n),void 0!==e&&(n.changeCount=r.changes(!0,64===n.countChanges)-e),n.callback instanceof Function&&(n.callback=o,s.post({type:o,columnNames:n.columnNames,rowNumber:null,row:void 0}))}finally{delete r._blobXfer,n.callback&&(n.callback=o)}return n},"config-get":function(){const e=Object.create(null),n=t.config;return["bigIntEnabled"].forEach((function(t){Object.getOwnPropertyDescriptor(n,t)&&(e[t]=n[t])})),e.version=t.version,e.vfsList=t.capi.sqlite3_js_vfs_list(),e.opfsEnabled=!!t.opfs,e},export:function(e){const n=i(e),r={byteArray:t.capi.sqlite3_js_db_export(n.pointer),filename:n.filename,mimetype:"application/x-sqlite3"};return s.xfer.push(r.byteArray.buffer),r},toss:function(t){e("Testing worker exception")},"opfs-tree":async function(n){return t.opfs||e("OPFS support is unavailable."),await t.opfs.treeList()}};globalThis.onmessage=async function(t){let n,i=(t=t.data).dbId,a=t.type;const l=performance.now();try{o.hasOwnProperty(a)&&o[a]instanceof Function?n=await o[a](t):e("Unknown db worker message type:",t.type)}catch(e){a="error",n={operation:t.type,message:e.message,errorClass:e.name,input:t},e.stack&&(n.stack="string"==typeof e.stack?e.stack.split(/\n\s*/):e.stack)}i||(i=n.dbId||s.dbList[0]&&r(s.dbList[0])),s.post({type:a,dbId:i,messageId:t.messageId,workerReceivedTime:l,workerRespondTime:performance.now(),departureTime:t.departureTime,result:n},s.xfer)},globalThis.postMessage({type:"sqlite3-api",result:"worker1-ready"})}.bind({sqlite3:e})})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.wasm,n=e.capi,r=e.util.toss3,s=Object.create(null),i=Object.create(null),o=e.StructBinder;e.vfs=s,e.vtab=i;const a=n.sqlite3_index_info;a.prototype.nthConstraint=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const n=this.$aConstraint+a.sqlite3_index_constraint.structInfo.sizeof*e;return t?n:new a.sqlite3_index_constraint(n)},a.prototype.nthConstraintUsage=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const n=this.$aConstraintUsage+a.sqlite3_index_constraint_usage.structInfo.sizeof*e;return t?n:new a.sqlite3_index_constraint_usage(n)},a.prototype.nthOrderBy=function(e,t=!1){if(e<0||e>=this.$nOrderBy)return!1;const n=this.$aOrderBy+a.sqlite3_index_orderby.structInfo.sizeof*e;return t?n:new a.sqlite3_index_orderby(n)};const l=function e(n,s,i,a=e.installMethodArgcCheck){if(n instanceof o.StructType?i instanceof Function||t.isPtr(i)||r("Usage errror: expecting a Function or WASM pointer to one."):r("Usage error: target object is-not-a StructType."),1===arguments.length)return(t,r)=>e(n,t,r,a);e.argcProxy||(e.argcProxy=function(e,t,n,s){return function(...i){return n.length!==arguments.length&&r("Argument mismatch for",e.structInfo.name+"::"+t+": Native signature is:",s),n.apply(this,i)}},e.removeFuncList=function(){this.ondispose.__removeFuncList&&(this.ondispose.__removeFuncList.forEach(((e,n)=>{if("number"==typeof e)try{t.uninstallFunction(e)}catch(e){}})),delete this.ondispose.__removeFuncList)});const l=n.memberSignature(s);l.length<2&&r("Member",s,"does not have a function pointer signature:",l);const c=n.memberKey(s),_=a&&!t.isPtr(i)?e.argcProxy(n,c,i,l):i;if(t.isPtr(_))_&&!t.functionEntry(_)&&r("Pointer",_,"is not a WASM function table entry."),n[c]=_;else{const r=t.installFunction(_,n.memberSignature(s,!0));n[c]=r,n.ondispose&&n.ondispose.__removeFuncList||(n.addOnDispose("ondispose.__removeFuncList handler",e.removeFuncList),n.ondispose.__removeFuncList=[]),n.ondispose.__removeFuncList.push(c,r)}return(t,r)=>e(n,t,r,a)};l.installMethodArgcCheck=!1;const c=function(e,t,n=l.installMethodArgcCheck){const r=new Map;for(const s of Object.keys(t)){const i=t[s],o=r.get(i);if(o){const t=e.memberKey(s);e[t]=e[e.memberKey(o)]}else l(e,s,i,n),r.set(i,s)}return e};o.StructType.prototype.installMethod=function(e,t,n=l.installMethodArgcCheck){return arguments.length<3&&e&&"object"==typeof e?c(this,...arguments):l(this,...arguments)},o.StructType.prototype.installMethods=function(e,t=l.installMethodArgcCheck){return c(this,e,t)},n.sqlite3_vfs.prototype.registerVfs=function(t=!1){this instanceof e.capi.sqlite3_vfs||r("Expecting a sqlite3_vfs-type argument.");const s=n.sqlite3_vfs_register(this,t?1:0);return s&&r("sqlite3_vfs_register(",this,") failed with rc",s),this.pointer!==n.sqlite3_vfs_find(this.$zName)&&r("BUG: sqlite3_vfs_find(vfs.$zName) failed for just-installed VFS",this),this},s.installVfs=function(e){let n=0;const s=["io","vfs"];for(const r of s){const s=e[r];s&&(++n,c(s.struct,s.methods,!!s.applyArgcCheck),"vfs"===r&&(s.struct.$zName||"string"!=typeof s.name||s.struct.addOnDispose(s.struct.$zName=t.allocCString(s.name)),s.struct.registerVfs(!!s.asDefault)))}return n||r("Misuse: installVfs() options object requires at least","one of:",s),this};const _=function(n,r){const s=function(n,r){return function(s,i=!1){if(0===arguments.length&&(s=new r),s instanceof r)return this.set(s.pointer,s),s;t.isPtr(s)||e.SQLite3Error.toss("Invalid argument to",n+"()");let o=this.get(s);return i&&this.delete(s),o}.bind(new Map)}(n,r);return Object.assign(Object.create(null),{StructType:r,create:e=>{const n=s();return t.pokePtr(e,n.pointer),n},get:e=>s(e),unget:e=>s(e,!0),dispose:e=>{const t=s(e,!0);t&&t.dispose()}})};i.xVtab=_("xVtab",n.sqlite3_vtab),i.xCursor=_("xCursor",n.sqlite3_vtab_cursor),i.xIndexInfo=e=>new n.sqlite3_index_info(e),i.xError=function t(r,s,i){if(t.errorReporter instanceof Function)try{t.errorReporter("sqlite3_module::"+r+"(): "+s.message)}catch(e){}let o;return s instanceof e.WasmAllocError?o=n.SQLITE_NOMEM:arguments.length>2?o=i:s instanceof e.SQLite3Error&&(o=s.resultCode),o||n.SQLITE_ERROR},i.xError.errorReporter=console.error.bind(console),i.xRowid=(e,n)=>t.poke(e,n,"i64"),i.setupModule=function(s){let o=!1;const a=this instanceof n.sqlite3_module?this:s.struct||(o=new n.sqlite3_module);try{const n=s.methods||r("Missing 'methods' object.");for(const e of Object.entries({xConnect:"xCreate",xDisconnect:"xDestroy"})){const t=e[0],r=e[1];!0===n[t]?n[t]=n[r]:!0===n[r]&&(n[r]=n[t])}if(s.catchExceptions){const r=function(n,r){return["xConnect","xCreate"].indexOf(n)>=0?function(s,o,a,l,c,_){try{return r(...arguments)||0}catch(r){return r instanceof e.WasmAllocError||(t.dealloc(t.peekPtr(_)),t.pokePtr(_,t.allocCString(r.message))),i.xError(n,r)}}:function(...e){try{return r(...e)||0}catch(e){return i.xError(n,e)}}},s=["xCreate","xConnect","xBestIndex","xDisconnect","xDestroy","xOpen","xClose","xFilter","xNext","xEof","xColumn","xRowid","xUpdate","xBegin","xSync","xCommit","xRollback","xFindFunction","xRename","xSavepoint","xRelease","xRollbackTo","xShadowName"],o=Object.create(null);for(const e of s){const t=n[e];t instanceof Function&&("xConnect"===e&&n.xCreate===t?o[e]=n.xCreate:"xCreate"===e&&n.xConnect===t?o[e]=n.xConnect:o[e]=r(e,t))}c(a,o,!1)}else c(a,n,!!s.applyArgcCheck);if(0===a.$iVersion){let e;e="number"==typeof s.iVersion?s.iVersion:a.$xShadowName?3:a.$xSavePoint||a.$xRelease||a.$xRollbackTo?2:1,a.$iVersion=e}}catch(e){throw o&&o.dispose(),e}return a},n.sqlite3_module.prototype.setupModule=function(e){return i.setupModule.call(this,e)}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=function t(r){if(!globalThis.SharedArrayBuffer||!globalThis.Atomics)return Promise.reject(new Error("Cannot install OPFS: Missing SharedArrayBuffer and/or Atomics. The server must emit the COOP/COEP response headers to enable those. See https://sqlite.org/wasm/doc/trunk/persistence.md#coop-coep"));if("undefined"==typeof WorkerGlobalScope)return Promise.reject(new Error("The OPFS sqlite3_vfs cannot run in the main thread because it requires Atomics.wait()."));if(!(globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle&&globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle&&navigator?.storage?.getDirectory))return Promise.reject(new Error("Missing required OPFS APIs."));r&&"object"==typeof r||(r=Object.create(null));const s=new URL(globalThis.location.href).searchParams;if(s.has("opfs-disable"))return Promise.resolve(e);void 0===r.verbose&&(r.verbose=s.has("opfs-verbose")?+s.get("opfs-verbose")||2:1),void 0===r.sanityChecks&&(r.sanityChecks=s.has("opfs-sanity-check")),void 0===r.proxyUri&&(r.proxyUri=t.defaultProxyUri),"function"==typeof r.proxyUri&&(r.proxyUri=r.proxyUri());const i=new Promise((function(t,s){const i=[e.config.error,e.config.warn,e.config.log],o=(e,...t)=>{r.verbose>e&&i[e]("OPFS syncer:",...t)},a=(...e)=>o(2,...e),l=(...e)=>o(1,...e),c=(...e)=>o(0,...e),_=e.util.toss,u=e.capi,d=e.util,f=e.wasm,p=u.sqlite3_vfs,m=u.sqlite3_file,h=u.sqlite3_io_methods,g=Object.create(null);g.metrics={dump:function(){let t,n=0,r=0,s=0;for(t in x.opIds){const e=T[t];n+=e.count,r+=e.time,s+=e.wait,e.avgTime=e.count&&e.time?e.time/e.count:0,e.avgWait=e.count&&e.wait?e.wait/e.count:0}e.config.log(globalThis.location.href,"metrics for",globalThis.location.href,":",T,"\nTotal of",n,"op(s) for",r,"ms (incl. "+s+" ms of waiting on the async side)"),e.config.log("Serialization metrics:",T.s11n),w.postMessage({type:"opfs-async-metrics"})},reset:function(){let e;for(e in x.opIds)(t=T[e]=Object.create(null)).count=t.time=t.wait=0;var t;let n=T.s11n=Object.create(null);n=n.serialize=Object.create(null),n.count=n.time=0,n=T.s11n.deserialize=Object.create(null),n.count=n.time=0}};const b=new h,y=(new p).addOnDispose((()=>b.dispose()));let q;const E=e=>(q=!0,y.dispose(),s(e)),v=()=>(q=!1,t(e)),w=new Worker(new URL(n.p+n.u(892),n.b));setTimeout((()=>{void 0===q&&E(new Error("Timeout while waiting for OPFS async proxy worker."))}),4e3),w._originalOnError=w.onerror,w.onerror=function(e){c("Error initializing OPFS asyncer:",e),E(new Error("Loading OPFS async Worker failed for unknown reasons."))};const S=u.sqlite3_vfs_find(null),A=S?new p(S):null;b.$iVersion=1,y.$iVersion=2,y.$szOsFile=u.sqlite3_file.structInfo.sizeof,y.$mxPathname=1024,y.$zName=f.allocCString("opfs"),y.$xDlOpen=y.$xDlError=y.$xDlSym=y.$xDlClose=null,y.addOnDispose("$zName",y.$zName,"cleanup default VFS wrapper",(()=>A?A.dispose():null));const x=Object.create(null);x.verbose=r.verbose,x.littleEndian=(()=>{const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]})(),x.asyncIdleWaitTime=150,x.asyncS11nExceptions=1,x.fileBufferSize=65536,x.sabS11nOffset=x.fileBufferSize,x.sabS11nSize=2*y.$mxPathname,x.sabIO=new SharedArrayBuffer(x.fileBufferSize+x.sabS11nSize),x.opIds=Object.create(null);const T=Object.create(null);{let e=0;x.opIds.whichOp=e++,x.opIds.rc=e++,x.opIds.xAccess=e++,x.opIds.xClose=e++,x.opIds.xDelete=e++,x.opIds.xDeleteNoWait=e++,x.opIds.xFileSize=e++,x.opIds.xLock=e++,x.opIds.xOpen=e++,x.opIds.xRead=e++,x.opIds.xSleep=e++,x.opIds.xSync=e++,x.opIds.xTruncate=e++,x.opIds.xUnlock=e++,x.opIds.xWrite=e++,x.opIds.mkdir=e++,x.opIds["opfs-async-metrics"]=e++,x.opIds["opfs-async-shutdown"]=e++,x.opIds.retry=e++,x.sabOP=new SharedArrayBuffer(4*e),g.metrics.reset()}x.sq3Codes=Object.create(null),["SQLITE_ACCESS_EXISTS","SQLITE_ACCESS_READWRITE","SQLITE_BUSY","SQLITE_ERROR","SQLITE_IOERR","SQLITE_IOERR_ACCESS","SQLITE_IOERR_CLOSE","SQLITE_IOERR_DELETE","SQLITE_IOERR_FSYNC","SQLITE_IOERR_LOCK","SQLITE_IOERR_READ","SQLITE_IOERR_SHORT_READ","SQLITE_IOERR_TRUNCATE","SQLITE_IOERR_UNLOCK","SQLITE_IOERR_WRITE","SQLITE_LOCK_EXCLUSIVE","SQLITE_LOCK_NONE","SQLITE_LOCK_PENDING","SQLITE_LOCK_RESERVED","SQLITE_LOCK_SHARED","SQLITE_LOCKED","SQLITE_MISUSE","SQLITE_NOTFOUND","SQLITE_OPEN_CREATE","SQLITE_OPEN_DELETEONCLOSE","SQLITE_OPEN_MAIN_DB","SQLITE_OPEN_READONLY"].forEach((e=>{void 0===(x.sq3Codes[e]=u[e])&&_("Maintenance required: not found:",e)})),x.opfsFlags=Object.assign(Object.create(null),{OPFS_UNLOCK_ASAP:1,defaultUnlockAsap:!1});const I=(e,...t)=>{const n=x.opIds[e]||_("Invalid op ID:",e);x.s11n.serialize(...t),Atomics.store(x.sabOPView,x.opIds.rc,-1),Atomics.store(x.sabOPView,x.opIds.whichOp,n),Atomics.notify(x.sabOPView,x.opIds.whichOp);const r=performance.now();Atomics.wait(x.sabOPView,x.opIds.rc,-1);const s=Atomics.load(x.sabOPView,x.opIds.rc);if(T[e].wait+=performance.now()-r,s&&x.asyncS11nExceptions){const t=x.s11n.deserialize();t&&c(e+"() async error:",...t)}return s};g.debug={asyncShutdown:()=>{l("Shutting down OPFS async listener. The OPFS VFS will no longer work."),I("opfs-async-shutdown")},asyncRestart:()=>{l("Attempting to restart OPFS VFS async listener. Might work, might not."),w.postMessage({type:"opfs-async-restart"})}};const k=function e(t=16){e._chars||(e._n=(e._chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012346789").length);const n=[];let r=0;for(;r{O.start=performance.now(),O.op=e,++T[e].count},L=()=>T[O.op].time+=performance.now()-O.start,C={xCheckReservedLock:function(e,t){const n=F[e];return f.poke(t,n.lockType?1:0,"i32"),0},xClose:function(e){P("xClose");let t=0;const n=F[e];return n&&(delete F[e],t=I("xClose",e),n.sq3File&&n.sq3File.dispose()),L(),t},xDeviceCharacteristics:function(e){return u.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,n){return u.SQLITE_NOTFOUND},xFileSize:function(e,t){P("xFileSize");let n=I("xFileSize",e);if(0==n)try{const e=x.s11n.deserialize()[0];f.poke(t,e,"i64")}catch(e){c("Unexpected error reading xFileSize() result:",e),n=x.sq3Codes.SQLITE_IOERR}return L(),n},xLock:function(e,t){P("xLock");const n=F[e];let r=0;return n.lockType?n.lockType=t:(r=I("xLock",e,t),0===r&&(n.lockType=t)),L(),r},xRead:function(e,t,n,r){P("xRead");const s=F[e];let i;try{i=I("xRead",e,n,Number(r)),0!==i&&u.SQLITE_IOERR_SHORT_READ!==i||f.heap8u().set(s.sabView.subarray(0,n),t)}catch(e){c("xRead(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_READ}return L(),i},xSync:function(e,t){P("xSync"),++T.xSync.count;const n=I("xSync",e,t);return L(),n},xTruncate:function(e,t){P("xTruncate");const n=I("xTruncate",e,Number(t));return L(),n},xUnlock:function(e,t){P("xUnlock");const n=F[e];let r=0;return u.SQLITE_LOCK_NONE===t&&n.lockType&&(r=I("xUnlock",e,t)),0===r&&(n.lockType=t),L(),r},xWrite:function(e,t,n,r){P("xWrite");const s=F[e];let i;try{s.sabView.set(f.heap8u().subarray(t,t+n)),i=I("xWrite",e,n,Number(r))}catch(e){c("xWrite(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_WRITE}return L(),i}},N={xAccess:function(e,t,n,r){P("xAccess");const s=I("xAccess",f.cstrToJs(t));return f.poke(r,s?0:1,"i32"),L(),0},xCurrentTime:function(e,t){return f.poke(t,2440587.5+(new Date).getTime()/864e5,"double"),0},xCurrentTimeInt64:function(e,t){return f.poke(t,21086676e7+(new Date).getTime(),"i64"),0},xDelete:function(e,t,n){P("xDelete");const r=I("xDelete",f.cstrToJs(t),n,!1);return L(),r},xFullPathname:function(e,t,n,r){return f.cstrncpy(r,t,n)!!e)):n},g.getDirForFilename=async function(e,t=!1){const n=g.getResolvedPath(e,!0),r=n.pop();let s=g.rootDirectory;for(const e of n)e&&(s=await s.getDirectoryHandle(e,{create:!!t}));return[s,r]},g.mkdir=async function(e){try{return await g.getDirForFilename(e+"/filepart",!0),!0}catch(e){return!1}},g.entryExists=async function(e){try{const[t,n]=await g.getDirForFilename(e);return await t.getFileHandle(n),!0}catch(e){return!1}},g.randomFilename=k,g.registerVfs=(e=!1)=>f.exports.sqlite3_vfs_register(y.pointer,e?1:0),g.treeList=async function(){const e=Object.create(null);return await async function e(t,n){n.name=t.name,n.dirs=[],n.files=[];for await(const r of t.values())if("directory"===r.kind){const t=Object.create(null);n.dirs.push(t),await e(r,t)}else n.files.push(r.name)}(g.rootDirectory,e),e},g.rmfr=async function(){const e=g.rootDirectory,t={recurse:!0};for await(const n of e.values())e.removeEntry(n.name,t)},g.unlink=async function(e,t=!1,n=!1){try{const[n,r]=await g.getDirForFilename(e,!1);return await n.removeEntry(r,{recursive:t}),!0}catch(e){if(n)throw new Error("unlink(",arguments[0],") failed: "+e.message,{cause:e});return!1}},g.traverse=async function(e){const t={recursive:!0,directory:g.rootDirectory};"function"==typeof e&&(e={callback:e}),async function t(n,r){for await(const s of n.values()){if(!1===e.callback(s,n,r))return!1;if(e.recursive&&"directory"===s.kind&&!1===await t(s,r+1))break}}((e=Object.assign(t,e||{})).directory,0)},g.importDb=async function(e,t){if(t instanceof Function)return async function(e,t){const[n,r]=await g.getDirForFilename(e,!0),s=await n.getFileHandle(r,{create:!0});let i,o=await s.createSyncAccessHandle(),a=0,l=!1;try{for(o.truncate(0);void 0!==(i=await t());)i instanceof ArrayBuffer&&(i=new Uint8Array(i)),0===a&&i.byteLength>=15&&(d.affirmDbHeader(i),l=!0),o.write(i,{at:a}),a+=i.byteLength;if((a<512||0!=a%512)&&_("Input size",a,"is not correct for an SQLite database."),!l){const e=new Uint8Array(20);o.read(e,{at:0}),d.affirmDbHeader(e)}return o.write(new Uint8Array([1,1]),{at:18}),a}catch(e){throw await o.close(),o=void 0,await n.removeEntry(r).catch((()=>{})),e}finally{o&&await o.close()}}(e,t);t instanceof ArrayBuffer&&(t=new Uint8Array(t)),d.affirmIsDb(t);const n=t.byteLength,[r,s]=await g.getDirForFilename(e,!0);let i,o=0;try{const e=await r.getFileHandle(s,{create:!0});return i=await e.createSyncAccessHandle(),i.truncate(0),o=i.write(t,{at:0}),o!=n&&_("Expected to write "+n+" bytes but wrote "+o+"."),i.write(new Uint8Array([1,1]),{at:18}),o}catch(e){throw i&&(await i.close(),i=void 0),await r.removeEntry(s).catch((()=>{})),e}finally{i&&await i.close()}},e.oo1){const t=function(...t){const n=e.oo1.DB.dbCtorHelper.normalizeArgs(...t);n.vfs=y.$zName,e.oo1.DB.dbCtorHelper.call(this,n)};t.prototype=Object.create(e.oo1.DB.prototype),e.oo1.OpfsDb=t,t.importDb=g.importDb,e.oo1.DB.dbCtorHelper.setVfsPostOpenSql(y.pointer,(function(e,t){t.capi.sqlite3_busy_timeout(e,1e4),t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}w.onmessage=function({data:t}){switch(t.type){case"opfs-unavailable":E(new Error(t.payload.join(" ")));break;case"opfs-async-loaded":w.postMessage({type:"opfs-async-init",args:x});break;case"opfs-async-inited":if(!0===q)break;try{e.vfs.installVfs({io:{struct:b,methods:C},vfs:{struct:y,methods:N}}),x.sabOPView=new Int32Array(x.sabOP),x.sabFileBufView=new Uint8Array(x.sabIO,0,x.fileBufferSize),x.sabS11nView=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),(()=>{if(x.s11n)return x.s11n;const e=new TextDecoder,t=new TextEncoder("utf-8"),n=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),r=new DataView(x.sabIO,x.sabS11nOffset,x.sabS11nSize);x.s11n=Object.create(null);const s=Object.create(null);s.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},s.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},s.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},s.string={id:4};const i=e=>s[typeof e]||_("Maintenance required: this value type cannot be serialized.",e),o=e=>{switch(e){case s.number.id:return s.number;case s.bigint.id:return s.bigint;case s.boolean.id:return s.boolean;case s.string.id:return s.string;default:_("Invalid type ID:",e)}};x.s11n.deserialize=function(t=!1){++T.s11n.deserialize.count;const s=performance.now(),i=n[0],a=i?[]:null;if(i){const t=[];let s,l,c,_=1;for(s=0;s{w.onerror=w._originalOnError,delete w._originalOnError,e.opfs=g,g.rootDirectory=t,a("End of OPFS sqlite3_vfs setup.",y),v()})).catch(E):v()}catch(e){c(e),E(e)}break;default:{const e="Unexpected message from the OPFS async worker: "+JSON.stringify(t);c(e),E(new Error(e));break}}}}));return i};t.defaultProxyUri="sqlite3-opfs-async-proxy.js",globalThis.sqlite3ApiBootstrap.initializersAsync.push((async e=>{try{let n=t.defaultProxyUri;return e.scriptInfo.sqlite3Dir&&(t.defaultProxyUri=e.scriptInfo.sqlite3Dir+n),t().catch((t=>{e.config.warn("Ignoring inability to install OPFS sqlite3_vfs:",t.message)}))}catch(t){return e.config.error("installOpfsVfs() exception:",t),Promise.reject(t)}}))})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.util.toss,n=e.util.toss3,r=Object.create(null),s=e.capi,i=e.util,o=e.wasm,a=4096,l=s.SQLITE_OPEN_MAIN_DB|s.SQLITE_OPEN_MAIN_JOURNAL|s.SQLITE_OPEN_SUPER_JOURNAL|s.SQLITE_OPEN_WAL,c=".opaque",_=()=>Math.random().toString(36).slice(2),u=new TextDecoder,d=new TextEncoder,f=Object.assign(Object.create(null),{name:"opfs-sahpool",directory:void 0,initialCapacity:6,clearOnInit:!1,verbosity:2}),p=[e.config.error,e.config.warn,e.config.log],m=(e.config.log,e.config.warn),h=(e.config.error,new Map),g=e=>h.get(e),b=(e,t)=>{t?h.set(e,t):h.delete(e)},y=new Map,q=e=>y.get(e),E=(e,t)=>{t?y.set(e,t):y.delete(e)},v={xCheckReservedLock:function(e,t){const n=q(e);return n.log("xCheckReservedLock"),n.storeErr(),o.poke32(t,1),0},xClose:function(e){const t=q(e);t.storeErr();const n=t.getOFileForS3File(e);if(n)try{t.log(`xClose ${n.path}`),t.mapS3FileToOFile(e,!1),n.sah.flush(),n.flags&s.SQLITE_OPEN_DELETEONCLOSE&&t.deletePath(n.path)}catch(e){return t.storeErr(e,s.SQLITE_IOERR)}return 0},xDeviceCharacteristics:function(e){return s.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,n){return s.SQLITE_NOTFOUND},xFileSize:function(e,t){const n=q(e);n.log("xFileSize");const r=n.getOFileForS3File(e).sah.getSize()-a;return o.poke64(t,BigInt(r)),0},xLock:function(e,t){const n=q(e);return n.log(`xLock ${t}`),n.storeErr(),n.getOFileForS3File(e).lockType=t,0},xRead:function(e,t,n,r){const i=q(e);i.storeErr();const l=i.getOFileForS3File(e);i.log(`xRead ${l.path} ${n} @ ${r}`);try{const e=l.sah.read(o.heap8u().subarray(t,t+n),{at:a+Number(r)});return et&&o.poke8(n+t-1,0)}catch(i){return s.SQLITE_NOMEM}finally{o.scopedAllocPop(e)}}return i?i.sqlite3Rc||s.SQLITE_IOERR:0},xOpen:function(e,n,r,i,a){const l=g(e);try{l.log(`xOpen ${o.cstrToJs(n)} ${i}`);const e=n&&o.peek8(n)?l.getPath(n):_();let c=l.getSAHForPath(e);!c&&i&s.SQLITE_OPEN_CREATE&&(l.getFileCount()b(r.pointer,0))),a&&(r.$xRandomness=a.$xRandomness,r.$xSleep=a.$xSleep,a.dispose()),r.$xRandomness||S.xRandomness||(S.xRandomness=function(e,t,n){const r=o.heap8u();let s=0;for(;s0),e.vfs.installVfs({vfs:{struct:r,methods:S}}),r}(this.vfsName),b(this.#c.pointer,this),this.vfsDir=t.directory||"."+this.vfsName,this.#l=new DataView(this.#a.buffer,this.#a.byteOffset),this.isReady=this.reset(!!(t.clearOnInit??f.clearOnInit)).then((()=>{if(this.$error)throw this.$error;return this.getCapacity()?Promise.resolve(void 0):this.addCapacity(t.initialCapacity||f.initialCapacity)}))}#u(e,...t){this.#_>e&&p[e](this.vfsName+":",...t)}log(...e){this.#u(2,...e)}warn(...e){this.#u(1,...e)}error(...e){this.#u(0,...e)}getVfs(){return this.#c}getCapacity(){return this.#r.size}getFileCount(){return this.#s.size}getFileNames(){const e=[],t=this.#s.keys();for(const n of t)e.push(n);return e}async addCapacity(e){for(let t=0;t{try{const r=await n.createSyncAccessHandle();if(this.#r.set(r,t),e)r.truncate(a),this.setAssociatedPath(r,"",0);else{const e=this.getAssociatedPath(r);e?this.#s.set(e,r):this.#i.add(r)}}catch(e){throw this.storeErr(e),this.releaseAccessHandles(),e}})))}getAssociatedPath(e){e.read(this.#a,{at:0});const t=this.#l.getUint32(512);if(this.#a[0]&&(t&s.SQLITE_OPEN_DELETEONCLOSE||!(t&l)))return m(`Removing file with unexpected flags ${t.toString(16)}`,this.#a),this.setAssociatedPath(e,"",0),"";const n=new Uint32Array(2);e.read(n,{at:516});const r=this.computeDigest(this.#a);if(n.every(((e,t)=>e===r[t]))){const t=this.#a.findIndex((e=>0===e));return 0===t&&e.truncate(a),t?u.decode(this.#a.subarray(0,t)):""}return m("Disassociating file with bad digest."),this.setAssociatedPath(e,"",0),""}setAssociatedPath(e,n,r){const s=d.encodeInto(n,this.#a);512<=s.written+1&&t("Path too long:",n),this.#a.fill(0,s.written,512),this.#l.setUint32(512,r);const i=this.computeDigest(this.#a);e.write(this.#a,{at:0}),e.write(i,{at:516}),e.flush(),n?(this.#s.set(n,e),this.#i.delete(e)):(e.truncate(a),this.#i.add(e))}computeDigest(e){let t=3735928559,n=1103547991;for(const r of e)t=31*t+307*r,n=31*n+307*r;return new Uint32Array([t>>>0,n>>>0])}async reset(e){await this.isReady;let t,n=await navigator.storage.getDirectory();for(const e of this.vfsDir.split("/"))e&&(t=n,n=await n.getDirectoryHandle(e,{create:!0}));return this.#e=n,this.#n=t,this.#t=await this.#e.getDirectoryHandle(c,{create:!0}),this.releaseAccessHandles(),this.acquireAccessHandles(e)}getPath(e){return o.isPtr(e)&&(e=o.cstrToJs(e)),(e instanceof URL?e:new URL(e,"file://localhost/")).pathname}deletePath(e){const t=this.#s.get(e);return t&&(this.#s.delete(e),this.setAssociatedPath(t,"",0)),!!t}storeErr(e,t){return e&&(e.sqlite3Rc=t||s.SQLITE_IOERR,this.error(e)),this.$error=e,t}popErr(){const e=this.$error;return this.$error=void 0,e}nextAvailableSAH(){const[e]=this.#i.keys();return e}getOFileForS3File(e){return this.#o.get(e)}mapS3FileToOFile(e,t){t?(this.#o.set(e,t),E(e,this)):(this.#o.delete(e),E(e,!1))}hasFilename(e){return this.#s.has(e)}getSAHForPath(e){return this.#s.get(e)}async removeVfs(){if(!this.#c.pointer||!this.#t)return!1;s.sqlite3_vfs_unregister(this.#c.pointer),this.#c.dispose();try{this.releaseAccessHandles(),await this.#e.removeEntry(c,{recursive:!0}),this.#t=void 0,await this.#n.removeEntry(this.#e.name,{recursive:!0}),this.#e=this.#n=void 0}catch(t){e.config.error(this.vfsName,"removeVfs() failed:",t)}return!0}exportFile(e){const n=this.#s.get(e)||t("File not found:",e),r=n.getSize()-a,s=new Uint8Array(r>0?r:0);if(r>0){const e=n.read(s,{at:a});e!=r&&t("Expected to read "+r+" bytes but read "+e+".")}return s}async importDbChunked(e,n){const r=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to.");r.truncate(0);let o,l=0,c=!1;try{for(;void 0!==(o=await n());)o instanceof ArrayBuffer&&(o=new Uint8Array(o)),0===l&&o.byteLength>=15&&(i.affirmDbHeader(o),c=!0),r.write(o,{at:a+l}),l+=o.byteLength;if((l<512||0!=l%512)&&t("Input size",l,"is not correct for an SQLite database."),!c){const e=new Uint8Array(20);r.read(e,{at:0}),i.affirmDbHeader(e)}r.write(new Uint8Array([1,1]),{at:4114})}catch(e){throw this.setAssociatedPath(r,"",0),e}return this.setAssociatedPath(r,e,s.SQLITE_OPEN_MAIN_DB),l}importDb(e,n){if(n instanceof ArrayBuffer)n=new Uint8Array(n);else if(n instanceof Function)return this.importDbChunked(e,n);const r=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to."),i=n.byteLength;(i<512||i%512!=0)&&t("Byte array size is invalid for an SQLite db.");for(let e=0;e<15;++e)"SQLite format 3".charCodeAt(e)!==n[e]&&t("Input does not contain an SQLite database header.");const o=r.write(n,{at:a});return o!=i?(this.setAssociatedPath(r,"",0),t("Expected to write "+i+" bytes but wrote "+o+".")):(r.write(new Uint8Array([1,1]),{at:4114}),this.setAssociatedPath(r,e,s.SQLITE_OPEN_MAIN_DB)),o}}class x{#d;constructor(e){this.#d=e,this.vfsName=e.vfsName}async addCapacity(e){return this.#d.addCapacity(e)}async reduceCapacity(e){return this.#d.reduceCapacity(e)}getCapacity(){return this.#d.getCapacity(this.#d)}getFileCount(){return this.#d.getFileCount()}getFileNames(){return this.#d.getFileNames()}async reserveMinimumCapacity(e){const t=this.#d.getCapacity();return t{const e=await navigator.storage.getDirectory(),n=".opfs-sahpool-sync-check-"+_(),r=await e.getFileHandle(n,{create:!0}),s=(await r.createSyncAccessHandle()).close();return await s,await e.removeEntry(n),s?.then&&t("The local OPFS API is too old for opfs-sahpool:","it has an async FileSystemSyncAccessHandle.close() method."),!0})().then((async function(){if(n.$testThrowInInit)throw n.$testThrowInInit;const t=new A(n);return t.isReady.then((async()=>{const n=new x(t);if(e.oo1){const r=e.oo1,s=t.getVfs(),i=function(...e){const t=r.DB.dbCtorHelper.normalizeArgs(...e);t.vfs=s.$zName,r.DB.dbCtorHelper.call(this,t)};i.prototype=Object.create(r.DB.prototype),n.OpfsSAHPoolDb=i,r.DB.dbCtorHelper.setVfsPostOpenSql(s.pointer,(function(e,t){t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}return t.log("VFS initialized."),n})).catch((async e=>(await t.removeVfs().catch((()=>{})),e)))})).catch((e=>r[s]=Promise.reject(e))):r[s]=Promise.reject(new Error("Missing required OPFS APIs."))}})),void 0!==e){const t=Object.assign(Object.create(null),{exports:void 0===Re?e.asm:Re,memory:e.wasmMemory},globalThis.sqlite3ApiConfig||{});let n;globalThis.sqlite3ApiConfig=t;try{n=globalThis.sqlite3ApiBootstrap()}catch(e){throw console.error("sqlite3ApiBootstrap() error:",e),e}finally{delete globalThis.sqlite3ApiBootstrap,delete globalThis.sqlite3ApiConfig}e.sqlite3=n}else console.warn("This is not running in an Emscripten module context, so","globalThis.sqlite3ApiBootstrap() is _not_ being called due to lack","of config info for the WASM environment.","It must be called manually.")})),e.ready});const i=function(){const e=s;if(!e)throw new Error("Expecting globalThis.sqlite3InitModule to be defined by the Emscripten build.");const t=globalThis.sqlite3InitModuleState=Object.assign(Object.create(null),{moduleScript:globalThis?.document?.currentScript,isWorker:"undefined"!=typeof WorkerGlobalScope,location:globalThis.location,urlParams:globalThis?.location?.href?new URL(globalThis.location.href).searchParams:new URLSearchParams});if(t.debugModule=t.urlParams.has("sqlite3.debugModule")?(...e)=>console.warn("sqlite3.debugModule:",...e):()=>{},t.urlParams.has("sqlite3.dir"))t.sqlite3Dir=t.urlParams.get("sqlite3.dir")+"/";else if(t.moduleScript){const e=t.moduleScript.src.split("/");e.pop(),t.sqlite3Dir=e.join("/")+"/"}if(globalThis.sqlite3InitModule=function n(...r){return e(...r).then((e=>{const r=e.sqlite3;r.scriptInfo=t,n.__isUnderTest&&(r.__isUnderTest=!0);const s=r.asyncPostInit;return delete r.asyncPostInit,s()})).catch((e=>{throw console.error("Exception loading sqlite3 module:",e),e}))},globalThis.sqlite3InitModule.ready=e.ready,globalThis.sqlite3InitModuleState.moduleScript){const e=globalThis.sqlite3InitModuleState;let t=e.moduleScript.src.split("/");t.pop(),e.scriptDir=t.join("/")+"/"}return t.debugModule("sqlite3InitModuleState =",t),globalThis.sqlite3InitModule}(),o=s=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4025],{8168:(e,t,n)=>{e.exports=n.p+"4fb34c1567962ff5a6c9.wasm"},4025:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});var r,s=(r="file:///home/mmom/src/rlayers/node_modules/sqlite-wasm-http/deps/dist/sqlite3-bundler-friendly.mjs",function(e={}){var t,s,i=e;i.ready=new Promise(((e,n)=>{t=e,s=n})),["_malloc","_free","_realloc","_sqlite3_aggregate_context","_sqlite3_auto_extension","_sqlite3_bind_blob","_sqlite3_bind_double","_sqlite3_bind_int","_sqlite3_bind_int64","_sqlite3_bind_null","_sqlite3_bind_parameter_count","_sqlite3_bind_parameter_index","_sqlite3_bind_pointer","_sqlite3_bind_text","_sqlite3_busy_handler","_sqlite3_busy_timeout","_sqlite3_cancel_auto_extension","_sqlite3_changes","_sqlite3_changes64","_sqlite3_clear_bindings","_sqlite3_close_v2","_sqlite3_collation_needed","_sqlite3_column_blob","_sqlite3_column_bytes","_sqlite3_column_count","_sqlite3_column_double","_sqlite3_column_int","_sqlite3_column_int64","_sqlite3_column_name","_sqlite3_column_text","_sqlite3_column_type","_sqlite3_column_value","_sqlite3_commit_hook","_sqlite3_compileoption_get","_sqlite3_compileoption_used","_sqlite3_complete","_sqlite3_context_db_handle","_sqlite3_create_collation","_sqlite3_create_collation_v2","_sqlite3_create_function","_sqlite3_create_function_v2","_sqlite3_create_module","_sqlite3_create_module_v2","_sqlite3_create_window_function","_sqlite3_data_count","_sqlite3_db_filename","_sqlite3_db_handle","_sqlite3_db_name","_sqlite3_db_status","_sqlite3_declare_vtab","_sqlite3_deserialize","_sqlite3_drop_modules","_sqlite3_errcode","_sqlite3_errmsg","_sqlite3_error_offset","_sqlite3_errstr","_sqlite3_exec","_sqlite3_expanded_sql","_sqlite3_extended_errcode","_sqlite3_extended_result_codes","_sqlite3_file_control","_sqlite3_finalize","_sqlite3_free","_sqlite3_get_auxdata","_sqlite3_initialize","_sqlite3_keyword_count","_sqlite3_keyword_name","_sqlite3_keyword_check","_sqlite3_last_insert_rowid","_sqlite3_libversion","_sqlite3_libversion_number","_sqlite3_limit","_sqlite3_malloc","_sqlite3_malloc64","_sqlite3_msize","_sqlite3_open","_sqlite3_open_v2","_sqlite3_overload_function","_sqlite3_prepare_v2","_sqlite3_prepare_v3","_sqlite3_preupdate_blobwrite","_sqlite3_preupdate_count","_sqlite3_preupdate_depth","_sqlite3_preupdate_hook","_sqlite3_preupdate_new","_sqlite3_preupdate_old","_sqlite3_progress_handler","_sqlite3_randomness","_sqlite3_realloc","_sqlite3_realloc64","_sqlite3_reset","_sqlite3_reset_auto_extension","_sqlite3_result_blob","_sqlite3_result_double","_sqlite3_result_error","_sqlite3_result_error_code","_sqlite3_result_error_nomem","_sqlite3_result_error_toobig","_sqlite3_result_int","_sqlite3_result_int64","_sqlite3_result_null","_sqlite3_result_pointer","_sqlite3_result_subtype","_sqlite3_result_text","_sqlite3_result_zeroblob","_sqlite3_result_zeroblob64","_sqlite3_rollback_hook","_sqlite3_serialize","_sqlite3_set_authorizer","_sqlite3_set_auxdata","_sqlite3_set_last_insert_rowid","_sqlite3_shutdown","_sqlite3_sourceid","_sqlite3_sql","_sqlite3_status","_sqlite3_status64","_sqlite3_step","_sqlite3_stmt_isexplain","_sqlite3_stmt_readonly","_sqlite3_stmt_status","_sqlite3_strglob","_sqlite3_stricmp","_sqlite3_strlike","_sqlite3_strnicmp","_sqlite3_table_column_metadata","_sqlite3_total_changes","_sqlite3_total_changes64","_sqlite3_trace_v2","_sqlite3_txn_state","_sqlite3_update_hook","_sqlite3_uri_boolean","_sqlite3_uri_int64","_sqlite3_uri_key","_sqlite3_uri_parameter","_sqlite3_user_data","_sqlite3_value_blob","_sqlite3_value_bytes","_sqlite3_value_double","_sqlite3_value_dup","_sqlite3_value_free","_sqlite3_value_frombind","_sqlite3_value_int","_sqlite3_value_int64","_sqlite3_value_nochange","_sqlite3_value_numeric_type","_sqlite3_value_pointer","_sqlite3_value_subtype","_sqlite3_value_text","_sqlite3_value_type","_sqlite3_vfs_find","_sqlite3_vfs_register","_sqlite3_vfs_unregister","_sqlite3_vtab_collation","_sqlite3_vtab_distinct","_sqlite3_vtab_in","_sqlite3_vtab_in_first","_sqlite3_vtab_in_next","_sqlite3_vtab_nochange","_sqlite3_vtab_on_conflict","_sqlite3_vtab_rhs_value","_sqlite3changegroup_add","_sqlite3changegroup_add_strm","_sqlite3changegroup_delete","_sqlite3changegroup_new","_sqlite3changegroup_output","_sqlite3changegroup_output_strm","_sqlite3changeset_apply","_sqlite3changeset_apply_strm","_sqlite3changeset_apply_v2","_sqlite3changeset_apply_v2_strm","_sqlite3changeset_concat","_sqlite3changeset_concat_strm","_sqlite3changeset_conflict","_sqlite3changeset_finalize","_sqlite3changeset_fk_conflicts","_sqlite3changeset_invert","_sqlite3changeset_invert_strm","_sqlite3changeset_new","_sqlite3changeset_next","_sqlite3changeset_old","_sqlite3changeset_op","_sqlite3changeset_pk","_sqlite3changeset_start","_sqlite3changeset_start_strm","_sqlite3changeset_start_v2","_sqlite3changeset_start_v2_strm","_sqlite3session_attach","_sqlite3session_changeset","_sqlite3session_changeset_size","_sqlite3session_changeset_strm","_sqlite3session_config","_sqlite3session_create","_sqlite3session_delete","_sqlite3session_diff","_sqlite3session_enable","_sqlite3session_indirect","_sqlite3session_isempty","_sqlite3session_memory_used","_sqlite3session_object_config","_sqlite3session_patchset","_sqlite3session_patchset_strm","_sqlite3session_table_filter","_sqlite3_wasm_pstack_ptr","_sqlite3_wasm_pstack_restore","_sqlite3_wasm_pstack_alloc","_sqlite3_wasm_pstack_remaining","_sqlite3_wasm_pstack_quota","_sqlite3_wasm_db_error","_sqlite3_wasm_test_struct","_sqlite3_wasm_enum_json","_sqlite3_wasm_vfs_unlink","_sqlite3_wasm_db_vfs","_sqlite3_wasm_db_reset","_sqlite3_wasm_db_export_chunked","_sqlite3_wasm_db_serialize","_sqlite3_wasm_vfs_create_file","_sqlite3_wasm_posix_create_file","_sqlite3_wasm_kvvfsMakeKeyOnPstack","_sqlite3_wasm_kvvfs_methods","_sqlite3_wasm_vtab_config","_sqlite3_wasm_db_config_ip","_sqlite3_wasm_db_config_pii","_sqlite3_wasm_db_config_s","_sqlite3_wasm_config_i","_sqlite3_wasm_config_ii","_sqlite3_wasm_config_j","_sqlite3_wasm_init_wasmfs","_sqlite3_wasm_test_intptr","_sqlite3_wasm_test_voidptr","_sqlite3_wasm_test_int64_max","_sqlite3_wasm_test_int64_min","_sqlite3_wasm_test_int64_times2","_sqlite3_wasm_test_int64_minmax","_sqlite3_wasm_test_int64ptr","_sqlite3_wasm_test_stack_overflow","_sqlite3_wasm_test_str_hello","_sqlite3_wasm_SQLTester_strglob","___indirect_function_table","_fflush","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(i.ready,e)||Object.defineProperty(i.ready,e,{get:()=>G("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>G("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));const o=globalThis.sqlite3InitModuleState||Object.assign(Object.create(null),{debugModule:()=>{}});delete globalThis.sqlite3InitModuleState,o.debugModule("globalThis.location =",globalThis.location);const a="emscripten-bug-17951";i[a]=function e(t,n){t.env.foo=function(){};const r=i.locateFile(e.uri,void 0===g?"":g);o.debugModule("instantiateWasm() uri =",r);const s=()=>fetch(r,{credentials:"same-origin"});return(WebAssembly.instantiateStreaming?async()=>WebAssembly.instantiateStreaming(s(),t).then((e=>n(e.instance,e.module))):async()=>s().then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,t))).then((e=>n(e.instance,e.module))))(),{}},i[a].uri="sqlite3.wasm";var l=Object.assign({},i),c="./this.program",_="object"==typeof window,u="function"==typeof importScripts,d="object"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions&&"string"==typeof{env:{RLAYERS_DEBUG:void 0}}.versions.node,f=!_&&!d&&!u;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var p,m,h,g="";if(f){if("function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(p=read),h=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let t=read(e,"binary");return O("object"==typeof t),t},m=(e,t,n)=>{setTimeout((()=>t(h(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():G()),"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!_&&!u)throw new Error("environment detection error");if(u?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");p=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),m=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}}var b,y,q,E=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,l),l=null,b="fetchSettings",Object.getOwnPropertyDescriptor(i,b)&&G(`\`Module.${b}\` was supplied but \`${b}\` not included in INCOMING_MODULE_JS_API`),i.arguments&&i.arguments,Z("arguments","arguments_"),i.thisProgram&&(c=i.thisProgram),Z("thisProgram","thisProgram"),i.quit&&i.quit,Z("quit","quit_"),O(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),O(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),O(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),O(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),O(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),O(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Z("asm","wasmExports"),Z("read","read_"),Z("readAsync","readAsync"),Z("readBinary","readBinary"),Z("setWindowTitle","setWindowTitle"),O(!d,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),O(!f,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),i.wasmBinary&&(y=i.wasmBinary),Z("wasmBinary","wasmBinary"),i.noExitRuntime,Z("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,A,x,T,I,k,F=!1;function O(e,t){e||G("Assertion failed"+(t?": "+t:""))}function P(){var e=q.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=x=new Int16Array(e),i.HEAPU8=A=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAP32=T=new Int32Array(e),i.HEAPU32=I=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e),i.HEAP64=k=new BigInt64Array(e),i.HEAPU64=new BigUint64Array(e)}O(!i.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),O("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var L=i.INITIAL_MEMORY||16777216;function C(){if(!F){var e=We();0==e&&(e+=4);var t=I[e>>2],n=I[e+4>>2];34821223==t&&2310721022==n||G(`Stack overflow! Stack cookie has been overwritten at ${se(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${se(n)} ${se(t)}`),1668509029!=I[0]&&G("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Z("INITIAL_MEMORY","INITIAL_MEMORY"),O(L>=524288,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+L+"! (STACK_SIZE=524288)"),q=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:L/65536,maximum:32768}),P(),O((L=q.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var N=[],D=[],R=[],M=!1;O(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),O(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var j=0,U=null,B=null,z={};function W(e){for(var t=e;;){if(!z[e])return e;e=t+Math.random()}}function H(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(!z[e]),z[e]=1,null===U&&"undefined"!=typeof setInterval&&(U=setInterval((()=>{if(F)return clearInterval(U),void(U=null);var e=!1;for(var t in z)e||(e=!0,w("still waiting on run dependencies:")),w(`dependency: ${t}`);e&&w("(end of list)")}),1e4))):w("warning: run dependency added without ID")}function Q(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),e?(O(z[e]),delete z[e]):w("warning: run dependency removed without ID"),0==j&&(null!==U&&(clearInterval(U),U=null),B)){var t=B;B=null,t()}}function G(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),F=!0;var t=new WebAssembly.RuntimeError(e);throw s(t),t}var V,$;function K(e){return e.startsWith("data:application/octet-stream;base64,")}function J(e){return function(){O(M,`native function \`${e}\` called before runtime initialization`);var t=Re[e];return O(t,`exported native function \`${e}\` not found`),t.apply(null,arguments)}}function Y(e){if(e==V&&y)return new Uint8Array(y);if(h)return h(e);throw"both async and sync fetching of the wasm failed"}function X(e,t,n){return function(e){return y||!_&&!u||"function"!=typeof fetch?Promise.resolve().then((()=>Y(e))):fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Y(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(n,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),V.startsWith("file://")&&w(`warning: Loading from a file URI (${V}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),G(e)}))}function Z(e,t,n=!0){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){G(`\`Module.${e}\` has been replaced by \`${t}\``+(n?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ee(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function te(e,t){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){ie("`"+e+"` is not longer defined by emscripten. "+t)}})}function ne(e){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),G(t)}})}i.locateFile?K(V="sqlite3.wasm")||($=V,V=i.locateFile?i.locateFile($,g):g+$):V=new URL(n(8168),n.b).href,te("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),te("asm","Please use wasmExports instead");var re=e=>{for(;e.length>0;)e.shift()(i)},se=e=>(O("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),ie=e=>{ie.shown||(ie.shown={}),ie.shown[e]||(ie.shown[e]=1,w(e))},oe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var s=e[r];"."===s?e.splice(r,1):".."===s?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=oe.isAbs(e),n="/"===e.substr(-1);return(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=oe.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=oe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return oe.normalize(e.join("/"))},join2:(e,t)=>oe.normalize(e+"/"+t)},ae=e=>(ae=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);G("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),le={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:we.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=oe.isAbs(r)}return(t?"/":"")+(e=oe.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=le.resolve(e).substr(1),t=le.resolve(t).substr(1);for(var r=n(e.split("/")),s=n(t.split("/")),i=Math.min(r.length,s.length),o=i,a=0;a{for(var r=t+n,s=t;e[s]&&!(s>=r);)++s;if(s-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,s));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i},ue=[],de=e=>{for(var t=0,n=0;n=55296&&r<=57343?(t+=4,++n):t+=3}return t},fe=(e,t,n,r)=>{if(O("string"==typeof e),!(r>0))return 0;for(var s=n,i=n+r-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(n>=i)break;t[n++]=a}else if(a<=2047){if(n+1>=i)break;t[n++]=192|a>>6,t[n++]=128|63&a}else if(a<=65535){if(n+2>=i)break;t[n++]=224|a>>12,t[n++]=128|a>>6&63,t[n++]=128|63&a}else{if(n+3>=i)break;a>1114111&&ie("Invalid Unicode code point "+se(a)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++]=240|a>>18,t[n++]=128|a>>12&63,t[n++]=128|a>>6&63,t[n++]=128|63&a}}return t[n]=0,n-s};function pe(e,t,n){var r=n>0?n:de(e)+1,s=new Array(r),i=fe(e,s,0,s.length);return t&&(s.length=i),s}var me,he={ttys:[],init(){},shutdown(){},register(e,t){he.ttys[e]={input:[],output:[],ops:t},we.registerDevice(e,he.stream_ops)},stream_ops:{open(e){var t=he.ttys[e.node.rdev];if(!t)throw new we.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,s){if(!e.tty||!e.tty.ops.get_char)throw new we.ErrnoError(60);for(var i=0,o=0;o(()=>{if(!ue.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;ue=pe(e,!0)}return ue.shift()})(),put_char(e,t){null===t||10===t?(E(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(E(_e(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(_e(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(_e(e.output,0)),e.output=[])}}},ge=e=>{e=((e,t)=>(O(t,"alignment argument is required"),Math.ceil(e/t)*t))(e,65536);var t=Be(65536,e);return t?((e,t)=>(A.fill(0,e,e+t),e))(t,e):0},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,n,r){if(we.isBlkdev(n)||we.isFIFO(n))throw new we.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:we.chrdev_stream_ops}});var s=we.createNode(e,t,n,r);return we.isDir(s.mode)?(s.node_ops=be.ops_table.dir.node,s.stream_ops=be.ops_table.dir.stream,s.contents={}):we.isFile(s.mode)?(s.node_ops=be.ops_table.file.node,s.stream_ops=be.ops_table.file.stream,s.usedBytes=0,s.contents=null):we.isLink(s.mode)?(s.node_ops=be.ops_table.link.node,s.stream_ops=be.ops_table.link.stream):we.isChrdev(s.mode)&&(s.node_ops=be.ops_table.chrdev.node,s.stream_ops=be.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=we.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,we.isDir(e.mode)?t.size=4096:we.isFile(e.mode)?t.size=e.usedBytes:we.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw we.genericErrors[44]},mknod:(e,t,n,r)=>be.createNode(e,t,n,r),rename(e,t,n){if(we.isDir(e.mode)){var r;try{r=we.lookupNode(t,n)}catch(e){}if(r)for(var s in r.contents)throw new we.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=we.lookupNode(e,t);for(var r in n.contents)throw new we.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n in e.contents)e.contents.hasOwnProperty(n)&&t.push(n);return t},symlink(e,t,n){var r=be.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!we.isLink(e.mode))throw new we.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,s){var i=e.node.contents;if(s>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-s,r);if(O(o>=0),o>8&&i.subarray)t.set(i.subarray(s,s+o),n);else for(var a=0;a0||n+t(be.stream_ops.write(e,t,0,r,n,!1),0)}},ye=i.preloadPlugins||[],qe=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Ee={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},ve={},we={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,t={}){if(!(e=le.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new we.ErrnoError(32);for(var n=e.split("/").filter((e=>!!e)),r=we.root,s="/",i=0;i40)throw new we.ErrnoError(32)}}return{path:s,node:r}},getPath(e){for(var t;;){if(we.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?`${n}/${t}`:n+t:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r>>0)%we.nameTable.length},hashAddNode(e){var t=we.hashName(e.parent.id,e.name);e.name_next=we.nameTable[t],we.nameTable[t]=e},hashRemoveNode(e){var t=we.hashName(e.parent.id,e.name);if(we.nameTable[t]===e)we.nameTable[t]=e.name_next;else for(var n=we.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=we.mayLookup(e);if(n)throw new we.ErrnoError(n,e);for(var r=we.hashName(e.id,t),s=we.nameTable[r];s;s=s.name_next){var i=s.name;if(s.parent.id===e.id&&i===t)return s}return we.lookup(e,t)},createNode(e,t,n,r){O("object"==typeof e);var s=new we.FSNode(e,t,n,r);return we.hashAddNode(s),s},destroyNode(e){we.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>we.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>we.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,t){try{return we.lookupNode(e,t),20}catch(e){}return we.nodePermissions(e,"wx")},mayDelete(e,t,n){var r;try{r=we.lookupNode(e,t)}catch(e){return e.errno}var s=we.nodePermissions(e,"wx");if(s)return s;if(n){if(!we.isDir(r.mode))return 54;if(we.isRoot(r)||we.getPath(r)===we.cwd())return 10}else if(we.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?we.isLink(e.mode)?32:we.isDir(e.mode)&&("r"!==we.flagsToPermissionString(t)||512&t)?31:we.nodePermissions(e,we.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=we.MAX_OPEN_FDS;e++)if(!we.streams[e])return e;throw new we.ErrnoError(33)},getStreamChecked(e){var t=we.getStream(e);if(!t)throw new we.ErrnoError(8);return t},getStream:e=>we.streams[e],createStream:(e,t=-1)=>(we.FSStream||(we.FSStream=function(){this.shared={}},we.FSStream.prototype={},Object.defineProperties(we.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new we.FSStream,e),-1==t&&(t=we.nextfd()),e.fd=t,we.streams[t]=e,e),closeStream(e){we.streams[e]=null},chrdev_stream_ops:{open(e){var t=we.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new we.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){we.devices[e]={stream_ops:t}},getDevice:e=>we.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push.apply(n,r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),we.syncFSRequests++,we.syncFSRequests>1&&w(`warning: ${we.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=we.getMounts(we.root.mount),r=0;function s(e){return O(we.syncFSRequests>0),we.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,s(e));++r>=n.length&&s(null)}n.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount(e,t,n){if("string"==typeof e)throw e;var r,s="/"===n,i=!n;if(s&&we.root)throw new we.ErrnoError(10);if(!s&&!i){var o=we.lookupPath(n,{follow_mount:!1});if(n=o.path,r=o.node,we.isMountpoint(r))throw new we.ErrnoError(10);if(!we.isDir(r.mode))throw new we.ErrnoError(54)}var a={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,s?we.root=l:r&&(r.mounted=a,r.mount&&r.mount.mounts.push(a)),l},unmount(e){var t=we.lookupPath(e,{follow_mount:!1});if(!we.isMountpoint(t.node))throw new we.ErrnoError(28);var n=t.node,r=n.mounted,s=we.getMounts(r);Object.keys(we.nameTable).forEach((e=>{for(var t=we.nameTable[e];t;){var n=t.name_next;s.includes(t.mount)&&we.destroyNode(t),t=n}})),n.mounted=null;var i=n.mount.mounts.indexOf(r);O(-1!==i),n.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=we.lookupPath(e,{parent:!0}).node,s=oe.basename(e);if(!s||"."===s||".."===s)throw new we.ErrnoError(28);var i=we.mayCreate(r,s);if(i)throw new we.ErrnoError(i);if(!r.node_ops.mknod)throw new we.ErrnoError(63);return r.node_ops.mknod(r,s,t,n)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,we.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,we.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",s=0;s(void 0===n&&(n=t,t=438),t|=8192,we.mknod(e,t,n)),symlink(e,t){if(!le.resolve(e))throw new we.ErrnoError(44);var n=we.lookupPath(t,{parent:!0}).node;if(!n)throw new we.ErrnoError(44);var r=oe.basename(t),s=we.mayCreate(n,r);if(s)throw new we.ErrnoError(s);if(!n.node_ops.symlink)throw new we.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,s=oe.dirname(e),i=oe.dirname(t),o=oe.basename(e),a=oe.basename(t);if(n=we.lookupPath(e,{parent:!0}).node,r=we.lookupPath(t,{parent:!0}).node,!n||!r)throw new we.ErrnoError(44);if(n.mount!==r.mount)throw new we.ErrnoError(75);var l,c=we.lookupNode(n,o),_=le.relative(e,i);if("."!==_.charAt(0))throw new we.ErrnoError(28);if("."!==(_=le.relative(t,s)).charAt(0))throw new we.ErrnoError(55);try{l=we.lookupNode(r,a)}catch(e){}if(c!==l){var u=we.isDir(c.mode),d=we.mayDelete(n,o,u);if(d)throw new we.ErrnoError(d);if(d=l?we.mayDelete(r,a,u):we.mayCreate(r,a))throw new we.ErrnoError(d);if(!n.node_ops.rename)throw new we.ErrnoError(63);if(we.isMountpoint(c)||l&&we.isMountpoint(l))throw new we.ErrnoError(10);if(r!==n&&(d=we.nodePermissions(n,"w")))throw new we.ErrnoError(d);we.hashRemoveNode(c);try{n.node_ops.rename(c,r,a)}catch(e){throw e}finally{we.hashAddNode(c)}}},rmdir(e){var t=we.lookupPath(e,{parent:!0}).node,n=oe.basename(e),r=we.lookupNode(t,n),s=we.mayDelete(t,n,!0);if(s)throw new we.ErrnoError(s);if(!t.node_ops.rmdir)throw new we.ErrnoError(63);if(we.isMountpoint(r))throw new we.ErrnoError(10);t.node_ops.rmdir(t,n),we.destroyNode(r)},readdir(e){var t=we.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new we.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=we.lookupPath(e,{parent:!0}).node;if(!t)throw new we.ErrnoError(44);var n=oe.basename(e),r=we.lookupNode(t,n),s=we.mayDelete(t,n,!1);if(s)throw new we.ErrnoError(s);if(!t.node_ops.unlink)throw new we.ErrnoError(63);if(we.isMountpoint(r))throw new we.ErrnoError(10);t.node_ops.unlink(t,n),we.destroyNode(r)},readlink(e){var t=we.lookupPath(e).node;if(!t)throw new we.ErrnoError(44);if(!t.node_ops.readlink)throw new we.ErrnoError(28);return le.resolve(we.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=we.lookupPath(e,{follow:!t}).node;if(!n)throw new we.ErrnoError(44);if(!n.node_ops.getattr)throw new we.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>we.stat(e,!0),chmod(e,t,n){var r;if(!(r="string"==typeof e?we.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new we.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){we.chmod(e,t,!0)},fchmod(e,t){var n=we.getStreamChecked(e);we.chmod(n.node,t)},chown(e,t,n,r){var s;if(!(s="string"==typeof e?we.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new we.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown(e,t,n){we.chown(e,t,n,!0)},fchown(e,t,n){var r=we.getStreamChecked(e);we.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new we.ErrnoError(28);var n;if(!(n="string"==typeof e?we.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new we.ErrnoError(63);if(we.isDir(n.mode))throw new we.ErrnoError(31);if(!we.isFile(n.mode))throw new we.ErrnoError(28);var r=we.nodePermissions(n,"w");if(r)throw new we.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=we.getStreamChecked(e);if(!(2097155&n.flags))throw new we.ErrnoError(28);we.truncate(n.node,t)},utime(e,t,n){var r=we.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,t,n){if(""===e)throw new we.ErrnoError(44);var r;if(n=void 0===n?438:n,n=64&(t="string"==typeof t?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t})(t):t)?4095&n|32768:0,"object"==typeof e)r=e;else{e=oe.normalize(e);try{r=we.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(r){if(128&t)throw new we.ErrnoError(20)}else r=we.mknod(e,n,0),s=!0;if(!r)throw new we.ErrnoError(44);if(we.isChrdev(r.mode)&&(t&=-513),65536&t&&!we.isDir(r.mode))throw new we.ErrnoError(54);if(!s){var o=we.mayOpen(r,t);if(o)throw new we.ErrnoError(o)}512&t&&!s&&we.truncate(r,0),t&=-131713;var a=we.createStream({node:r,path:we.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(we.readFiles||(we.readFiles={}),e in we.readFiles||(we.readFiles[e]=1)),a},close(e){if(we.isClosed(e))throw new we.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{we.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(we.isClosed(e))throw new we.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new we.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new we.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,s){if(O(n>=0),r<0||s<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(1==(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.read)throw new we.ErrnoError(28);var i=void 0!==s;if(i){if(!e.seekable)throw new we.ErrnoError(70)}else s=e.position;var o=e.stream_ops.read(e,t,n,r,s);return i||(e.position+=o),o},write(e,t,n,r,s,i){if(O(n>=0),r<0||s<0)throw new we.ErrnoError(28);if(we.isClosed(e))throw new we.ErrnoError(8);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(we.isDir(e.node.mode))throw new we.ErrnoError(31);if(!e.stream_ops.write)throw new we.ErrnoError(28);e.seekable&&1024&e.flags&&we.llseek(e,0,2);var o=void 0!==s;if(o){if(!e.seekable)throw new we.ErrnoError(70)}else s=e.position;var a=e.stream_ops.write(e,t,n,r,s,i);return o||(e.position+=a),a},allocate(e,t,n){if(we.isClosed(e))throw new we.ErrnoError(8);if(t<0||n<=0)throw new we.ErrnoError(28);if(!(2097155&e.flags))throw new we.ErrnoError(8);if(!we.isFile(e.node.mode)&&!we.isDir(e.node.mode))throw new we.ErrnoError(43);if(!e.stream_ops.allocate)throw new we.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,s){if(2&r&&!(2&s)&&2!=(2097155&e.flags))throw new we.ErrnoError(2);if(1==(2097155&e.flags))throw new we.ErrnoError(2);if(!e.stream_ops.mmap)throw new we.ErrnoError(43);return e.stream_ops.mmap(e,t,n,r,s)},msync:(e,t,n,r,s)=>(O(n>=0),e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,s):0),munmap:e=>0,ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new we.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var n,r=we.open(e,t.flags),s=we.stat(e).size,i=new Uint8Array(s);return we.read(r,i,0,s,0),"utf8"===t.encoding?n=_e(i,0):"binary"===t.encoding&&(n=i),we.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=we.open(e,n.flags,n.mode);if("string"==typeof t){var s=new Uint8Array(de(t)+1),i=fe(t,s,0,s.length);we.write(r,s,0,i,void 0,n.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");we.write(r,t,0,t.byteLength,void 0,n.canOwn)}we.close(r)},cwd:()=>we.currentPath,chdir(e){var t=we.lookupPath(e,{follow:!0});if(null===t.node)throw new we.ErrnoError(44);if(!we.isDir(t.node.mode))throw new we.ErrnoError(54);var n=we.nodePermissions(t.node,"x");if(n)throw new we.ErrnoError(n);we.currentPath=t.path},createDefaultDirectories(){we.mkdir("/tmp"),we.mkdir("/home"),we.mkdir("/home/web_user")},createDefaultDevices(){we.mkdir("/dev"),we.registerDevice(we.makedev(1,3),{read:()=>0,write:(e,t,n,r,s)=>r}),we.mkdev("/dev/null",we.makedev(1,3)),he.register(we.makedev(5,0),he.default_tty_ops),he.register(we.makedev(6,0),he.default_tty1_ops),we.mkdev("/dev/tty",we.makedev(5,0)),we.mkdev("/dev/tty1",we.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=ae(e).byteLength),e[--t]);we.createDevice("/dev","random",n),we.createDevice("/dev","urandom",n),we.mkdir("/dev/shm"),we.mkdir("/dev/shm/tmp")},createSpecialDirectories(){we.mkdir("/proc");var e=we.mkdir("/proc/self");we.mkdir("/proc/self/fd"),we.mount({mount(){var t=we.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=+t,r=we.getStreamChecked(n),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>r.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?we.createDevice("/dev","stdin",i.stdin):we.symlink("/dev/tty","/dev/stdin"),i.stdout?we.createDevice("/dev","stdout",null,i.stdout):we.symlink("/dev/tty","/dev/stdout"),i.stderr?we.createDevice("/dev","stderr",null,i.stderr):we.symlink("/dev/tty1","/dev/stderr");var e=we.open("/dev/stdin",0),t=we.open("/dev/stdout",1),n=we.open("/dev/stderr",1);O(0===e.fd,`invalid handle for stdin (${e.fd})`),O(1===t.fd,`invalid handle for stdout (${t.fd})`),O(2===n.fd,`invalid handle for stderr (${n.fd})`)},ensureErrnoError(){we.ErrnoError||(we.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){for(var t in this.errno=e,ve)if(ve[t]===e){this.code=t;break}},this.setErrno(e),this.message=Ee[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=this.stack.replace(/\b_Z[\w\d_]+/g,(function(e){var t,n=(t=e,ie("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),t);return e===n?e:n+" ["+e+"]"})))},we.ErrnoError.prototype=new Error,we.ErrnoError.prototype.constructor=we.ErrnoError,[44].forEach((e=>{we.genericErrors[e]=new we.ErrnoError(e),we.genericErrors[e].stack=""})))},staticInit(){we.ensureErrnoError(),we.nameTable=new Array(4096),we.mount(be,{},"/"),we.createDefaultDirectories(),we.createDefaultDevices(),we.createSpecialDirectories(),we.filesystems={MEMFS:be}},init(e,t,n){O(!we.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),we.init.initialized=!0,we.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=n||i.stderr,we.createStandardStreams()},quit(){we.init.initialized=!1,Ue(0);for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),s=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;s||(o=r);var a=this;a.setDataGetter((e=>{var t=e*o,s=(e+1)*o-1;if(s=Math.min(s,r-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",n,!1),r!==o&&s.setRequestHeader("Range","bytes="+e+"-"+t),s.responseType="arraybuffer",s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(s.status>=200&&s.status<300||304===s.status))throw new Error("Couldn't load "+n+". Status: "+s.status);return void 0!==s.response?new Uint8Array(s.response||[]):pe(s.responseText||"",!0)})(t,s)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!i&&r||(o=r=1,r=this.getter(0).length,o=r,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new i;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:n};var l=we.createFile(e,t,a,r,s);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={};function _(e,t,n,r,s){var i=e.node.contents;if(s>=i.length)return 0;var o=Math.min(i.length-s,r);if(O(o>=0),i.slice)for(var a=0;a{var t=l.stream_ops[e];c[e]=function(){return we.forceLoadFile(l),t.apply(null,arguments)}})),c.read=(e,t,n,r,s)=>(we.forceLoadFile(l),_(e,t,n,r,s)),c.mmap=(e,t,n,r,s)=>{we.forceLoadFile(l);var i=ge(t);if(!i)throw new we.ErrnoError(48);return _(e,S,i,t,n),{ptr:i,allocated:!0}},l.stream_ops=c,l},absolutePath(){G("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){G("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){G("FS.createLink has been removed; use FS.symlink instead")},joinPath(){G("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){G("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){G("FS.standardizePath has been removed; use PATH.normalize instead")}},Se={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(oe.isAbs(t))return t;var r;if(r=-100===e?we.cwd():Se.getStreamFromFD(e).path,0==t.length){if(!n)throw new we.ErrnoError(44);return r}return oe.join2(r,t)},doStat(e,t,n){try{var r=e(t)}catch(e){if(e&&e.node&&oe.normalize(t)!==oe.normalize(we.getPath(e.node)))return-54;throw e}T[n>>2]=r.dev,T[n+4>>2]=r.mode,I[n+8>>2]=r.nlink,T[n+12>>2]=r.uid,T[n+16>>2]=r.gid,T[n+20>>2]=r.rdev,k[n+24>>3]=BigInt(r.size),T[n+32>>2]=4096,T[n+36>>2]=r.blocks;var s=r.atime.getTime(),i=r.mtime.getTime(),o=r.ctime.getTime();return k[n+40>>3]=BigInt(Math.floor(s/1e3)),I[n+48>>2]=s%1e3*1e3,k[n+56>>3]=BigInt(Math.floor(i/1e3)),I[n+64>>2]=i%1e3*1e3,k[n+72>>3]=BigInt(Math.floor(o/1e3)),I[n+80>>2]=o%1e3*1e3,k[n+88>>3]=BigInt(r.ino),0},doMsync(e,t,n,r,s){if(!we.isFile(t.node.mode))throw new we.ErrnoError(43);if(2&r)return 0;var i=A.slice(e,e+n);we.msync(t,i,s,n,r)},varargs:void 0,get(){O(null!=Se.varargs);var e=T[+Se.varargs>>2];return Se.varargs+=4,e},getp:()=>Se.get(),getStr(e){var t=(e=>(O("number"==typeof e),e?_e(A,e,void 0):""))(e);return t},getStreamFromFD:e=>we.getStreamChecked(e)},Ae=e=>e<-9007199254740992||e>9007199254740992?NaN:Number(e),xe=(e,t,n)=>(O("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),fe(e,A,t,n)),Te=e=>I[e>>2]+4294967296*T[e+4>>2],Ie=[0,31,60,91,121,152,182,213,244,274,305,335],ke=[0,31,59,90,120,151,181,212,243,273,304,334],Fe=e=>{var t=de(e)+1,n=je(t);return n&&xe(e,n,t),n};me=()=>performance.now();var Oe=e=>{var t=q.buffer,n=(e-t.byteLength+65535)/65536;try{return q.grow(n),P(),1}catch(n){w(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},Pe={},Le=()=>{if(!Le.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var t in Pe)void 0===Pe[t]?delete e[t]:e[t]=Pe[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Le.strings=n}return Le.strings},Ce=function(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=we.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r};Object.defineProperties(Ce.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return we.isDir(this.mode)}},isDevice:{get:function(){return we.isChrdev(this.mode)}}}),we.FSNode=Ce,we.createPreloadedFile=(e,t,n,r,s,i,o,a,l,c)=>{var _=t?le.resolve(oe.join2(e,t)):e,u=W(`cp ${_}`);function d(n){function d(n){c&&c(),a||((e,t,n,r,s,i)=>{we.createDataFile(e,t,n,r,s,i)})(e,t,n,r,s,l),i&&i(),Q(u)}((e,t,n,r)=>{"undefined"!=typeof Browser&&Browser.init();var s=!1;return ye.forEach((i=>{s||i.canHandle(t)&&(i.handle(e,t,n,r),s=!0)})),s})(n,_,d,(()=>{o&&o(),Q(u)}))||d(n)}H(u),"string"==typeof n?((e,t,n)=>{var r=W(`al ${e}`);m(e,(t=>{O(t,`Loading data file "${e}" failed (no arrayBuffer).`),d(new Uint8Array(t)),r&&Q(r)}),(t=>{if(!n)throw`Loading data file "${e}" failed.`;n()})),r&&H(r)})(n,0,o):d(n)},we.staticInit(),ve={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Ne,De={__syscall_chmod:function(e,t){try{return e=Se.getStr(e),we.chmod(e,t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_faccessat:function(e,t,n,r){try{if(t=Se.getStr(t),O(0===r),t=Se.calculateAt(e,t),-8&n)return-28;var s=we.lookupPath(t,{follow:!0}).node;if(!s)return-44;var i="";return 4&n&&(i+="r"),2&n&&(i+="w"),1&n&&(i+="x"),i&&we.nodePermissions(s,i)?-2:0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchmod:function(e,t){try{return we.fchmod(e,t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fchown32:function(e,t,n){try{return we.fchown(e,t,n),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fcntl64:function(e,t,n){Se.varargs=n;try{var r=Se.getStreamFromFD(e);switch(t){case 0:if((s=Se.get())<0)return-28;for(;we.streams[s];)s++;return we.createStream(r,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:var s=Se.get();return r.flags|=s,0;case 5:return s=Se.getp(),x[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return T[Me()>>2]=28,-1}}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){try{var n=Se.getStreamFromFD(e);return Se.doStat(we.stat,n.path,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t){t=Ae(t);try{return isNaN(t)?61:(we.ftruncate(e,t),0)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getcwd:function(e,t){try{if(0===t)return-28;var n=we.cwd(),r=de(n)+1;return t>2]=s.c_iflag||0,T[i+4>>2]=s.c_oflag||0,T[i+8>>2]=s.c_cflag||0,T[i+12>>2]=s.c_lflag||0;for(var o=0;o<32;o++)S[i+o+17|0]=s.c_cc[o]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){i=Se.getp();var a=T[i>>2],l=T[i+4>>2],c=T[i+8>>2],_=T[i+12>>2],u=[];for(o=0;o<32;o++)u.push(S[i+o+17|0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:a,c_oflag:l,c_cflag:c,c_lflag:_,c_cc:u})}return 0;case 21519:return r.tty?(i=Se.getp(),T[i>>2]=0,0):-59;case 21520:return r.tty?-28:-59;case 21531:return i=Se.getp(),we.ioctl(r,t,i);case 21523:if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var d=r.tty.ops.ioctl_tiocgwinsz(r.tty);i=Se.getp(),x[i>>1]=d[0],x[i+2>>1]=d[1]}return 0;default:return-28}}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(we.lstat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_mkdirat:function(e,t,n){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),"/"===(t=oe.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),we.mkdir(t,n,0),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,n,r){try{t=Se.getStr(t);var s=256&r,i=4096&r;return O(!(r&=-6401),`unknown flags in __syscall_newfstatat: ${r}`),t=Se.calculateAt(e,t,i),Se.doStat(s?we.lstat:we.stat,t,n)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){Se.varargs=r;try{t=Se.getStr(t),t=Se.calculateAt(e,t);var s=r?Se.get():0;return we.open(t,n,s).fd}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_readlinkat:function(e,t,n,r){try{if(t=Se.getStr(t),t=Se.calculateAt(e,t),r<=0)return-28;var s=we.readlink(t),i=Math.min(r,de(s)),o=S[n+i];return xe(s,n,r+1),S[n+i]=o,i}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){try{return e=Se.getStr(e),we.rmdir(e),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){try{return e=Se.getStr(e),Se.doStat(we.stat,e,t)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,n){try{return t=Se.getStr(t),t=Se.calculateAt(e,t),0===n?we.unlink(t):512===n?we.rmdir(t):G("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_utimensat:function(e,t,n,r){try{if(t=Se.getStr(t),O(0===r),t=Se.calculateAt(e,t,!0),n){var s=Te(n),i=T[n+8>>2];o=1e3*s+i/1e6,a=1e3*(s=Te(n+=16))+(i=T[n+8>>2])/1e6}else var o=Date.now(),a=o;return we.utime(t,o,a),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},_emscripten_get_now_is_monotonic:()=>!0,_localtime_js:function(e,t){e=Ae(e);var n=new Date(1e3*e);T[t>>2]=n.getSeconds(),T[t+4>>2]=n.getMinutes(),T[t+8>>2]=n.getHours(),T[t+12>>2]=n.getDate(),T[t+16>>2]=n.getMonth(),T[t+20>>2]=n.getFullYear()-1900,T[t+24>>2]=n.getDay();var r=0|(e=>{var t;return((t=e.getFullYear())%4!=0||t%100==0&&t%400!=0?ke:Ie)[e.getMonth()]+e.getDate()-1})(n);T[t+28>>2]=r,T[t+36>>2]=-60*n.getTimezoneOffset();var s=new Date(n.getFullYear(),0,1),i=new Date(n.getFullYear(),6,1).getTimezoneOffset(),o=s.getTimezoneOffset(),a=0|(i!=o&&n.getTimezoneOffset()==Math.min(o,i));T[t+32>>2]=a},_mmap_js:function(e,t,n,r,s,i,o){s=Ae(s);try{if(isNaN(s))return 61;var a=Se.getStreamFromFD(r),l=we.mmap(a,e,s,t,n),c=l.ptr;return T[i>>2]=l.allocated,I[o>>2]=c,0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,n,r,s,i){i=Ae(i);try{if(isNaN(i))return 61;var o=Se.getStreamFromFD(s);2&n&&Se.doMsync(e,o,t,r,i),we.munmap(o)}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:(e,t,n)=>{var r=(new Date).getFullYear(),s=new Date(r,0,1),i=new Date(r,6,1),o=s.getTimezoneOffset(),a=i.getTimezoneOffset(),l=Math.max(o,a);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}I[e>>2]=60*l,T[t>>2]=Number(o!=a);var _=c(s),u=c(i),d=Fe(_),f=Fe(u);a>2]=d,I[n+4>>2]=f):(I[n>>2]=f,I[n+4>>2]=d)},emscripten_date_now:()=>Date.now(),emscripten_get_now:me,emscripten_memcpy_js:(e,t,n)=>A.copyWithin(e,t,t+n),emscripten_resize_heap:e=>{var t=A.length;O((e>>>=0)>t);var n=2147483648;if(e>n)return w(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var r,s=1;s<=4;s*=2){var i=t*(1+.2/s);i=Math.min(i,e+100663296);var o=Math.min(n,(r=Math.max(e,i))+(65536-r%65536)%65536);if(Oe(o))return!0}return w(`Failed to grow the heap from ${t} bytes to ${o} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var n=0;return Le().forEach(((r,s)=>{var i=t+n;I[e+4*s>>2]=i,((e,t)=>{for(var n=0;n{var n=Le();I[e>>2]=n.length;var r=0;return n.forEach((e=>r+=e.length+1)),I[t>>2]=r,0},fd_close:function(e){try{var t=Se.getStreamFromFD(e);return we.close(t),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var n=Se.getStreamFromFD(e),r=n.tty?2:we.isDir(n.mode)?3:we.isLink(n.mode)?7:4;return S[0|t]=r,x[t+2>>1]=0,k[t+8>>3]=BigInt(0),k[t+16>>3]=BigInt(0),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){try{var s=((e,t,n,r)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=we.read(e,S,o,a,r);if(l<0)return-1;if(s+=l,l>2]=s,0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r){t=Ae(t);try{if(isNaN(t))return 61;var s=Se.getStreamFromFD(e);return we.llseek(s,t,n),k[r>>3]=BigInt(s.position),s.getdents&&0===t&&0===n&&(s.getdents=null),0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=Se.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?t.stream_ops.fsync(t):0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){try{var s=((e,t,n,r)=>{for(var s=0,i=0;i>2],a=I[t+4>>2];t+=8;var l=we.write(e,S,o,a,r);if(l<0)return-1;s+=l,void 0!==r&&(r+=l)}return s})(Se.getStreamFromFD(e),t,n);return I[r>>2]=s,0}catch(e){if(void 0===we||"ErrnoError"!==e.name)throw e;return e.errno}},memory:q},Re=function(){var e={env:De,wasi_snapshot_preview1:De};function t(e,t){var n;return n=(Re=e.exports).__wasm_call_ctors,D.unshift(n),Q("wasm-instantiate"),Re}H("wasm-instantiate");var n,r,o,a,l=i;if(i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),s(e)}return(n=y,r=V,o=e,a=function(e){O(i===l,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),l=null,t(e.instance)},n||"function"!=typeof WebAssembly.instantiateStreaming||K(r)||"function"!=typeof fetch?X(r,o,a):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),X(r,o,a)}))))).catch(s),{}}(),Me=(J("__wasm_call_ctors"),i._sqlite3_status64=J("sqlite3_status64"),i._sqlite3_status=J("sqlite3_status"),i._sqlite3_db_status=J("sqlite3_db_status"),i._sqlite3_msize=J("sqlite3_msize"),i._sqlite3_vfs_find=J("sqlite3_vfs_find"),i._sqlite3_initialize=J("sqlite3_initialize"),i._sqlite3_vfs_register=J("sqlite3_vfs_register"),i._sqlite3_vfs_unregister=J("sqlite3_vfs_unregister"),i._sqlite3_malloc=J("sqlite3_malloc"),i._sqlite3_malloc64=J("sqlite3_malloc64"),i._sqlite3_free=J("sqlite3_free"),i._sqlite3_realloc=J("sqlite3_realloc"),i._sqlite3_realloc64=J("sqlite3_realloc64"),i._sqlite3_value_int64=J("sqlite3_value_int64"),i._sqlite3_value_double=J("sqlite3_value_double"),i._sqlite3_value_text=J("sqlite3_value_text"),i._sqlite3_randomness=J("sqlite3_randomness"),i._sqlite3_stricmp=J("sqlite3_stricmp"),i._sqlite3_strnicmp=J("sqlite3_strnicmp"),J("__errno_location")),je=(i._sqlite3_serialize=J("sqlite3_serialize"),i._sqlite3_prepare_v2=J("sqlite3_prepare_v2"),i._sqlite3_step=J("sqlite3_step"),i._sqlite3_column_int64=J("sqlite3_column_int64"),i._sqlite3_column_int=J("sqlite3_column_int"),i._sqlite3_finalize=J("sqlite3_finalize"),i._sqlite3_file_control=J("sqlite3_file_control"),i._sqlite3_reset=J("sqlite3_reset"),i._sqlite3_value_int=J("sqlite3_value_int"),i._sqlite3_deserialize=J("sqlite3_deserialize"),i._sqlite3_clear_bindings=J("sqlite3_clear_bindings"),i._sqlite3_value_blob=J("sqlite3_value_blob"),i._sqlite3_value_bytes=J("sqlite3_value_bytes"),i._sqlite3_value_subtype=J("sqlite3_value_subtype"),i._sqlite3_value_pointer=J("sqlite3_value_pointer"),i._sqlite3_value_type=J("sqlite3_value_type"),i._sqlite3_value_nochange=J("sqlite3_value_nochange"),i._sqlite3_value_frombind=J("sqlite3_value_frombind"),i._sqlite3_value_dup=J("sqlite3_value_dup"),i._sqlite3_value_free=J("sqlite3_value_free"),i._sqlite3_result_blob=J("sqlite3_result_blob"),i._sqlite3_result_error_toobig=J("sqlite3_result_error_toobig"),i._sqlite3_result_error_nomem=J("sqlite3_result_error_nomem"),i._sqlite3_result_double=J("sqlite3_result_double"),i._sqlite3_result_error=J("sqlite3_result_error"),i._sqlite3_result_int=J("sqlite3_result_int"),i._sqlite3_result_int64=J("sqlite3_result_int64"),i._sqlite3_result_null=J("sqlite3_result_null"),i._sqlite3_result_pointer=J("sqlite3_result_pointer"),i._sqlite3_result_subtype=J("sqlite3_result_subtype"),i._sqlite3_result_text=J("sqlite3_result_text"),i._sqlite3_result_zeroblob=J("sqlite3_result_zeroblob"),i._sqlite3_result_zeroblob64=J("sqlite3_result_zeroblob64"),i._sqlite3_result_error_code=J("sqlite3_result_error_code"),i._sqlite3_sql=J("sqlite3_sql"),i._sqlite3_user_data=J("sqlite3_user_data"),i._sqlite3_context_db_handle=J("sqlite3_context_db_handle"),i._sqlite3_vtab_nochange=J("sqlite3_vtab_nochange"),i._sqlite3_vtab_in_first=J("sqlite3_vtab_in_first"),i._sqlite3_vtab_in_next=J("sqlite3_vtab_in_next"),i._sqlite3_aggregate_context=J("sqlite3_aggregate_context"),i._sqlite3_get_auxdata=J("sqlite3_get_auxdata"),i._sqlite3_set_auxdata=J("sqlite3_set_auxdata"),i._sqlite3_column_count=J("sqlite3_column_count"),i._sqlite3_data_count=J("sqlite3_data_count"),i._sqlite3_column_blob=J("sqlite3_column_blob"),i._sqlite3_column_bytes=J("sqlite3_column_bytes"),i._sqlite3_column_double=J("sqlite3_column_double"),i._sqlite3_column_text=J("sqlite3_column_text"),i._sqlite3_column_value=J("sqlite3_column_value"),i._sqlite3_column_type=J("sqlite3_column_type"),i._sqlite3_column_name=J("sqlite3_column_name"),i._sqlite3_bind_blob=J("sqlite3_bind_blob"),i._sqlite3_bind_double=J("sqlite3_bind_double"),i._sqlite3_bind_int=J("sqlite3_bind_int"),i._sqlite3_bind_int64=J("sqlite3_bind_int64"),i._sqlite3_bind_null=J("sqlite3_bind_null"),i._sqlite3_bind_pointer=J("sqlite3_bind_pointer"),i._sqlite3_bind_text=J("sqlite3_bind_text"),i._sqlite3_bind_parameter_count=J("sqlite3_bind_parameter_count"),i._sqlite3_bind_parameter_index=J("sqlite3_bind_parameter_index"),i._sqlite3_db_handle=J("sqlite3_db_handle"),i._sqlite3_stmt_readonly=J("sqlite3_stmt_readonly"),i._sqlite3_stmt_isexplain=J("sqlite3_stmt_isexplain"),i._sqlite3_stmt_status=J("sqlite3_stmt_status"),i._sqlite3_expanded_sql=J("sqlite3_expanded_sql"),i._sqlite3_preupdate_old=J("sqlite3_preupdate_old"),i._sqlite3_preupdate_count=J("sqlite3_preupdate_count"),i._sqlite3_preupdate_depth=J("sqlite3_preupdate_depth"),i._sqlite3_preupdate_blobwrite=J("sqlite3_preupdate_blobwrite"),i._sqlite3_preupdate_new=J("sqlite3_preupdate_new"),i._sqlite3_value_numeric_type=J("sqlite3_value_numeric_type"),i._sqlite3_errmsg=J("sqlite3_errmsg"),i._sqlite3_set_authorizer=J("sqlite3_set_authorizer"),i._sqlite3_strglob=J("sqlite3_strglob"),i._sqlite3_strlike=J("sqlite3_strlike"),i._sqlite3_exec=J("sqlite3_exec"),i._sqlite3_auto_extension=J("sqlite3_auto_extension"),i._sqlite3_cancel_auto_extension=J("sqlite3_cancel_auto_extension"),i._sqlite3_reset_auto_extension=J("sqlite3_reset_auto_extension"),i._sqlite3_prepare_v3=J("sqlite3_prepare_v3"),i._sqlite3_create_module=J("sqlite3_create_module"),i._sqlite3_create_module_v2=J("sqlite3_create_module_v2"),i._sqlite3_drop_modules=J("sqlite3_drop_modules"),i._sqlite3_declare_vtab=J("sqlite3_declare_vtab"),i._sqlite3_vtab_on_conflict=J("sqlite3_vtab_on_conflict"),i._sqlite3_vtab_collation=J("sqlite3_vtab_collation"),i._sqlite3_vtab_in=J("sqlite3_vtab_in"),i._sqlite3_vtab_rhs_value=J("sqlite3_vtab_rhs_value"),i._sqlite3_vtab_distinct=J("sqlite3_vtab_distinct"),i._sqlite3_keyword_name=J("sqlite3_keyword_name"),i._sqlite3_keyword_count=J("sqlite3_keyword_count"),i._sqlite3_keyword_check=J("sqlite3_keyword_check"),i._sqlite3_complete=J("sqlite3_complete"),i._sqlite3_libversion=J("sqlite3_libversion"),i._sqlite3_libversion_number=J("sqlite3_libversion_number"),i._sqlite3_shutdown=J("sqlite3_shutdown"),i._sqlite3_last_insert_rowid=J("sqlite3_last_insert_rowid"),i._sqlite3_set_last_insert_rowid=J("sqlite3_set_last_insert_rowid"),i._sqlite3_changes64=J("sqlite3_changes64"),i._sqlite3_changes=J("sqlite3_changes"),i._sqlite3_total_changes64=J("sqlite3_total_changes64"),i._sqlite3_total_changes=J("sqlite3_total_changes"),i._sqlite3_txn_state=J("sqlite3_txn_state"),i._sqlite3_close_v2=J("sqlite3_close_v2"),i._sqlite3_busy_handler=J("sqlite3_busy_handler"),i._sqlite3_progress_handler=J("sqlite3_progress_handler"),i._sqlite3_busy_timeout=J("sqlite3_busy_timeout"),i._sqlite3_create_function=J("sqlite3_create_function"),i._sqlite3_create_function_v2=J("sqlite3_create_function_v2"),i._sqlite3_create_window_function=J("sqlite3_create_window_function"),i._sqlite3_overload_function=J("sqlite3_overload_function"),i._sqlite3_trace_v2=J("sqlite3_trace_v2"),i._sqlite3_commit_hook=J("sqlite3_commit_hook"),i._sqlite3_update_hook=J("sqlite3_update_hook"),i._sqlite3_rollback_hook=J("sqlite3_rollback_hook"),i._sqlite3_preupdate_hook=J("sqlite3_preupdate_hook"),i._sqlite3_error_offset=J("sqlite3_error_offset"),i._sqlite3_errcode=J("sqlite3_errcode"),i._sqlite3_extended_errcode=J("sqlite3_extended_errcode"),i._sqlite3_errstr=J("sqlite3_errstr"),i._sqlite3_limit=J("sqlite3_limit"),i._sqlite3_open=J("sqlite3_open"),i._sqlite3_open_v2=J("sqlite3_open_v2"),i._sqlite3_create_collation=J("sqlite3_create_collation"),i._sqlite3_create_collation_v2=J("sqlite3_create_collation_v2"),i._sqlite3_collation_needed=J("sqlite3_collation_needed"),i._sqlite3_table_column_metadata=J("sqlite3_table_column_metadata"),i._sqlite3_extended_result_codes=J("sqlite3_extended_result_codes"),i._sqlite3_uri_parameter=J("sqlite3_uri_parameter"),i._sqlite3_uri_key=J("sqlite3_uri_key"),i._sqlite3_uri_boolean=J("sqlite3_uri_boolean"),i._sqlite3_uri_int64=J("sqlite3_uri_int64"),i._sqlite3_db_name=J("sqlite3_db_name"),i._sqlite3_db_filename=J("sqlite3_db_filename"),i._sqlite3_compileoption_used=J("sqlite3_compileoption_used"),i._sqlite3_compileoption_get=J("sqlite3_compileoption_get"),i._sqlite3session_diff=J("sqlite3session_diff"),i._sqlite3session_attach=J("sqlite3session_attach"),i._sqlite3session_create=J("sqlite3session_create"),i._sqlite3session_delete=J("sqlite3session_delete"),i._sqlite3session_table_filter=J("sqlite3session_table_filter"),i._sqlite3session_changeset=J("sqlite3session_changeset"),i._sqlite3session_changeset_strm=J("sqlite3session_changeset_strm"),i._sqlite3session_patchset_strm=J("sqlite3session_patchset_strm"),i._sqlite3session_patchset=J("sqlite3session_patchset"),i._sqlite3session_enable=J("sqlite3session_enable"),i._sqlite3session_indirect=J("sqlite3session_indirect"),i._sqlite3session_isempty=J("sqlite3session_isempty"),i._sqlite3session_memory_used=J("sqlite3session_memory_used"),i._sqlite3session_object_config=J("sqlite3session_object_config"),i._sqlite3session_changeset_size=J("sqlite3session_changeset_size"),i._sqlite3changeset_start=J("sqlite3changeset_start"),i._sqlite3changeset_start_v2=J("sqlite3changeset_start_v2"),i._sqlite3changeset_start_strm=J("sqlite3changeset_start_strm"),i._sqlite3changeset_start_v2_strm=J("sqlite3changeset_start_v2_strm"),i._sqlite3changeset_next=J("sqlite3changeset_next"),i._sqlite3changeset_op=J("sqlite3changeset_op"),i._sqlite3changeset_pk=J("sqlite3changeset_pk"),i._sqlite3changeset_old=J("sqlite3changeset_old"),i._sqlite3changeset_new=J("sqlite3changeset_new"),i._sqlite3changeset_conflict=J("sqlite3changeset_conflict"),i._sqlite3changeset_fk_conflicts=J("sqlite3changeset_fk_conflicts"),i._sqlite3changeset_finalize=J("sqlite3changeset_finalize"),i._sqlite3changeset_invert=J("sqlite3changeset_invert"),i._sqlite3changeset_invert_strm=J("sqlite3changeset_invert_strm"),i._sqlite3changeset_apply_v2=J("sqlite3changeset_apply_v2"),i._sqlite3changeset_apply=J("sqlite3changeset_apply"),i._sqlite3changeset_apply_v2_strm=J("sqlite3changeset_apply_v2_strm"),i._sqlite3changeset_apply_strm=J("sqlite3changeset_apply_strm"),i._sqlite3changegroup_new=J("sqlite3changegroup_new"),i._sqlite3changegroup_add=J("sqlite3changegroup_add"),i._sqlite3changegroup_output=J("sqlite3changegroup_output"),i._sqlite3changegroup_add_strm=J("sqlite3changegroup_add_strm"),i._sqlite3changegroup_output_strm=J("sqlite3changegroup_output_strm"),i._sqlite3changegroup_delete=J("sqlite3changegroup_delete"),i._sqlite3changeset_concat=J("sqlite3changeset_concat"),i._sqlite3changeset_concat_strm=J("sqlite3changeset_concat_strm"),i._sqlite3session_config=J("sqlite3session_config"),i._sqlite3_sourceid=J("sqlite3_sourceid"),i._sqlite3_wasm_pstack_ptr=J("sqlite3_wasm_pstack_ptr"),i._sqlite3_wasm_pstack_restore=J("sqlite3_wasm_pstack_restore"),i._sqlite3_wasm_pstack_alloc=J("sqlite3_wasm_pstack_alloc"),i._sqlite3_wasm_pstack_remaining=J("sqlite3_wasm_pstack_remaining"),i._sqlite3_wasm_pstack_quota=J("sqlite3_wasm_pstack_quota"),i._sqlite3_wasm_db_error=J("sqlite3_wasm_db_error"),i._sqlite3_wasm_test_struct=J("sqlite3_wasm_test_struct"),i._sqlite3_wasm_enum_json=J("sqlite3_wasm_enum_json"),i._sqlite3_wasm_vfs_unlink=J("sqlite3_wasm_vfs_unlink"),i._sqlite3_wasm_db_vfs=J("sqlite3_wasm_db_vfs"),i._sqlite3_wasm_db_reset=J("sqlite3_wasm_db_reset"),i._sqlite3_wasm_db_export_chunked=J("sqlite3_wasm_db_export_chunked"),i._sqlite3_wasm_db_serialize=J("sqlite3_wasm_db_serialize"),i._sqlite3_wasm_vfs_create_file=J("sqlite3_wasm_vfs_create_file"),i._sqlite3_wasm_posix_create_file=J("sqlite3_wasm_posix_create_file"),i._sqlite3_wasm_kvvfsMakeKeyOnPstack=J("sqlite3_wasm_kvvfsMakeKeyOnPstack"),i._sqlite3_wasm_kvvfs_methods=J("sqlite3_wasm_kvvfs_methods"),i._sqlite3_wasm_vtab_config=J("sqlite3_wasm_vtab_config"),i._sqlite3_wasm_db_config_ip=J("sqlite3_wasm_db_config_ip"),i._sqlite3_wasm_db_config_pii=J("sqlite3_wasm_db_config_pii"),i._sqlite3_wasm_db_config_s=J("sqlite3_wasm_db_config_s"),i._sqlite3_wasm_config_i=J("sqlite3_wasm_config_i"),i._sqlite3_wasm_config_ii=J("sqlite3_wasm_config_ii"),i._sqlite3_wasm_config_j=J("sqlite3_wasm_config_j"),i._sqlite3_wasm_init_wasmfs=J("sqlite3_wasm_init_wasmfs"),i._sqlite3_wasm_test_intptr=J("sqlite3_wasm_test_intptr"),i._sqlite3_wasm_test_voidptr=J("sqlite3_wasm_test_voidptr"),i._sqlite3_wasm_test_int64_max=J("sqlite3_wasm_test_int64_max"),i._sqlite3_wasm_test_int64_min=J("sqlite3_wasm_test_int64_min"),i._sqlite3_wasm_test_int64_times2=J("sqlite3_wasm_test_int64_times2"),i._sqlite3_wasm_test_int64_minmax=J("sqlite3_wasm_test_int64_minmax"),i._sqlite3_wasm_test_int64ptr=J("sqlite3_wasm_test_int64ptr"),i._sqlite3_wasm_test_stack_overflow=J("sqlite3_wasm_test_stack_overflow"),i._sqlite3_wasm_test_str_hello=J("sqlite3_wasm_test_str_hello"),i._sqlite3_wasm_SQLTester_strglob=J("sqlite3_wasm_SQLTester_strglob"),i._malloc=J("malloc")),Ue=(i._free=J("free"),i._realloc=J("realloc"),i._fflush=J("fflush")),Be=J("emscripten_builtin_memalign"),ze=()=>(ze=Re.emscripten_stack_init)(),We=()=>(We=Re.emscripten_stack_get_end)();function He(){function e(){Ne||(Ne=!0,i.calledRun=!0,F||(O(!M),M=!0,C(),i.noFSInit||we.init.initialized||we.init(),we.ignorePermissions=!1,he.init(),re(D),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(C(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),R.unshift(e);var e;re(R)}()))}var n;j>0||(ze(),O(!(3&(n=We()))),0==n&&(n+=4),I[n>>2]=34821223,I[n+4>>2]=2310721022,I[0]=1668509029,function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),N.unshift(e);var e;re(N)}(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e(),C()))}if(J("stackSave"),J("stackRestore"),J("stackAlloc"),i.wasmMemory=q,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","exitJS","arraySum","addDays","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","handleAllocatorInit","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","setMainLoop","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",n=e;n.startsWith("_")||(n="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+n+"')",ee(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ie(t)}}),ne(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createLazyFile","FS_createLink","FS_createDevice","FS_readFile","out","err","callMain","abort","keepRuntimeAlive","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","readI53FromI64","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","getExecutableName","asyncLoad","alignMemory","mmapAlloc","wasmTable","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToNewUTF8","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","ExitStatus","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS","FS_createDataFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack"].forEach(ne),B=function e(){Ne||He(),Ne||(B=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return He(),i.postRun||(i.postRun=[]),i.postRun.push((function(e){if(globalThis.sqlite3ApiBootstrap=function t(n=globalThis.sqlite3ApiConfig||t.defaultConfig){if(t.sqlite3)return console.warn("sqlite3ApiBootstrap() called multiple times.","Config and external initializers are ignored on calls after the first."),t.sqlite3;const r=Object.assign(Object.create(null),{exports:void 0,memory:void 0,bigIntEnabled:void 0!==e?!!e.HEAPU64:!!globalThis.BigInt64Array,debug:console.debug.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),log:console.log.bind(console),wasmfsOpfsDir:"/opfs",useStdAlloc:!1},n||{});Object.assign(r,{allocExportName:r.useStdAlloc?"malloc":"sqlite3_malloc",deallocExportName:r.useStdAlloc?"free":"sqlite3_free",reallocExportName:r.useStdAlloc?"realloc":"sqlite3_realloc"},r),["exports","memory","wasmfsOpfsDir"].forEach((e=>{"function"==typeof r[e]&&(r[e]=r[e]())}));const s=Object.create(null),i=Object.create(null),o=e=>s.sqlite3_js_rc_str&&s.sqlite3_js_rc_str(e)||"Unknown result code #"+e;class a extends Error{constructor(...e){let t;if(e.length)if("number"==typeof(n=e[0])&&n===(0|n))if(t=e[0],1===e.length)super(o(e[0]));else{const n=o(t);"object"==typeof e[1]?super(n,e[1]):(e[0]=n+":",super(e.join(" ")))}else 2===e.length&&"object"==typeof e[1]?super(...e):super(e.join(" "));var n;this.resultCode=t||s.SQLITE_ERROR,this.name="SQLite3Error"}}a.toss=(...e)=>{throw new a(...e)};const l=a.toss;r.wasmfsOpfsDir&&!/^\/[^/]+$/.test(r.wasmfsOpfsDir)&&l("config.wasmfsOpfsDir must be falsy or in the form '/dir-name'.");const c=e=>"bigint"!=typeof e&&!!(e===(0|e)&&e<=2147483647&&e>=-2147483648),_="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,u=e=>e.buffer instanceof _,d=(e,t,n)=>u(e)?e.slice(t,n):e.subarray(t,n),f=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),p=e=>e&&(e instanceof Uint8Array||e instanceof Int8Array||e instanceof ArrayBuffer),m=e=>f(e)||l("Value is not of a supported TypedArray type."),h=new TextDecoder("utf-8"),g=function(e,t,n){return h.decode(d(e,t,n))},b=function(e){return p(e)?g(e instanceof ArrayBuffer?new Uint8Array(e):e):Array.isArray(e)?e.join(""):(i.isPtr(e)&&(e=i.cstrToJs(e)),e)};class y extends Error{constructor(...e){2===e.length&&"object"==typeof e[1]?super(...e):e.length?super(e.join(" ")):super("Allocation failed."),this.resultCode=s.SQLITE_NOMEM,this.name="WasmAllocError"}}y.toss=(...e)=>{throw new y(...e)},Object.assign(s,{sqlite3_bind_blob:void 0,sqlite3_bind_text:void 0,sqlite3_create_function_v2:(e,t,n,r,s,i,o,a,l)=>{},sqlite3_create_function:(e,t,n,r,s,i,o,a)=>{},sqlite3_create_window_function:(e,t,n,r,s,i,o,a,l,c)=>{},sqlite3_prepare_v3:(e,t,n,r,s,i)=>{},sqlite3_prepare_v2:(e,t,n,r,s)=>{},sqlite3_exec:(e,t,n,r,s)=>{},sqlite3_randomness:(e,t)=>{}});const q={affirmBindableTypedArray:m,flexibleString:b,bigIntFits32:e=>e>=-2147483648n&&e<=0x7fffffffn,bigIntFits64:function e(t){return e._max||(e._max=BigInt("0x7fffffffffffffff"),e._min=~e._max),t>=e._min&&t<=e._max},bigIntFitsDouble:function e(t){return e._min||(e._min=Number.MIN_SAFE_INTEGER,e._max=Number.MAX_SAFE_INTEGER),t>=e._min&&t<=e._max},isBindableTypedArray:f,isInt32:c,isSQLableTypedArray:p,isTypedArray:e=>!!(e&&e.constructor&&c(e.constructor.BYTES_PER_ELEMENT))&&e,typedArrayToString:g,isUIThread:()=>globalThis.window===globalThis&&!!globalThis.document,isSharedTypedArray:u,toss:function(...e){throw new Error(e.join(" "))},toss3:l,typedArrayPart:d,affirmDbHeader:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));15>e.byteLength&&l("Input does not contain an SQLite3 database header.");for(let t=0;t<15;++t)"SQLite format 3".charCodeAt(t)!==e[t]&&l("Input does not contain an SQLite3 database header.")},affirmIsDb:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=e.byteLength;(t<512||t%512!=0)&&l("Byte array size",t,"is invalid for an SQLite3 db."),q.affirmDbHeader(e)}};Object.assign(i,{ptrSizeof:r.wasmPtrSizeof||4,ptrIR:r.wasmPtrIR||"i32",bigIntEnabled:!!r.bigIntEnabled,exports:r.exports||l("Missing API config.exports (WASM module exports)."),memory:r.memory||r.exports.memory||l("API config object requires a WebAssembly.Memory object","in either config.exports.memory (exported)","or config.memory (imported)."),alloc:void 0,realloc:void 0,dealloc:void 0}),i.allocFromTypedArray=function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e)),m(e);const t=i.alloc(e.byteLength||1);return i.heapForSize(e.constructor).set(e.byteLength?e:[0],t),t};{const e=r.allocExportName,t=r.deallocExportName,n=r.reallocExportName;for(const r of[e,t,n])i.exports[r]instanceof Function||l("Missing required exports[",r,"] function.");i.alloc=function e(t){return e.impl(t)||y.toss("Failed to allocate",t," bytes.")},i.alloc.impl=i.exports[e],i.realloc=function e(t,n){const r=e.impl(t,n);return n?r||y.toss("Failed to reallocate",n," bytes."):0},i.realloc.impl=i.exports[n],i.dealloc=i.exports[t]}let E;if(i.compileOptionUsed=function e(t){if(!arguments.length){if(e._result)return e._result;e._opt||(e._rx=/^([^=]+)=(.+)/,e._rxInt=/^-?\d+$/,e._opt=function(t,n){const r=e._rx.exec(t);n[0]=r?r[1]:t,n[1]=!r||(e._rxInt.test(r[2])?+r[2]:r[2])});const t={},n=[0,0];let r,i=0;for(;r=s.sqlite3_compileoption_get(i++);)e._opt(r,n),t[n[0]]=n[1];return e._result=t}if(Array.isArray(t)){const e={};return t.forEach((t=>{e[t]=s.sqlite3_compileoption_used(t)})),e}return"object"==typeof t?(Object.keys(t).forEach((e=>{t[e]=s.sqlite3_compileoption_used(e)})),t):"string"==typeof t&&!!s.sqlite3_compileoption_used(t)},i.pstack=Object.assign(Object.create(null),{restore:i.exports.sqlite3_wasm_pstack_restore,alloc:function(e){return"string"!=typeof e||(e=i.sizeofIR(e))||y.toss("Invalid value for pstack.alloc(",arguments[0],")"),i.exports.sqlite3_wasm_pstack_alloc(e)||y.toss("Could not allocate",e,"bytes from the pstack.")},allocChunks:function(e,t){"string"!=typeof t||(t=i.sizeofIR(t))||y.toss("Invalid size value for allocChunks(",arguments[1],")");const n=i.pstack.alloc(e*t),r=[];let s=0,o=0;for(;s1===e?i.pstack.alloc(t?8:i.ptrSizeof):i.pstack.allocChunks(e,t?8:i.ptrSizeof),call:function(e){const t=i.pstack.pointer;try{return e(S)}finally{i.pstack.restore(t)}}}),Object.defineProperties(i.pstack,{pointer:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_ptr},quota:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_quota},remaining:{configurable:!1,iterable:!0,writeable:!1,get:i.exports.sqlite3_wasm_pstack_remaining}}),s.sqlite3_randomness=(...e)=>{if(1===e.length&&q.isTypedArray(e[0])&&1===e[0].BYTES_PER_ELEMENT){const t=e[0];if(0===t.byteLength)return i.exports.sqlite3_randomness(0,0),t;const n=i.pstack.pointer;try{let e=t.byteLength,n=0;const r=i.exports.sqlite3_randomness,s=i.heap8u(),o=e<512?e:512,a=i.pstack.alloc(o);do{const i=e>o?o:e;r(i,a),t.set(d(s,a,a+i),n),e-=i,n+=i}while(e>0)}catch(e){console.error("Highly unexpected (and ignored!) exception in sqlite3_randomness():",e)}finally{i.pstack.restore(n)}return t}i.exports.sqlite3_randomness(...e)},s.sqlite3_wasmfs_opfs_dir=function(){if(void 0!==E)return E;const e=r.wasmfsOpfsDir;if(!(e&&globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle))return E="";try{return E=e&&0===i.xCallWrapped("sqlite3_wasm_init_wasmfs","i32",["string"],e)?e:""}catch(e){return E=""}},s.sqlite3_wasmfs_filename_is_persistent=function(e){const t=s.sqlite3_wasmfs_opfs_dir();return!(!t||!e)&&e.startsWith(t+"/")},s.sqlite3_js_db_uses_vfs=function(e,t,n=0){try{const r=s.sqlite3_vfs_find(t);return!!r&&(e?r===s.sqlite3_js_db_vfs(e,n)&&r:r===s.sqlite3_vfs_find(0)&&r)}catch(e){return!1}},s.sqlite3_js_vfs_list=function(){const e=[];let t=s.sqlite3_vfs_find(0);for(;t;){const n=new s.sqlite3_vfs(t);e.push(i.cstrToJs(n.$zName)),t=n.$pNext,n.dispose()}return e},s.sqlite3_js_db_export=function(e,t=0){(e=i.xWrap.testConvertArg("sqlite3*",e))||l("Invalid sqlite3* argument."),i.bigIntEnabled||l("BigInt64 support is not enabled.");const n=i.scopedAllocPush();let r;try{const n=i.scopedAlloc(8+i.ptrSizeof),s=n+8,o=t?i.isPtr(t)?t:i.scopedAllocCString(""+t):0;let a=i.exports.sqlite3_wasm_db_serialize(e,o,s,n,0);a&&l("Database serialization failed with code",S.capi.sqlite3_js_rc_str(a)),r=i.peekPtr(s);const c=i.peek(n,"i64");return a=c?i.heap8u().slice(r,r+Number(c)):new Uint8Array,a}finally{r&&i.exports.sqlite3_free(r),i.scopedAllocPop(n)}},s.sqlite3_js_db_vfs=(e,t=0)=>i.sqlite3_wasm_db_vfs(e,t),s.sqlite3_js_aggregate_context=(e,t)=>s.sqlite3_aggregate_context(e,t)||(t?y.toss("Cannot allocate",t,"bytes for sqlite3_aggregate_context()"):0),s.sqlite3_js_posix_create_file=function(e,t,n){let r;t&&i.isPtr(t)?r=t:t instanceof ArrayBuffer||t instanceof Uint8Array?(r=i.allocFromTypedArray(t),(arguments.length<3||!q.isInt32(n)||n<0)&&(n=t.byteLength)):a.toss("Invalid 2nd argument for sqlite3_js_posix_create_file().");try{(!q.isInt32(n)||n<0)&&a.toss("Invalid 3rd argument for sqlite3_js_posix_create_file().");const t=i.sqlite3_wasm_posix_create_file(e,r,n);t&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(t))}finally{i.dealloc(r)}},s.sqlite3_js_vfs_create_file=function(e,t,n,o){let l;r.warn("sqlite3_js_vfs_create_file() is deprecated and","should be avoided because it can lead to C-level crashes.","See its documentation for alternative options."),n?(i.isPtr(n)?l=n:n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array?(l=i.allocFromTypedArray(n),(arguments.length<4||!q.isInt32(o)||o<0)&&(o=n.byteLength)):a.toss("Invalid 3rd argument type for sqlite3_js_vfs_create_file().")):l=0,(!q.isInt32(o)||o<0)&&(i.dealloc(l),a.toss("Invalid 4th argument for sqlite3_js_vfs_create_file()."));try{const n=i.sqlite3_wasm_vfs_create_file(e,t,l,o);n&&a.toss("Creation of file failed with sqlite3 result code",s.sqlite3_js_rc_str(n))}finally{i.dealloc(l)}},s.sqlite3_js_sql_to_string=e=>{if("string"==typeof e)return e;const t=b(v);return t===v?void 0:t},q.isUIThread()){const e=function(e){const t=Object.create(null);return t.prefix="kvvfs-"+e,t.stores=[],"session"!==e&&""!==e||t.stores.push(globalThis.sessionStorage),"local"!==e&&""!==e||t.stores.push(globalThis.localStorage),t};s.sqlite3_js_kvvfs_clear=function(t=""){let n=0;const r=e(t);return r.stores.forEach((e=>{const t=[];let s;for(s=0;se.removeItem(t))),n+=t.length})),n},s.sqlite3_js_kvvfs_size=function(t=""){let n=0;const r=e(t);return r.stores.forEach((e=>{let t;for(t=0;tw(e,t,"sqlite3_preupdate_new"),s.sqlite3_preupdate_old_js=(e,t)=>w(e,t,"sqlite3_preupdate_old"),s.sqlite3changeset_new_js=(e,t)=>w(e,t,"sqlite3changeset_new"),s.sqlite3changeset_old_js=(e,t)=>w(e,t,"sqlite3changeset_old");const S={WasmAllocError:y,SQLite3Error:a,capi:s,util:q,wasm:i,config:r,version:Object.create(null),client:void 0,asyncPostInit:async function e(){if(e.isReady instanceof Promise)return e.isReady;let n=t.initializersAsync;delete t.initializersAsync;const s=async()=>(S.__isUnderTest||(delete S.util,delete S.StructBinder),S),i=e=>{throw r.error("an async sqlite3 initializer failed:",e),e};if(!n||!n.length)return e.isReady=s().catch(i);n=n.map((e=>e instanceof Function?async t=>e(S):e)),n.push(s);let o=Promise.resolve(S);for(;n.length;)o=o.then(n.shift());return e.isReady=o.catch(i)},scriptInfo:void 0};try{t.initializers.forEach((e=>{e(S)}))}catch(e){throw console.error("sqlite3 bootstrap initializer threw:",e),e}return delete t.initializers,t.sqlite3=S,S},globalThis.sqlite3ApiBootstrap.initializers=[],globalThis.sqlite3ApiBootstrap.initializersAsync=[],globalThis.sqlite3ApiBootstrap.defaultConfig=Object.create(null),globalThis.sqlite3ApiBootstrap.sqlite3=void 0,globalThis.WhWasmUtilInstaller=function(e){void 0===e.bigIntEnabled&&(e.bigIntEnabled=!!globalThis.BigInt64Array);const t=(...e)=>{throw new Error(e.join(" "))};e.exports||Object.defineProperty(e,"exports",{enumerable:!0,configurable:!0,get:()=>e.instance&&e.instance.exports});const n=e.pointerIR||"i32",r=e.ptrSizeof="i32"===n?4:"i64"===n?8:t("Unhandled ptrSizeof:",n),s=Object.create(null);s.heapSize=0,s.memory=null,s.freeFuncIndexes=[],s.scopedAlloc=[],s.utf8Decoder=new TextDecoder,s.utf8Encoder=new TextEncoder("utf-8"),e.sizeofIR=e=>{switch(e){case"i8":return 1;case"i16":return 2;case"i32":case"f32":case"float":return 4;case"i64":case"f64":case"double":return 8;case"*":return r;default:return(""+e).endsWith("*")?r:void 0}};const i=function(){if(s.memory){if(s.heapSize===s.memory.buffer.byteLength)return s}else s.memory=e.memory instanceof WebAssembly.Memory?e.memory:e.exports.memory;const t=s.memory.buffer;return s.HEAP8=new Int8Array(t),s.HEAP8U=new Uint8Array(t),s.HEAP16=new Int16Array(t),s.HEAP16U=new Uint16Array(t),s.HEAP32=new Int32Array(t),s.HEAP32U=new Uint32Array(t),e.bigIntEnabled&&(s.HEAP64=new BigInt64Array(t),s.HEAP64U=new BigUint64Array(t)),s.HEAP32F=new Float32Array(t),s.HEAP64F=new Float64Array(t),s.heapSize=t.byteLength,s};e.heap8=()=>i().HEAP8,e.heap8u=()=>i().HEAP8U,e.heap16=()=>i().HEAP16,e.heap16u=()=>i().HEAP16U,e.heap32=()=>i().HEAP32,e.heap32u=()=>i().HEAP32U,e.heapForSize=function(n,r=!0){const o=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();switch(n){case Int8Array:return o.HEAP8;case Uint8Array:return o.HEAP8U;case Int16Array:return o.HEAP16;case Uint16Array:return o.HEAP16U;case Int32Array:return o.HEAP32;case Uint32Array:return o.HEAP32U;case 8:return r?o.HEAP8U:o.HEAP8;case 16:return r?o.HEAP16U:o.HEAP16;case 32:return r?o.HEAP32U:o.HEAP32;case 64:if(o.HEAP64)return r?o.HEAP64U:o.HEAP64;break;default:if(e.bigIntEnabled){if(n===globalThis.BigUint64Array)return o.HEAP64U;if(n===globalThis.BigInt64Array)return o.HEAP64;break}}t("Invalid heapForSize() size: expecting 8, 16, 32,","or (if BigInt is enabled) 64.")},e.functionTable=function(){return e.exports.__indirect_function_table},e.functionEntry=function(t){const n=e.functionTable();return t>7)},rxJSig:/^(\w)\((\w*)\)$/,sigParams:function(t){const n=e._.rxJSig.exec(t);return n?n[2]:t.substr(1)},letterType:n=>e._.sigTypes[n]||t("Invalid signature letter:",n),pushSigType:(t,n)=>t.push(e._.typeCodes[e._.letterType(n)])}),"string"==typeof n){const e=r;r=n,n=e}const s=e._.sigParams(r),i=[1,96];e._.uleb128Encode(i,"push",s.length);for(const t of s)e._.pushSigType(i,t);return"v"===r[0]?i.push(0):(i.push(1),e._.pushSigType(i,r[0])),e._.uleb128Encode(i,"unshift",i.length),i.unshift(0,97,115,109,1,0,0,0,1),i.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array(i)),{e:{f:n}}).exports.f};const o=function(n,r,i){if(i&&!s.scopedAlloc.length&&t("No scopedAllocPush() scope is active."),"string"==typeof n){const e=r;r=n,n=e}"string"==typeof r&&n instanceof Function||t("Invalid arguments: expecting (function,signature) or (signature,function).");const o=e.functionTable(),a=o.length;let l;for(;s.freeFuncIndexes.length&&(l=s.freeFuncIndexes.pop(),o.get(l));)l=null;l||(l=a,o.grow(1));try{return o.set(l,n),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l),l}catch(e){if(!(e instanceof TypeError))throw l===a&&s.freeFuncIndexes.push(a),e}try{const t=e.jsFuncToWasm(n,r);o.set(l,t),i&&s.scopedAlloc[s.scopedAlloc.length-1].push(l)}catch(e){throw l===a&&s.freeFuncIndexes.push(a),e}return l};e.installFunction=(e,t)=>o(e,t,!1),e.scopedInstallFunction=(e,t)=>o(e,t,!0),e.uninstallFunction=function(t){if(!t&&0!==t)return;const n=s.freeFuncIndexes,r=e.functionTable();n.push(t);const i=r.get(t);return r.set(t,null),i},e.peek=function(r,o="i8"){o.endsWith("*")&&(o=n);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i(),l=Array.isArray(r)?[]:void 0;let c;do{switch(l&&(r=arguments[0].shift()),o){case"i1":case"i8":c=a.HEAP8[0|r];break;case"i16":c=a.HEAP16[r>>1];break;case"i32":c=a.HEAP32[r>>2];break;case"float":case"f32":c=a.HEAP32F[r>>2];break;case"double":case"f64":c=Number(a.HEAP64F[r>>3]);break;case"i64":if(e.bigIntEnabled){c=BigInt(a.HEAP64[r>>3]);break}default:t("Invalid type for peek():",o)}l&&l.push(c)}while(l&&arguments[0].length);return l||c},e.poke=function(e,r,o="i8"){o.endsWith("*")&&(o=n);const a=s.memory&&s.heapSize===s.memory.buffer.byteLength?s:i();for(const n of Array.isArray(e)?e:[e])switch(o){case"i1":case"i8":a.HEAP8[0|n]=r;continue;case"i16":a.HEAP16[n>>1]=r;continue;case"i32":a.HEAP32[n>>2]=r;continue;case"float":case"f32":a.HEAP32F[n>>2]=r;continue;case"double":case"f64":a.HEAP64F[n>>3]=r;continue;case"i64":if(a.HEAP64){a.HEAP64[n>>3]=BigInt(r);continue}default:t("Invalid type for poke(): "+o)}return this},e.peekPtr=(...t)=>e.peek(1===t.length?t[0]:t,n),e.pokePtr=(t,r=0)=>e.poke(t,r,n),e.peek8=(...t)=>e.peek(1===t.length?t[0]:t,"i8"),e.poke8=(t,n)=>e.poke(t,n,"i8"),e.peek16=(...t)=>e.peek(1===t.length?t[0]:t,"i16"),e.poke16=(t,n)=>e.poke(t,n,"i16"),e.peek32=(...t)=>e.peek(1===t.length?t[0]:t,"i32"),e.poke32=(t,n)=>e.poke(t,n,"i32"),e.peek64=(...t)=>e.peek(1===t.length?t[0]:t,"i64"),e.poke64=(t,n)=>e.poke(t,n,"i64"),e.peek32f=(...t)=>e.peek(1===t.length?t[0]:t,"f32"),e.poke32f=(t,n)=>e.poke(t,n,"f32"),e.peek64f=(...t)=>e.peek(1===t.length?t[0]:t,"f64"),e.poke64f=(t,n)=>e.poke(t,n,"f64"),e.getMemValue=e.peek,e.getPtrValue=e.peekPtr,e.setMemValue=e.poke,e.setPtrValue=e.pokePtr,e.isPtr32=e=>"number"==typeof e&&e===(0|e)&&e>=0,e.isPtr=e.isPtr32,e.cstrlen=function(t){if(!t||!e.isPtr(t))return null;const n=i().HEAP8U;let r=t;for(;0!==n[r];++r);return r-t};const a="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer;e.cstrToJs=function(t){const n=e.cstrlen(t);return n?(r=i().HEAP8U,o=t,l=t+n,s.utf8Decoder.decode(r.buffer instanceof a?r.slice(o,l):r.subarray(o,l))):null===n?n:"";var r,o,l},e.jstrlen=function(e){if("string"!=typeof e)return null;const t=e.length;let n=0;for(let r=0;r=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++r)),t<=127?++n:n+=t<=2047?2:t<=65535?3:4}return n},e.jstrcpy=function(e,n,r=0,s=-1,i=!0){if(n&&(n instanceof Int8Array||n instanceof Uint8Array)||t("jstrcpy() target must be an Int8Array or Uint8Array."),s<0&&(s=n.length-r),!(s>0&&r>=0))return 0;let o=0,a=e.length;const l=r,c=r+s-(i?1:0);for(;o=55296&&t<=57343&&(t=65536+((1023&t)<<10)|1023&e.charCodeAt(++o)),t<=127){if(r>=c)break;n[r++]=t}else if(t<=2047){if(r+1>=c)break;n[r++]=192|t>>6,n[r++]=128|63&t}else if(t<=65535){if(r+2>=c)break;n[r++]=224|t>>12,n[r++]=128|t>>6&63,n[r++]=128|63&t}else{if(r+3>=c)break;n[r++]=240|t>>18,n[r++]=128|t>>12&63,n[r++]=128|t>>6&63,n[r++]=128|63&t}}return i&&(n[r++]=0),r-l},e.cstrncpy=function(n,r,s){if(n&&r||t("cstrncpy() does not accept NULL strings."),s<0)s=e.cstrlen(strPtr)+1;else if(!(s>0))return 0;const i=e.heap8u();let o,a=0;for(;as.utf8Encoder.encode(t?e+"\0":e);const l=(e,n)=>{e.alloc instanceof Function&&e.dealloc instanceof Function||t("Object is missing alloc() and/or dealloc() function(s)","required by",n+"().")},c=function(t,n,r,o){if(l(e,o),"string"!=typeof t)return null;{const e=s.utf8Encoder.encode(t),o=r(e.length+1),a=i().HEAP8U;return a.set(e,o),a[o+e.length]=0,n?[o,e.length]:o}};e.allocCString=(t,n=!1)=>c(t,n,e.alloc,"allocCString()"),e.scopedAllocPush=function(){l(e,"scopedAllocPush");const t=[];return s.scopedAlloc.push(t),t},e.scopedAllocPop=function(n){l(e,"scopedAllocPop");const r=arguments.length?s.scopedAlloc.indexOf(n):s.scopedAlloc.length-1;r<0&&t("Invalid state object for scopedAllocPop()."),0===arguments.length&&(n=s.scopedAlloc[r]),s.scopedAlloc.splice(r,1);for(let t;t=n.pop();)e.functionEntry(t)?e.uninstallFunction(t):e.dealloc(t)},e.scopedAlloc=function(n){s.scopedAlloc.length||t("No scopedAllocPush() scope is active.");const r=e.alloc(n);return s.scopedAlloc[s.scopedAlloc.length-1].push(r),r},Object.defineProperty(e.scopedAlloc,"level",{configurable:!1,enumerable:!1,get:()=>s.scopedAlloc.length,set:()=>t("The 'active' property is read-only.")}),e.scopedAllocCString=(t,n=!1)=>c(t,n,e.scopedAlloc,"scopedAllocCString()");const _=function(t,n){const r=e[t?"scopedAlloc":"alloc"]((n.length+1)*e.ptrSizeof);let s=0;return n.forEach((n=>{e.pokePtr(r+e.ptrSizeof*s++,e[t?"scopedAllocCString":"allocCString"](""+n))})),e.pokePtr(r+e.ptrSizeof*s,0),r};e.scopedAllocMainArgv=e=>_(!0,e),e.allocMainArgv=e=>_(!1,e),e.cArgvToJs=(t,n)=>{const r=[];for(let s=0;su(e,t,"alloc"),e.scopedAllocPtr=(e=1,t=!0)=>u(e,t,"scopedAlloc"),e.xGet=function(n){return e.exports[n]||t("Cannot find exported symbol:",n)};const d=(e,n)=>t(e+"() requires",n,"argument(s).");e.xCall=function(n,...r){const s=e.xGet(n);return s instanceof Function||t("Exported symbol",n,"is not a function."),s.length!==r.length&&d(n,s.length),2===arguments.length&&Array.isArray(arguments[1])?s.apply(null,arguments[1]):s.apply(null,r)},s.xWrap=Object.create(null),s.xWrap.convert=Object.create(null),s.xWrap.convert.arg=new Map,s.xWrap.convert.result=new Map;const f=s.xWrap.convert.arg,p=s.xWrap.convert.result;e.bigIntEnabled&&f.set("i64",(e=>BigInt(e)));const m="i32"===n?e=>0|e:e=>BigInt(e)|BigInt(0);f.set("i32",m).set("i16",(e=>65535&e)).set("i8",(e=>255&e)).set("f32",(e=>Number(e).valueOf())).set("float",f.get("f32")).set("f64",f.get("f32")).set("double",f.get("f64")).set("int",f.get("i32")).set("null",(e=>e)).set(null,f.get("null")).set("**",m).set("*",m),p.set("*",m).set("pointer",m).set("number",(e=>Number(e))).set("void",(e=>{})).set("null",(e=>e)).set(null,p.get("null"));{const r=["i8","i16","i32","int","f32","float","f64","double"];e.bigIntEnabled&&r.push("i64");const s=f.get(n);for(const e of r)f.set(e+"*",s),p.set(e+"*",s),p.set(e,f.get(e)||t("Missing arg converter:",e))}const h=function(t){return"string"==typeof t?e.scopedAllocCString(t):t?m(t):null};f.set("string",h).set("utf8",h).set("pointer",h),p.set("string",(t=>e.cstrToJs(t))).set("utf8",p.get("string")).set("string:dealloc",(t=>{try{return t?e.cstrToJs(t):null}finally{e.dealloc(t)}})).set("utf8:dealloc",p.get("string:dealloc")).set("json",(t=>JSON.parse(e.cstrToJs(t)))).set("json:dealloc",(t=>{try{return t?JSON.parse(e.cstrToJs(t)):null}finally{e.dealloc(t)}}));const g=class{constructor(e){this.name=e.name||"unnamed adapter"}convertArg(e,n,r){t("AbstractArgAdapter must be subclassed.")}};f.FuncPtrAdapter=class n extends g{constructor(e){super(e),f.FuncPtrAdapter.warnOnUse&&console.warn("xArg.FuncPtrAdapter is an internal-only API","and is not intended to be invoked from","client-level code. Invoked with:",e),this.name=e.name||"unnamed",this.signature=e.signature,e.contextKey instanceof Function&&(this.contextKey=e.contextKey,e.bindScope||(e.bindScope="context")),this.bindScope=e.bindScope||t("FuncPtrAdapter options requires a bindScope (explicit or implied)."),n.bindScopes.indexOf(e.bindScope)<0&&t("Invalid options.bindScope ("+e.bindMod+") for FuncPtrAdapter. Expecting one of: ("+n.bindScopes.join(", ")+")"),this.isTransient="transient"===this.bindScope,this.isContext="context"===this.bindScope,this.isPermanent="permanent"===this.bindScope,this.singleton="singleton"===this.bindScope?[]:void 0,this.callProxy=e.callProxy instanceof Function?e.callProxy:void 0}contextKey(e,t){return this}contextMap(e){const t=this.__cmap||(this.__cmap=new Map);let n=t.get(e);return void 0===n&&t.set(e,n=[]),n}convertArg(t,r,i){let a=this.singleton;if(!a&&this.isContext&&(a=this.contextMap(this.contextKey(r,i))),a&&a[0]===t)return a[1];if(t instanceof Function){this.callProxy&&(t=this.callProxy(t));const e=o(t,this.signature,this.isTransient);if(n.debugFuncInstall&&n.debugOut("FuncPtrAdapter installed",this,this.contextKey(r,i),"@"+e,t),a){if(a[1]){n.debugFuncInstall&&n.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(r,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}}a[0]=t,a[1]=e}return e}if(e.isPtr(t)||null==t){if(a&&a[1]&&a[1]!==t){n.debugFuncInstall&&n.debugOut("FuncPtrAdapter uninstalling",this,this.contextKey(r,i),"@"+a[1],t);try{s.scopedAlloc[s.scopedAlloc.length-1].push(a[1])}catch(e){}a[0]=a[1]=0|t}return t||0}throw new TypeError("Invalid FuncPtrAdapter argument type. Expecting a function pointer or a "+(this.name?this.name+" ":"")+"function matching signature "+this.signature+".")}},f.FuncPtrAdapter.warnOnUse=!1,f.FuncPtrAdapter.debugFuncInstall=!1,f.FuncPtrAdapter.debugOut=console.debug.bind(console),f.FuncPtrAdapter.bindScopes=["transient","context","singleton","permanent"];const b=e=>f.get(e)||t("Argument adapter not found:",e),y=e=>p.get(e)||t("Result adapter not found:",e);s.xWrap.convertArg=(e,...t)=>b(e)(...t),s.xWrap.convertArgNoCheck=(e,...t)=>f.get(e)(...t),s.xWrap.convertResult=(e,t)=>null===e?t:e?y(e)(t):void 0,s.xWrap.convertResultNoCheck=(e,t)=>null===e?t:e?p.get(e)(t):void 0,e.xWrap=function(n,r,...i){3===arguments.length&&Array.isArray(arguments[2])&&(i=arguments[2]),e.isPtr(n)&&(n=e.functionEntry(n)||t("Function pointer not found in WASM function table."));const o=n instanceof Function,a=o?n:e.xGet(n);if(o&&(n=a.name||"unnamed function"),i.length!==a.length&&d(n,a.length),null===r&&0===a.length)return a;null!=r&&y(r);for(const e of i)e instanceof g?f.set(e,((...t)=>e.convertArg(...t))):b(e);const l=s.xWrap;return 0===a.length?(...e)=>e.length?d(n,a.length):l.convertResult(r,a.call(null)):function(...t){t.length!==a.length&&d(n,a.length);const s=e.scopedAllocPush();try{for(const e in t)t[e]=l.convertArgNoCheck(i[e],t[e],t,e);return l.convertResultNoCheck(r,a.apply(null,t))}finally{e.scopedAllocPop(s)}}};const q=function(e,n,r,s,i,o){if("string"==typeof r){if(1===n)return o.get(r);if(2===n)return s?(s instanceof Function||t(i,"requires a function argument."),o.set(r,s),e):(o.get(r),e)}t("Invalid arguments to",i)};return e.xWrap.resultAdapter=function e(t,n){return q(e,arguments.length,t,n,"resultAdapter()",p)},e.xWrap.argAdapter=function e(t,n){return q(e,arguments.length,t,n,"argAdapter()",f)},e.xWrap.FuncPtrAdapter=f.FuncPtrAdapter,e.xCallWrapped=function(t,n,r,...s){return Array.isArray(arguments[3])&&(s=arguments[3]),e.xWrap(t,n,r||[]).apply(null,s||[])},e.xWrap.testConvertArg=s.xWrap.convertArg,e.xWrap.testConvertResult=s.xWrap.convertResult,e},globalThis.WhWasmUtilInstaller.yawl=function(e){const t=()=>fetch(e.uri,{credentials:"same-origin"}),n=this,r=function(t){if(e.wasmUtilTarget){const r=(...e)=>{throw new Error(e.join(" "))},s=e.wasmUtilTarget;if(s.module=t.module,s.instance=t.instance,s.instance.exports.memory||(s.memory=e.imports&&e.imports.env&&e.imports.env.memory||r("Missing 'memory' object!")),!s.alloc&&t.instance.exports.malloc){const e=t.instance.exports;s.alloc=function(t){return e.malloc(t)||r("Allocation of",t,"bytes failed.")},s.dealloc=function(t){e.free(t)}}n(s)}return e.onload&&e.onload(t,e),t};return WebAssembly.instantiateStreaming?function(){return WebAssembly.instantiateStreaming(t(),e.imports||{}).then(r)}:function(){return t().then((e=>e.arrayBuffer())).then((t=>WebAssembly.instantiate(t,e.imports||{}))).then(r)}}.bind(globalThis.WhWasmUtilInstaller),globalThis.Jaccwabyt=function e(t){const n=(...e)=>{throw new Error(e.join(" "))};t.heap instanceof WebAssembly.Memory||t.heap instanceof Function||n("config.heap must be WebAssembly.Memory instance or a function."),["alloc","dealloc"].forEach((function(e){t[e]instanceof Function||n("Config option '"+e+"' must be a function.")}));const r=e,s=t.heap instanceof Function?t.heap:()=>new Uint8Array(t.heap.buffer),i=t.alloc,o=t.dealloc,a=t.log||console.log.bind(console),l=t.memberPrefix||"",c=t.memberSuffix||"",_=void 0===t.bigIntEnabled?!!globalThis.BigInt64Array:!!t.bigIntEnabled,u=globalThis.BigInt,d=globalThis.BigInt64Array,f=t.ptrSizeof||4,p=t.ptrIR||"i32";r.debugFlags||(r.__makeDebugFlags=function(e=null){e&&e.__flags&&(e=e.__flags);const t=function e(t){return 0===arguments.length?e.__flags:(t<0?(delete e.__flags.getter,delete e.__flags.setter,delete e.__flags.alloc,delete e.__flags.dealloc):(e.__flags.getter=!!(1&t),e.__flags.setter=!!(2&t),e.__flags.alloc=!!(4&t),e.__flags.dealloc=!!(8&t)),e._flags)};return Object.defineProperty(t,"__flags",{iterable:!1,writable:!1,value:Object.create(e)}),e||t(0),t},r.debugFlags=r.__makeDebugFlags());const m=function(){const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),h=e=>(e=>"("===e[1])(e)?"p":e[0],g=function(e){switch(h(e)){case"c":case"C":return"i8";case"i":return"i32";case"p":case"P":case"s":return p;case"j":return"i64";case"f":return"float";case"d":return"double"}n("Unhandled signature IR:",e)},b=d?()=>!0:()=>n("BigInt64Array is not available."),y=(e,t)=>e+"::"+t,q=new WeakMap,E="(pointer-is-external)",v=function(e,t,n){if(n||(n=q.get(t)),n){if(q.delete(t),Array.isArray(t.ondispose)){let r;for(;r=t.ondispose.shift();)try{r instanceof Function?r.call(t):r instanceof D?r.dispose():"number"==typeof r&&o(r)}catch(t){console.warn("ondispose() for",e.structName,"@",n,"threw. NOT propagating it.",t)}}else if(t.ondispose instanceof Function)try{t.ondispose()}catch(t){console.warn("ondispose() for",e.structName,"@",n,"threw. NOT propagating it.",t)}delete t.ondispose,e.debugFlags.__flags.dealloc&&a("debug.dealloc:",t[E]?"EXTERNAL":"",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+n),t[E]||o(n)}},w=e=>({configurable:!1,writable:!1,iterable:!1,value:e}),S=function(e,t,r){let o=!r;r?Object.defineProperty(t,E,w(r)):(r=i(e.structInfo.sizeof))||n("Allocation of",e.structName,"structure failed.");try{e.debugFlags.__flags.alloc&&a("debug.alloc:",o?"":"EXTERNAL",e.structName,"instance:",e.structInfo.sizeof,"bytes @"+r),o&&s().fill(0,r,r+e.structInfo.sizeof),q.set(t,r)}catch(n){throw v(e,t,r),n}},A=w((e=>l+e+c)),x=function(e,t,r=!0){let s=e.members[t];if(!s&&(l||c)){for(const n of Object.values(e.members))if(n.key===t){s=n;break}!s&&r&&n(y(e.name,t),"is not a mapped struct member.")}return s},T=function e(t,n,r=!1){e._||(e._=e=>e.replace(/[^vipPsjrdcC]/g,"").replace(/[pPscC]/g,"i"));const s=x(t.structInfo,n,!0);return r?e._(s.signature):s.signature},I={configurable:!1,enumerable:!1,get:function(){return q.get(this)},set:()=>n("Cannot assign the 'pointer' property of a struct.")},k=w((function(){const e=[];for(const t of Object.keys(this.structInfo.members))e.push(this.memberKey(t));return e})),F=new TextDecoder("utf-8"),O=new TextEncoder,P="undefined"==typeof SharedArrayBuffer?function(){}:SharedArrayBuffer,L=function(e){"s"!==e.signature&&n("Invalid member type signature for C-string value:",JSON.stringify(e))},C=function(e,...t){e.ondispose?Array.isArray(e.ondispose)||(e.ondispose=[e.ondispose]):e.ondispose=[],e.ondispose.push(...t)},N=function(e){const t=O.encode(e),r=i(t.length+1);r||n("Allocation error while duplicating string:",e);const o=s();return o.set(t,r),o[r+t.length]=0,r},D=function(e,t){arguments[2]!==w&&n("Do not call the StructType constructor","from client-level code."),Object.defineProperties(this,{structName:w(e),structInfo:w(t)})};D.prototype=Object.create(null,{dispose:w((function(){v(this.constructor,this)})),lookupMember:w((function(e,t=!0){return x(this.structInfo,e,t)})),memberToJsString:w((function(e){return function(e,t){const n=x(e.structInfo,t,!0);L(n);const r=e[n.key];if(!r)return null;let i=r;const o=s();for(;0!==o[i];++i);return r===i?"":(a=o,l=r,c=i,F.decode(a.buffer instanceof P?a.slice(l,c):a.subarray(l,c)));var a,l,c}(this,e)})),memberIsString:w((function(e,t=!0){return function(e,t,n=!1){const r=x(e.structInfo,t,n);return!(!r||1!==r.signature.length||"s"!==r.signature[0])&&r}(this,e,t)})),memberKey:A,memberKeys:k,memberSignature:w((function(e,t=!1){return T(this,e,t)})),memoryDump:w((function(){const e=this.pointer;return e?new Uint8Array(s().slice(e,e+this.structInfo.sizeof)):null})),pointer:I,setMemberCString:w((function(e,t){return function(e,t,n){const r=x(e.structInfo,t,!0);L(r);const s=N(n);return e[r.key]=s,C(e,s),e}(this,e,t)}))}),Object.assign(D.prototype,{addOnDispose:function(...e){return C(this,...e),this}}),Object.defineProperties(D,{allocCString:w(N),isA:w((e=>e instanceof D)),hasExternalPointer:w((e=>e instanceof D&&!!e[E])),memberKey:A});const R=e=>Number.isFinite(e)||e instanceof(u||Number),M=function e(t,r,i){if(!e._){e._={getters:{},setters:{},sw:{}};const t=["i","c","C","p","P","s","f","d","v()"];_&&t.push("j"),t.forEach((function(t){e._.getters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"getInt32";case 8:return b()&&"getBigInt64"}break;case"i":return"getInt32";case"c":return"getInt8";case"C":return"getUint8";case"j":return b()&&"getBigInt64";case"f":return"getFloat32";case"d":return"getFloat64"}n("Unhandled DataView getter for signature:",e)}(t),e._.setters[t]=function(e){switch(h(e)){case"p":case"P":case"s":switch(f){case 4:return"setInt32";case 8:return b()&&"setBigInt64"}break;case"i":return"setInt32";case"c":return"setInt8";case"C":return"setUint8";case"j":return b()&&"setBigInt64";case"f":return"setFloat32";case"d":return"setFloat64"}n("Unhandled DataView setter for signature:",e)}(t),e._.sw[t]=function(e){switch(h(e)){case"i":case"f":case"c":case"C":case"d":return Number;case"j":return b()&&u;case"p":case"P":case"s":switch(f){case 4:return Number;case 8:return b()&&u}}n("Unhandled DataView set wrapper for signature:",e)}(t)}));const r=/^[ipPsjfdcC]$/,s=/^[vipPsjfdcC]\([ipPsjfdcC]*\)$/;e.sigCheck=function(e,t,i,o){Object.prototype.hasOwnProperty.call(e,i)&&n(e.structName,"already has a property named",i+"."),r.test(o)||s.test(o)||n("Malformed signature for",y(e.structName,t)+":",o)}}const o=t.memberKey(r);e.sigCheck(t.prototype,r,o,i.signature),i.key=o,i.name=r;const l=h(i.signature),c=y(t.prototype.structName,o),d=t.prototype.debugFlags.__flags,p=Object.create(null);var q,E;p.configurable=!1,p.enumerable=!1,p.get=function(){d.getter&&a("debug.getter:",e._.getters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof);let t=new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.getters[l]](0,m);return d.getter&&a("debug.getter:",c,"result =",t),t},i.readOnly?p.set=(q=t.prototype.structName,E=o,()=>n(y(q,E),"is read-only.")):p.set=function(t){if(d.setter&&a("debug.setter:",e._.setters[l],"for",g(l),c,"@",this.pointer,"+",i.offset,"sz",i.sizeof,t),this.pointer||n("Cannot set struct property on disposed instance."),null===t)t=0;else for(;!R(t);){if("P"===i.signature&&t instanceof D){t=t.pointer||0,d.setter&&a("debug.setter:",c,"resolved to",t);break}n("Invalid value for pointer-type",c+".")}new DataView(s().buffer,this.pointer+i.offset,i.sizeof)[e._.setters[l]](0,e._.sw[l](t),m)},Object.defineProperty(t.prototype,o,p)},j=function e(t,s){1===arguments.length?t=(s=t).name:s.name||(s.name=t),t||n("Struct name is required.");let i=!1;Object.keys(s.members).forEach((e=>{const r=s.members[e];r.sizeof?1===r.sizeof?"c"===r.signature||"C"===r.signature||n("Unexpected sizeof==1 member",y(s.name,e),"with signature",r.signature):(0!=r.sizeof%4&&(console.warn("Invalid struct member description =",r,"from",s),n(t,"member",e,"sizeof is not aligned. sizeof="+r.sizeof)),0!=r.offset%4&&(console.warn("Invalid struct member description =",r,"from",s),n(t,"member",e,"offset is not aligned. offset="+r.offset))):n(t,"member",e,"is missing sizeof."),(!i||i.offsete instanceof a)),memberKey:A,memberKeys:k,methodInfoForKey:w((function(e){})),structInfo:w(s),structName:w(t)}),a.prototype=new D(t,s,w),Object.defineProperties(a.prototype,{debugFlags:o,constructor:w(a)}),Object.keys(s.members).forEach((e=>M(a,e,s.members[e]))),a};return j.StructType=D,j.config=t,j.allocCString=N,j.debugFlags||(j.debugFlags=r.__makeDebugFlags(r.debugFlags)),j},globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...e)=>{throw new Error(e.join(" "))},n=(e.SQLite3Error.toss,e.capi),r=e.wasm,s=e.util;if(globalThis.WhWasmUtilInstaller(r),delete globalThis.WhWasmUtilInstaller,r.bindingSignatures=[["sqlite3_aggregate_context","void*","sqlite3_context*","int"],["sqlite3_bind_double","int","sqlite3_stmt*","int","f64"],["sqlite3_bind_int","int","sqlite3_stmt*","int","int"],["sqlite3_bind_null",void 0,"sqlite3_stmt*","int"],["sqlite3_bind_parameter_count","int","sqlite3_stmt*"],["sqlite3_bind_parameter_index","int","sqlite3_stmt*","string"],["sqlite3_bind_pointer","int","sqlite3_stmt*","int","*","string:static","*"],["sqlite3_busy_handler","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({signature:"i(pi)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_busy_timeout","int","sqlite3*","int"],["sqlite3_changes","int","sqlite3*"],["sqlite3_clear_bindings","int","sqlite3_stmt*"],["sqlite3_collation_needed","int","sqlite3*","*","*"],["sqlite3_column_blob","*","sqlite3_stmt*","int"],["sqlite3_column_bytes","int","sqlite3_stmt*","int"],["sqlite3_column_count","int","sqlite3_stmt*"],["sqlite3_column_double","f64","sqlite3_stmt*","int"],["sqlite3_column_int","int","sqlite3_stmt*","int"],["sqlite3_column_name","string","sqlite3_stmt*","int"],["sqlite3_column_text","string","sqlite3_stmt*","int"],["sqlite3_column_type","int","sqlite3_stmt*","int"],["sqlite3_column_value","sqlite3_value*","sqlite3_stmt*","int"],["sqlite3_commit_hook","void*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_commit_hook",signature:"i(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_compileoption_get","string","int"],["sqlite3_compileoption_used","int","string"],["sqlite3_complete","int","string:flexible"],["sqlite3_context_db_handle","sqlite3*","sqlite3_context*"],["sqlite3_data_count","int","sqlite3_stmt*"],["sqlite3_db_filename","string","sqlite3*","string"],["sqlite3_db_handle","sqlite3*","sqlite3_stmt*"],["sqlite3_db_name","string","sqlite3*","int"],["sqlite3_db_status","int","sqlite3*","int","*","*","int"],["sqlite3_errcode","int","sqlite3*"],["sqlite3_errmsg","string","sqlite3*"],["sqlite3_error_offset","int","sqlite3*"],["sqlite3_errstr","string","int"],["sqlite3_exec","int",["sqlite3*","string:flexible",new r.xWrap.FuncPtrAdapter({signature:"i(pipp)",bindScope:"transient",callProxy:e=>{let t;return(s,i,o,a)=>{try{const n=r.cArgvToJs(i,o);return t||(t=r.cArgvToJs(i,a)),0|e(n,t)}catch(e){return e.resultCode||n.SQLITE_ERROR}}}}),"*","**"]],["sqlite3_expanded_sql","string","sqlite3_stmt*"],["sqlite3_extended_errcode","int","sqlite3*"],["sqlite3_extended_result_codes","int","sqlite3*","int"],["sqlite3_file_control","int","sqlite3*","string","int","*"],["sqlite3_finalize","int","sqlite3_stmt*"],["sqlite3_free",void 0,"*"],["sqlite3_get_auxdata","*","sqlite3_context*","int"],["sqlite3_initialize",void 0],["sqlite3_keyword_count","int"],["sqlite3_keyword_name","int",["int","**","*"]],["sqlite3_keyword_check","int",["string","int"]],["sqlite3_libversion","string"],["sqlite3_libversion_number","int"],["sqlite3_limit","int",["sqlite3*","int","int"]],["sqlite3_malloc","*","int"],["sqlite3_open","int","string","*"],["sqlite3_open_v2","int","string","*","int","string"],["sqlite3_progress_handler",void 0,["sqlite3*","int",new r.xWrap.FuncPtrAdapter({name:"xProgressHandler",signature:"i(p)",bindScope:"context",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_realloc","*","*","int"],["sqlite3_reset","int","sqlite3_stmt*"],["sqlite3_result_blob",void 0,"sqlite3_context*","*","int","*"],["sqlite3_result_double",void 0,"sqlite3_context*","f64"],["sqlite3_result_error",void 0,"sqlite3_context*","string","int"],["sqlite3_result_error_code",void 0,"sqlite3_context*","int"],["sqlite3_result_error_nomem",void 0,"sqlite3_context*"],["sqlite3_result_error_toobig",void 0,"sqlite3_context*"],["sqlite3_result_int",void 0,"sqlite3_context*","int"],["sqlite3_result_null",void 0,"sqlite3_context*"],["sqlite3_result_pointer",void 0,"sqlite3_context*","*","string:static","*"],["sqlite3_result_subtype",void 0,"sqlite3_value*","int"],["sqlite3_result_text",void 0,"sqlite3_context*","string","int","*"],["sqlite3_result_zeroblob",void 0,"sqlite3_context*","int"],["sqlite3_rollback_hook","void*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_rollback_hook",signature:"v(p)",contextKey:e=>e[0]}),"*"]],["sqlite3_set_authorizer","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_set_authorizer::xAuth",signature:"i(pissss)",contextKey:(e,t)=>e[0],callProxy:e=>(t,s,i,o,a,l)=>{try{return i=i&&r.cstrToJs(i),o=o&&r.cstrToJs(o),a=a&&r.cstrToJs(a),l=l&&r.cstrToJs(l),e(t,s,i,o,a,l)||0}catch(e){return e.resultCode||n.SQLITE_ERROR}}}),"*"]],["sqlite3_set_auxdata",void 0,["sqlite3_context*","int","*",new r.xWrap.FuncPtrAdapter({name:"xDestroyAuxData",signature:"v(*)",contextKey:(e,t)=>e[0]})]],["sqlite3_shutdown",void 0],["sqlite3_sourceid","string"],["sqlite3_sql","string","sqlite3_stmt*"],["sqlite3_status","int","int","*","*","int"],["sqlite3_step","int","sqlite3_stmt*"],["sqlite3_stmt_isexplain","int",["sqlite3_stmt*"]],["sqlite3_stmt_readonly","int",["sqlite3_stmt*"]],["sqlite3_stmt_status","int","sqlite3_stmt*","int","int"],["sqlite3_strglob","int","string","string"],["sqlite3_stricmp","int","string","string"],["sqlite3_strlike","int","string","string","int"],["sqlite3_strnicmp","int","string","string","int"],["sqlite3_table_column_metadata","int","sqlite3*","string","string","string","**","**","*","*","*"],["sqlite3_total_changes","int","sqlite3*"],["sqlite3_trace_v2","int",["sqlite3*","int",new r.xWrap.FuncPtrAdapter({name:"sqlite3_trace_v2::callback",signature:"i(ippp)",contextKey:(e,t)=>e[0]}),"*"]],["sqlite3_txn_state","int",["sqlite3*","string"]],["sqlite3_uri_boolean","int","sqlite3_filename","string","int"],["sqlite3_uri_key","string","sqlite3_filename","int"],["sqlite3_uri_parameter","string","sqlite3_filename","string"],["sqlite3_user_data","void*","sqlite3_context*"],["sqlite3_value_blob","*","sqlite3_value*"],["sqlite3_value_bytes","int","sqlite3_value*"],["sqlite3_value_double","f64","sqlite3_value*"],["sqlite3_value_dup","sqlite3_value*","sqlite3_value*"],["sqlite3_value_free",void 0,"sqlite3_value*"],["sqlite3_value_frombind","int","sqlite3_value*"],["sqlite3_value_int","int","sqlite3_value*"],["sqlite3_value_nochange","int","sqlite3_value*"],["sqlite3_value_numeric_type","int","sqlite3_value*"],["sqlite3_value_pointer","*","sqlite3_value*","string:static"],["sqlite3_value_subtype","int","sqlite3_value*"],["sqlite3_value_text","string","sqlite3_value*"],["sqlite3_value_type","int","sqlite3_value*"],["sqlite3_vfs_find","*","string"],["sqlite3_vfs_register","int","sqlite3_vfs*","int"],["sqlite3_vfs_unregister","int","sqlite3_vfs*"]],r.exports.sqlite3_activate_see instanceof Function&&r.bindingSignatures.push(["sqlite3_key","int","sqlite3*","string","int"],["sqlite3_key_v2","int","sqlite3*","string","*","int"],["sqlite3_rekey","int","sqlite3*","string","int"],["sqlite3_rekey_v2","int","sqlite3*","string","*","int"],["sqlite3_activate_see",void 0,"string"]),r.bindingSignatures.int64=[["sqlite3_bind_int64","int",["sqlite3_stmt*","int","i64"]],["sqlite3_changes64","i64",["sqlite3*"]],["sqlite3_column_int64","i64",["sqlite3_stmt*","int"]],["sqlite3_create_module","int",["sqlite3*","string","sqlite3_module*","*"]],["sqlite3_create_module_v2","int",["sqlite3*","string","sqlite3_module*","*","*"]],["sqlite3_declare_vtab","int",["sqlite3*","string:flexible"]],["sqlite3_deserialize","int","sqlite3*","string","*","i64","i64","int"],["sqlite3_drop_modules","int",["sqlite3*","**"]],["sqlite3_last_insert_rowid","i64",["sqlite3*"]],["sqlite3_malloc64","*","i64"],["sqlite3_msize","i64","*"],["sqlite3_overload_function","int",["sqlite3*","string","int"]],["sqlite3_preupdate_blobwrite","int","sqlite3*"],["sqlite3_preupdate_count","int","sqlite3*"],["sqlite3_preupdate_depth","int","sqlite3*"],["sqlite3_preupdate_hook","*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_preupdate_hook",signature:"v(ppippjj)",contextKey:e=>e[0],callProxy:e=>(t,n,s,i,o,a,l)=>{e(t,n,s,r.cstrToJs(i),r.cstrToJs(o),a,l)}}),"*"]],["sqlite3_preupdate_new","int",["sqlite3*","int","**"]],["sqlite3_preupdate_old","int",["sqlite3*","int","**"]],["sqlite3_realloc64","*","*","i64"],["sqlite3_result_int64",void 0,"*","i64"],["sqlite3_result_zeroblob64","int","*","i64"],["sqlite3_serialize","*","sqlite3*","string","*","int"],["sqlite3_set_last_insert_rowid",void 0,["sqlite3*","i64"]],["sqlite3_status64","int","int","*","*","int"],["sqlite3_total_changes64","i64",["sqlite3*"]],["sqlite3_update_hook","*",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"sqlite3_update_hook",signature:"v(iippj)",contextKey:e=>e[0],callProxy:e=>(t,n,s,i,o)=>{e(t,n,r.cstrToJs(s),r.cstrToJs(i),o)}}),"*"]],["sqlite3_uri_int64","i64",["sqlite3_filename","string","i64"]],["sqlite3_value_int64","i64","sqlite3_value*"],["sqlite3_vtab_collation","string","sqlite3_index_info*","int"],["sqlite3_vtab_distinct","int","sqlite3_index_info*"],["sqlite3_vtab_in","int","sqlite3_index_info*","int","int"],["sqlite3_vtab_in_first","int","sqlite3_value*","**"],["sqlite3_vtab_in_next","int","sqlite3_value*","**"],["sqlite3_vtab_nochange","int","sqlite3_context*"],["sqlite3_vtab_on_conflict","int","sqlite3*"],["sqlite3_vtab_rhs_value","int","sqlite3_index_info*","int","**"]],r.bigIntEnabled&&r.exports.sqlite3changegroup_add){const e={signature:"i(ps)",callProxy:e=>(t,s)=>{try{return 0|e(t,r.cstrToJs(s))}catch(e){return e.resultCode||n.SQLITE_ERROR}}};r.bindingSignatures.int64.push(["sqlite3changegroup_add","int",["sqlite3_changegroup*","int","void*"]],["sqlite3changegroup_add_strm","int",["sqlite3_changegroup*",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changegroup_delete",void 0,["sqlite3_changegroup*"]],["sqlite3changegroup_new","int",["**"]],["sqlite3changegroup_output","int",["sqlite3_changegroup*","int*","**"]],["sqlite3changegroup_output_strm","int",["sqlite3_changegroup*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply","int",["sqlite3*","int","void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_strm","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*"]],["sqlite3changeset_apply_v2","int",["sqlite3*","int","void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_apply_v2_strm","int",["sqlite3*",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xFilter",bindScope:"transient",...e}),new r.xWrap.FuncPtrAdapter({name:"xConflict",signature:"i(pip)",bindScope:"transient"}),"void*","**","int*","int"]],["sqlite3changeset_concat","int",["int","void*","int","void*","int*","**"]],["sqlite3changeset_concat_strm","int",[new r.xWrap.FuncPtrAdapter({name:"xInputA",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xInputB",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_conflict","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_finalize","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_fk_conflicts","int",["sqlite3_changeset_iter*","int*"]],["sqlite3changeset_invert","int",["int","void*","int*","**"]],["sqlite3changeset_invert_strm","int",[new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppi)",bindScope:"transient"}),"void*"]],["sqlite3changeset_new","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_next","int",["sqlite3_changeset_iter*"]],["sqlite3changeset_old","int",["sqlite3_changeset_iter*","int","**"]],["sqlite3changeset_op","int",["sqlite3_changeset_iter*","**","int*","int*","int*"]],["sqlite3changeset_pk","int",["sqlite3_changeset_iter*","**","int*"]],["sqlite3changeset_start","int",["**","int","*"]],["sqlite3changeset_start_strm","int",["**",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3changeset_start_v2","int",["**","int","*","int"]],["sqlite3changeset_start_v2_strm","int",["**",new r.xWrap.FuncPtrAdapter({name:"xInput",signature:"i(ppp)",bindScope:"transient"}),"void*","int"]],["sqlite3session_attach","int",["sqlite3_session*","string"]],["sqlite3session_changeset","int",["sqlite3_session*","int*","**"]],["sqlite3session_changeset_size","i64",["sqlite3_session*"]],["sqlite3session_changeset_strm","int",["sqlite3_session*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_config","int",["int","void*"]],["sqlite3session_create","int",["sqlite3*","string","**"]],["sqlite3session_diff","int",["sqlite3_session*","string","string","**"]],["sqlite3session_enable","int",["sqlite3_session*","int"]],["sqlite3session_indirect","int",["sqlite3_session*","int"]],["sqlite3session_isempty","int",["sqlite3_session*"]],["sqlite3session_memory_used","i64",["sqlite3_session*"]],["sqlite3session_object_config","int",["sqlite3_session*","int","void*"]],["sqlite3session_patchset","int",["sqlite3_session*","*","**"]],["sqlite3session_patchset_strm","int",["sqlite3_session*",new r.xWrap.FuncPtrAdapter({name:"xOutput",signature:"i(ppp)",bindScope:"transient"}),"void*"]],["sqlite3session_table_filter",void 0,["sqlite3_session*",new r.xWrap.FuncPtrAdapter({name:"xFilter",...e,contextKey:(e,t)=>e[0]}),"*"]])}r.bindingSignatures.wasm=[["sqlite3_wasm_db_reset","int","sqlite3*"],["sqlite3_wasm_db_vfs","sqlite3_vfs*","sqlite3*","string"],["sqlite3_wasm_vfs_create_file","int","sqlite3_vfs*","string","*","int"],["sqlite3_wasm_posix_create_file","int","string","*","int"],["sqlite3_wasm_vfs_unlink","int","sqlite3_vfs*","string"]],e.StructBinder=globalThis.Jaccwabyt({heap:r.heap8u,alloc:r.alloc,dealloc:r.dealloc,bigIntEnabled:r.bigIntEnabled,memberPrefix:"$"}),delete globalThis.Jaccwabyt;{const i=r.xWrap.argAdapter("string");r.xWrap.argAdapter("string:flexible",(e=>i(s.flexibleString(e)))),r.xWrap.argAdapter("string:static",function(e){return r.isPtr(e)?e:this[e=""+e]||(this[e]=r.allocCString(e))}.bind(Object.create(null)));const o=r.xWrap.argAdapter("*"),a=function(){};r.xWrap.argAdapter("sqlite3_filename",o)("sqlite3_context*",o)("sqlite3_value*",o)("void*",o)("sqlite3_changegroup*",o)("sqlite3_changeset_iter*",o)("sqlite3_session*",o)("sqlite3_stmt*",(t=>o(t instanceof(e?.oo1?.Stmt||a)?t.pointer:t)))("sqlite3*",(t=>o(t instanceof(e?.oo1?.DB||a)?t.pointer:t)))("sqlite3_index_info*",(e=>o(e instanceof(n.sqlite3_index_info||a)?e.pointer:e)))("sqlite3_module*",(e=>o(e instanceof(n.sqlite3_module||a)?e.pointer:e)))("sqlite3_vfs*",(t=>"string"==typeof t?n.sqlite3_vfs_find(t)||e.SQLite3Error.toss(n.SQLITE_NOTFOUND,"Unknown sqlite3_vfs name:",t):o(t instanceof(n.sqlite3_vfs||a)?t.pointer:t)));const l=r.xWrap.resultAdapter("*");r.xWrap.resultAdapter("sqlite3*",l)("sqlite3_context*",l)("sqlite3_stmt*",l)("sqlite3_value*",l)("sqlite3_vfs*",l)("void*",l),0===r.exports.sqlite3_step.length&&(r.xWrap.doArgcCheck=!1,e.config.warn("Disabling sqlite3.wasm.xWrap.doArgcCheck due to environmental quirks."));for(const e of r.bindingSignatures)n[e[0]]=r.xWrap.apply(null,e);for(const e of r.bindingSignatures.wasm)r[e[0]]=r.xWrap.apply(null,e);const c=function(e){return()=>t(e+"() is unavailable due to lack","of BigInt support in this build.")};for(const e of r.bindingSignatures.int64)n[e[0]]=r.bigIntEnabled?r.xWrap.apply(null,e):c(e[0]);if(delete r.bindingSignatures,r.exports.sqlite3_wasm_db_error){const t=r.xWrap("sqlite3_wasm_db_error","int","sqlite3*","int","string");s.sqlite3_wasm_db_error=function(r,s,i){return s instanceof e.WasmAllocError?(s=n.SQLITE_NOMEM,i=0):s instanceof Error&&(i=i||""+s,s=s.resultCode||n.SQLITE_ERROR),r?t(r,s,i):s}}else s.sqlite3_wasm_db_error=function(e,t,n){return console.warn("sqlite3_wasm_db_error() is not exported.",arguments),t}}{const i=r.xCall("sqlite3_wasm_enum_json");i||t("Maintenance required: increase sqlite3_wasm_enum_json()'s","static buffer size!"),r.ctype=JSON.parse(r.cstrToJs(i));const o=["access","authorizer","blobFinalizers","changeset","config","dataTypes","dbConfig","dbStatus","encodings","fcntl","flock","ioCap","limits","openFlags","prepareFlags","resultCodes","sqlite3Status","stmtStatus","syncFlags","trace","txnState","udfFlags","version"];r.bigIntEnabled&&o.push("serialize","session","vtab");for(const e of o)for(const t of Object.entries(r.ctype[e]))n[t[0]]=t[1];r.functionEntry(n.SQLITE_WASM_DEALLOC)||t("Internal error: cannot resolve exported function","entry SQLITE_WASM_DEALLOC (=="+n.SQLITE_WASM_DEALLOC+").");const a=Object.create(null);for(const e of["resultCodes"])for(const t of Object.entries(r.ctype[e]))a[t[1]]=t[0];n.sqlite3_js_rc_str=e=>a[e];const l=Object.assign(Object.create(null),{WasmTestStruct:!0,sqlite3_kvvfs_methods:!s.isUIThread(),sqlite3_index_info:!r.bigIntEnabled,sqlite3_index_constraint:!r.bigIntEnabled,sqlite3_index_orderby:!r.bigIntEnabled,sqlite3_index_constraint_usage:!r.bigIntEnabled});for(const t of r.ctype.structs)l[t.name]||(n[t.name]=e.StructBinder(t));if(n.sqlite3_index_info){for(const e of["sqlite3_index_constraint","sqlite3_index_orderby","sqlite3_index_constraint_usage"])n.sqlite3_index_info[e]=n[e],delete n[e];n.sqlite3_vtab_config=r.xWrap("sqlite3_wasm_vtab_config","int",["sqlite3*","int","int"])}}const i=(e,t,r)=>s.sqlite3_wasm_db_error(e,n.SQLITE_MISUSE,t+"() requires "+r+" argument"+(1===r?"":"s")+"."),o=e=>s.sqlite3_wasm_db_error(e,n.SQLITE_FORMAT,"SQLITE_UTF8 is the only supported encoding."),a=e=>r.xWrap.argAdapter("sqlite3*")(e),l=e=>r.isPtr(e)?r.cstrToJs(e):e,c=function(e,t){e=a(e);let n=this.dbMap.get(e);return t?(!n&&t>0&&this.dbMap.set(e,n=Object.create(null)),n):(this.dbMap.delete(e),n)}.bind(Object.assign(Object.create(null),{dbMap:new Map}));c.addCollation=function(e,t){const n=c(e,1);n.collation||(n.collation=new Set),n.collation.add(l(t).toLowerCase())},c._addUDF=function(e,t,n,r){t=l(t).toLowerCase();let s=r.get(t);s||r.set(t,s=new Set),s.add(n<0?-1:n)},c.addFunction=function(e,t,n){const r=c(e,1);r.udf||(r.udf=new Map),this._addUDF(e,t,n,r.udf)},c.addWindowFunc=function(e,t,n){const r=c(e,1);r.wudf||(r.wudf=new Map),this._addUDF(e,t,n,r.wudf)},c.cleanup=function(e){const t=[e=a(e)];for(const e of["sqlite3_busy_handler","sqlite3_commit_hook","sqlite3_preupdate_hook","sqlite3_progress_handler","sqlite3_rollback_hook","sqlite3_set_authorizer","sqlite3_trace_v2","sqlite3_update_hook"]){const s=r.exports[e];t.length=s.length;try{n[e](...t)}catch(n){console.warn("close-time call of",e+"(",t,") threw:",n)}}const s=c(e,0);if(!s)return;if(s.collation){for(const t of s.collation)try{n.sqlite3_create_collation_v2(e,t,n.SQLITE_UTF8,0,0,0)}catch(e){}delete s.collation}let i;for(i=0;i<2;++i){const t=i?s.wudf:s.udf;if(!t)continue;const r=i?n.sqlite3_create_window_function:n.sqlite3_create_function_v2;for(const s of t){const t=s[0],o=s[1],a=[e,t,0,n.SQLITE_UTF8,0,0,0,0,0];i&&a.push(0);for(const e of o)try{a[2]=e,r.apply(null,a)}catch(e){}o.clear()}t.clear()}delete s.udf,delete s.wudf};{const e=r.xWrap("sqlite3_close_v2","int","sqlite3*");n.sqlite3_close_v2=function(t){if(1!==arguments.length)return i(t,"sqlite3_close_v2",1);if(t)try{c.cleanup(t)}catch(e){}return e(t)}}if(n.sqlite3session_table_filter){const e=r.xWrap("sqlite3session_delete",void 0,["sqlite3_session*"]);n.sqlite3session_delete=function(t){if(1!==arguments.length)return i(pDb,"sqlite3session_delete",1);t&&n.sqlite3session_table_filter(t,0,0),e(t)}}{const e=(e,t)=>"argv["+t+"]:"+e[0]+":"+r.cstrToJs(e[1]).toLowerCase(),t=r.xWrap("sqlite3_create_collation_v2","int",["sqlite3*","string","int","*",new r.xWrap.FuncPtrAdapter({name:"xCompare",signature:"i(pipip)",contextKey:e}),new r.xWrap.FuncPtrAdapter({name:"xDestroy",signature:"v(p)",contextKey:e})]);n.sqlite3_create_collation_v2=function(e,r,a,l,_,u){if(6!==arguments.length)return i(e,"sqlite3_create_collation_v2",6);if(15&a){if(n.SQLITE_UTF8!==(15&a))return o(e)}else a|=n.SQLITE_UTF8;try{const n=t(e,r,a,l,_,u);return 0===n&&_ instanceof Function&&c.addCollation(e,r),n}catch(t){return s.sqlite3_wasm_db_error(e,t)}},n.sqlite3_create_collation=(e,t,r,s,o)=>5===arguments.length?n.sqlite3_create_collation_v2(e,t,r,s,o,0):i(e,"sqlite3_create_collation",5)}{const e=function(e,t){return e[0]+":"+(e[2]<0?-1:e[2])+":"+t+":"+r.cstrToJs(e[1]).toLowerCase()},t=Object.assign(Object.create(null),{xInverseAndStep:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,r,s)=>{try{e(t,...n.sqlite3_values_to_js(r,s))}catch(e){n.sqlite3_result_error_js(t,e)}}},xFinalAndValue:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{n.sqlite3_result_js(t,e(t))}catch(e){n.sqlite3_result_error_js(t,e)}}},xFunc:{signature:"v(pip)",contextKey:e,callProxy:e=>(t,r,s)=>{try{n.sqlite3_result_js(t,e(t,...n.sqlite3_values_to_js(r,s)))}catch(e){n.sqlite3_result_error_js(t,e)}}},xDestroy:{signature:"v(p)",contextKey:e,callProxy:e=>t=>{try{e(t)}catch(e){console.error("UDF xDestroy method threw:",e)}}}}),a=r.xWrap("sqlite3_create_function_v2","int",["sqlite3*","string","int","int","*",new r.xWrap.FuncPtrAdapter({name:"xFunc",...t.xFunc}),new r.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new r.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new r.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]),l=r.xWrap("sqlite3_create_window_function","int",["sqlite3*","string","int","int","*",new r.xWrap.FuncPtrAdapter({name:"xStep",...t.xInverseAndStep}),new r.xWrap.FuncPtrAdapter({name:"xFinal",...t.xFinalAndValue}),new r.xWrap.FuncPtrAdapter({name:"xValue",...t.xFinalAndValue}),new r.xWrap.FuncPtrAdapter({name:"xInverse",...t.xInverseAndStep}),new r.xWrap.FuncPtrAdapter({name:"xDestroy",...t.xDestroy})]);n.sqlite3_create_function_v2=function e(t,r,l,_,u,d,f,p,m){if(e.length!==arguments.length)return i(t,"sqlite3_create_function_v2",e.length);if(15&_){if(n.SQLITE_UTF8!==(15&_))return o(t)}else _|=n.SQLITE_UTF8;try{const e=a(t,r,l,_,u,d,f,p,m);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function)&&c.addFunction(t,r,l),e}catch(e){return console.error("sqlite3_create_function_v2() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},n.sqlite3_create_function=function e(t,r,s,o,a,l,c,_){return e.length===arguments.length?n.sqlite3_create_function_v2(t,r,s,o,a,l,c,_,0):i(t,"sqlite3_create_function",e.length)},n.sqlite3_create_window_function=function e(t,r,a,_,u,d,f,p,m,h){if(e.length!==arguments.length)return i(t,"sqlite3_create_window_function",e.length);if(15&_){if(n.SQLITE_UTF8!==(15&_))return o(t)}else _|=n.SQLITE_UTF8;try{const e=l(t,r,a,_,u,d,f,p,m,h);return 0===e&&(d instanceof Function||f instanceof Function||p instanceof Function||m instanceof Function||h instanceof Function)&&c.addWindowFunc(t,r,a),e}catch(e){return console.error("sqlite3_create_window_function() setup threw:",e),s.sqlite3_wasm_db_error(t,e,"Creation of UDF threw: "+e)}},n.sqlite3_create_function_v2.udfSetResult=n.sqlite3_create_function.udfSetResult=n.sqlite3_create_window_function.udfSetResult=n.sqlite3_result_js,n.sqlite3_create_function_v2.udfConvertArgs=n.sqlite3_create_function.udfConvertArgs=n.sqlite3_create_window_function.udfConvertArgs=n.sqlite3_values_to_js,n.sqlite3_create_function_v2.udfSetError=n.sqlite3_create_function.udfSetError=n.sqlite3_create_window_function.udfSetError=n.sqlite3_result_error_js}{const e=(e,t)=>("string"==typeof e?t=-1:s.isSQLableTypedArray(e)?(t=e.byteLength,e=s.typedArrayToString(e instanceof ArrayBuffer?new Uint8Array(e):e)):Array.isArray(e)&&(e=e.join(""),t=-1),[e,t]),t={basic:r.xWrap("sqlite3_prepare_v3","int",["sqlite3*","string","int","int","**","**"]),full:r.xWrap("sqlite3_prepare_v3","int",["sqlite3*","*","int","int","**","**"])};n.sqlite3_prepare_v3=function r(o,a,l,c,_,u){if(r.length!==arguments.length)return i(o,"sqlite3_prepare_v3",r.length);const[d,f]=e(a,l);switch(typeof d){case"string":return t.basic(o,d,f,c,_,null);case"number":return t.full(o,d,f,c,_,u);default:return s.sqlite3_wasm_db_error(o,n.SQLITE_MISUSE,"Invalid SQL argument type for sqlite3_prepare_v2/v3().")}},n.sqlite3_prepare_v2=function e(t,r,s,o,a){return e.length===arguments.length?n.sqlite3_prepare_v3(t,r,s,0,o,a):i(t,"sqlite3_prepare_v2",e.length)}}{const e=r.xWrap("sqlite3_bind_text","int",["sqlite3_stmt*","int","string","int","*"]),t=r.xWrap("sqlite3_bind_blob","int",["sqlite3_stmt*","int","*","int","*"]);n.sqlite3_bind_text=function t(o,a,l,c,_){if(t.length!==arguments.length)return i(n.sqlite3_db_handle(o),"sqlite3_bind_text",t.length);if(r.isPtr(l)||null===l)return e(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(pMem)&&(l=pMem.join(""));try{if(s.isSQLableTypedArray(l))u=r.allocFromTypedArray(l),d=l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),n.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_text().");[u,d]=r.allocCString(l)}return e(o,a,u,d,n.SQLITE_WASM_DEALLOC)}catch(e){return r.dealloc(u),s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),e)}},n.sqlite3_bind_blob=function e(o,a,l,c,_){if(e.length!==arguments.length)return i(n.sqlite3_db_handle(o),"sqlite3_bind_blob",e.length);if(r.isPtr(l)||null===l)return t(o,a,l,c,_);let u,d;l instanceof ArrayBuffer?l=new Uint8Array(l):Array.isArray(l)&&(l=l.join(""));try{if(s.isBindableTypedArray(l))u=r.allocFromTypedArray(l),d=c>=0?c:l.byteLength;else{if("string"!=typeof l)return s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),n.SQLITE_MISUSE,"Invalid 3rd argument type for sqlite3_bind_blob().");[u,d]=r.allocCString(l)}return t(o,a,u,d,n.SQLITE_WASM_DEALLOC)}catch(e){return r.dealloc(u),s.sqlite3_wasm_db_error(n.sqlite3_db_handle(o),e)}}}n.sqlite3_config=function(e,...t){if(arguments.length<2)return n.SQLITE_MISUSE;switch(e){case n.SQLITE_CONFIG_COVERING_INDEX_SCAN:case n.SQLITE_CONFIG_MEMSTATUS:case n.SQLITE_CONFIG_SMALL_MALLOC:case n.SQLITE_CONFIG_SORTERREF_SIZE:case n.SQLITE_CONFIG_STMTJRNL_SPILL:case n.SQLITE_CONFIG_URI:return r.exports.sqlite3_wasm_config_i(e,t[0]);case n.SQLITE_CONFIG_LOOKASIDE:return r.exports.sqlite3_wasm_config_ii(e,t[0],t[1]);case n.SQLITE_CONFIG_MEMDB_MAXSIZE:return r.exports.sqlite3_wasm_config_j(e,t[0]);case n.SQLITE_CONFIG_GETMALLOC:case n.SQLITE_CONFIG_GETMUTEX:case n.SQLITE_CONFIG_GETPCACHE2:case n.SQLITE_CONFIG_GETPCACHE:case n.SQLITE_CONFIG_HEAP:case n.SQLITE_CONFIG_LOG:case n.SQLITE_CONFIG_MALLOC:case n.SQLITE_CONFIG_MMAP_SIZE:case n.SQLITE_CONFIG_MULTITHREAD:case n.SQLITE_CONFIG_MUTEX:case n.SQLITE_CONFIG_PAGECACHE:case n.SQLITE_CONFIG_PCACHE2:case n.SQLITE_CONFIG_PCACHE:case n.SQLITE_CONFIG_PCACHE_HDRSZ:case n.SQLITE_CONFIG_PMASZ:case n.SQLITE_CONFIG_SERIALIZED:case n.SQLITE_CONFIG_SINGLETHREAD:case n.SQLITE_CONFIG_SQLLOG:case n.SQLITE_CONFIG_WIN32_HEAPSIZE:default:return n.SQLITE_NOTFOUND}};{const e=new Set;n.sqlite3_auto_extension=function(t){if(t instanceof Function)t=r.installFunction("i(ppp)",t);else if(1!==arguments.length||!r.isPtr(t))return n.SQLITE_MISUSE;const s=r.exports.sqlite3_auto_extension(t);return t!==arguments[0]&&(0===s?e.add(t):r.uninstallFunction(t)),s},n.sqlite3_cancel_auto_extension=function(e){return e&&1===arguments.length&&r.isPtr(e)?r.exports.sqlite3_cancel_auto_extension(e):0},n.sqlite3_reset_auto_extension=function(){r.exports.sqlite3_reset_auto_extension();for(const t of e)r.uninstallFunction(t);e.clear()}}const _=n.sqlite3_vfs_find("kvvfs");if(_)if(s.isUIThread()){const e=new n.sqlite3_kvvfs_methods(r.exports.sqlite3_wasm_kvvfs_methods());delete n.sqlite3_kvvfs_methods;const t=r.exports.sqlite3_wasm_kvvfsMakeKeyOnPstack,s=r.pstack,i=e=>115===r.peek(e)?sessionStorage:localStorage,o={xRead:(e,n,o,a)=>{const l=s.pointer,c=r.scopedAllocPush();try{const s=t(e,n);if(!s)return-3;const l=r.cstrToJs(s),c=i(e).getItem(l);if(!c)return-1;const _=c.length;if(a<=0)return _;if(1===a)return r.poke(o,0),_;const u=r.scopedAllocCString(c);return a>_+1&&(a=_+1),r.heap8u().copyWithin(o,u,u+a-1),r.poke(o+a-1,0),a-1}catch(e){return console.error("kvstorageRead()",e),-2}finally{s.restore(l),r.scopedAllocPop(c)}},xWrite:(e,o,a)=>{const l=s.pointer;try{const n=t(e,o);if(!n)return 1;const s=r.cstrToJs(n);return i(e).setItem(s,r.cstrToJs(a)),0}catch(e){return console.error("kvstorageWrite()",e),n.SQLITE_IOERR}finally{s.restore(l)}},xDelete:(e,o)=>{const a=s.pointer;try{const n=t(e,o);return n?(i(e).removeItem(r.cstrToJs(n)),0):1}catch(e){return console.error("kvstorageDelete()",e),n.SQLITE_IOERR}finally{s.restore(a)}}};for(const t of Object.keys(o))e[e.memberKey(t)]=r.installFunction(e.memberSignature(t),o[t])}else n.sqlite3_vfs_unregister(_);r.xWrap.FuncPtrAdapter.warnOnUse=!0})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.version={libVersion:"3.44.2",libVersionNumber:3044002,sourceId:"2023-11-24 11:41:44 ebead0e7230cd33bcec9f95d2183069565b9e709bf745c9b5db65cc0cbf92c0f",downloadVersion:3440200}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=(...t)=>{throw new e.SQLite3Error(...t)},n=e.capi,r=e.wasm,s=e.util,i=new WeakMap,o=new WeakMap,a=(e,t,n)=>{const r=Object.getOwnPropertyDescriptor(e,t);return r?r.value:n},l=function(e,r){return r&&(e instanceof d&&(e=e.pointer),t(r,"sqlite3 result code",r+":",e?n.sqlite3_errmsg(e):n.sqlite3_errstr(r))),arguments[0]},c=r.installFunction("i(ippp)",function(e,t,s,i){n.SQLITE_TRACE_STMT===e&&console.log("SQL TRACE #"+ ++this.counter+" via sqlite3@"+t+":",r.cstrToJs(i))}.bind({counter:0})),_=Object.create(null),u=function s(...a){if(!s._name2vfs){s._name2vfs=Object.create(null);const e="function"==typeof importScripts&&(e=>t("The VFS for",e,"is only available in the main window thread."));s._name2vfs[":localStorage:"]={vfs:"kvvfs",filename:e||(()=>"local")},s._name2vfs[":sessionStorage:"]={vfs:"kvvfs",filename:e||(()=>"session")}}const u=s.normalizeArgs(...a);let d=u.filename,f=u.vfs,p=u.flags;("string"!=typeof d&&"number"!=typeof d||"string"!=typeof p||f&&"string"!=typeof f&&"number"!=typeof f)&&(e.config.error("Invalid DB ctor args",u,arguments),t("Invalid arguments for DB constructor."));let m="number"==typeof d?r.cstrToJs(d):d;const h=s._name2vfs[m];h&&(f=h.vfs,d=m=h.filename(m));let g,b=0;p.indexOf("c")>=0&&(b|=n.SQLITE_OPEN_CREATE|n.SQLITE_OPEN_READWRITE),p.indexOf("w")>=0&&(b|=n.SQLITE_OPEN_READWRITE),0===b&&(b|=n.SQLITE_OPEN_READONLY),b|=n.SQLITE_OPEN_EXRESCODE;const y=r.pstack.pointer;try{const e=r.pstack.allocPtr();let t=n.sqlite3_open_v2(d,e,b,f||0);g=r.peekPtr(e),l(g,t),n.sqlite3_extended_result_codes(g,1),p.indexOf("t")>=0&&n.sqlite3_trace_v2(g,n.SQLITE_TRACE_STMT,c,g)}catch(e){throw g&&n.sqlite3_close_v2(g),e}finally{r.pstack.restore(y)}this.filename=m,i.set(this,g),o.set(this,Object.create(null));try{const r=n.sqlite3_js_db_vfs(g);r||t("Internal error: cannot get VFS for new db handle.");const s=_[r];s instanceof Function?s(this,e):s&&l(g,n.sqlite3_exec(g,s,0,0,0))}catch(e){throw this.close(),e}};u.setVfsPostOpenSql=function(e,t){_[e]=t},u.normalizeArgs=function(e=":memory:",t="c",n=null){const r={};return 1===arguments.length&&arguments[0]&&"object"==typeof arguments[0]?(Object.assign(r,arguments[0]),void 0===r.flags&&(r.flags="c"),void 0===r.vfs&&(r.vfs=null),void 0===r.filename&&(r.filename=":memory:")):(r.filename=e,r.flags=t,r.vfs=n),r};const d=function(...e){u.apply(this,e)};d.dbCtorHelper=u;const f={null:1,number:2,string:3,boolean:4,blob:5};f[void 0],f.null,r.bigIntEnabled&&(f.bigint=f.number);const p=function(){f!==arguments[2]&&t(n.SQLITE_MISUSE,"Do not call the Stmt constructor directly. Use DB.prepare()."),this.db=arguments[0],i.set(this,arguments[1]),this.parameterCount=n.sqlite3_bind_parameter_count(this.pointer)},m=function(e){return e.pointer||t("DB has been closed."),e},h=function(e,n){return(n!==(0|n)||n<0||n>=e.columnCount)&&t("Column index",n,"is out of range."),e},g=(e,t,n,...r)=>{const s=e.prepare(t);try{const e=s.bind(n).step()?s.get(...r):void 0;return s.reset(),e}finally{s.finalize()}},b=(e,t,n,r)=>e.exec({sql:t,bind:n,rowMode:r,returnValue:"resultRows"});d.checkRc=(e,t)=>l(e,t),d.prototype={isOpen:function(){return!!this.pointer},affirmOpen:function(){return m(this)},close:function(){if(this.pointer){if(this.onclose&&this.onclose.before instanceof Function)try{this.onclose.before(this)}catch(e){}const e=this.pointer;if(Object.keys(o.get(this)).forEach(((e,t)=>{if(t&&t.pointer)try{t.finalize()}catch(e){}})),i.delete(this),o.delete(this),n.sqlite3_close_v2(e),this.onclose&&this.onclose.after instanceof Function)try{this.onclose.after(this)}catch(e){}delete this.filename}},changes:function(e=!1,t=!1){const r=m(this).pointer;return e?t?n.sqlite3_total_changes64(r):n.sqlite3_total_changes(r):t?n.sqlite3_changes64(r):n.sqlite3_changes(r)},dbFilename:function(e="main"){return n.sqlite3_db_filename(m(this).pointer,e)},dbName:function(e=0){return n.sqlite3_db_name(m(this).pointer,e)},dbVfsName:function(e=0){let t;const s=n.sqlite3_js_db_vfs(m(this).pointer,e);if(s){const e=new n.sqlite3_vfs(s);try{t=r.cstrToJs(e.$zName)}finally{e.dispose()}}return t},prepare:function(e){m(this);const s=r.pstack.pointer;let i,a;try{i=r.pstack.alloc(8),d.checkRc(this,n.sqlite3_prepare_v2(this.pointer,e,-1,i,null)),a=r.peekPtr(i)}finally{r.pstack.restore(s)}a||t("Cannot prepare empty SQL.");const l=new p(this,a,f);return o.get(this)[a]=l,l},exec:function(){m(this);const e=function(e,r){const i=Object.create(null);switch(i.opt=Object.create(null),r.length){case 1:"string"==typeof r[0]||s.isSQLableTypedArray(r[0])||Array.isArray(r[0])?i.sql=r[0]:r[0]&&"object"==typeof r[0]&&(i.opt=r[0],i.sql=i.opt.sql);break;case 2:i.sql=r[0],i.opt=r[1];break;default:t("Invalid argument count for exec().")}i.sql=s.flexibleString(i.sql),"string"!=typeof i.sql&&t("Missing SQL argument or unsupported SQL value type.");const o=i.opt;switch(o.returnValue){case"resultRows":o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows;break;case"saveSql":o.saveSql||(o.saveSql=[]),i.returnVal=()=>o.saveSql;break;case void 0:case"this":i.returnVal=()=>e;break;default:t("Invalid returnValue value:",o.returnValue)}if(o.callback||o.returnValue||void 0===o.rowMode||(o.resultRows||(o.resultRows=[]),i.returnVal=()=>o.resultRows),o.callback||o.resultRows)switch(void 0===o.rowMode?"array":o.rowMode){case"object":i.cbArg=e=>e.get(Object.create(null));break;case"array":i.cbArg=e=>e.get([]);break;case"stmt":Array.isArray(o.resultRows)&&t("exec(): invalid rowMode for a resultRows array: must","be one of 'array', 'object',","a result column number, or column name reference."),i.cbArg=e=>e;break;default:if(s.isInt32(o.rowMode)){i.cbArg=e=>e.get(o.rowMode);break}if("string"==typeof o.rowMode&&o.rowMode.length>1&&"$"===o.rowMode[0]){const e=o.rowMode.substr(1);i.cbArg=r=>{const s=r.get(Object.create(null))[e];return void 0===s?t(n.SQLITE_NOTFOUND,"exec(): unknown result column:",e):s};break}t("Invalid rowMode:",o.rowMode)}return i}(this,arguments);if(!e.sql)return t("exec() requires an SQL string.");const i=e.opt,o=i.callback,a=Array.isArray(i.resultRows)?i.resultRows:void 0;let l,c=i.bind,_=!!(e.cbArg||i.columnNames||a);const u=r.scopedAllocPush(),h=Array.isArray(i.saveSql)?i.saveSql:void 0;try{const t=s.isSQLableTypedArray(e.sql);let u=t?e.sql.byteLength:r.jstrlen(e.sql);const m=r.scopedAlloc(2*r.ptrSizeof+(u+1)),g=m+r.ptrSizeof;let b=g+r.ptrSizeof;const y=b+u;for(t?r.heap8().set(e.sql,b):r.jstrcpy(e.sql,r.heap8(),b,u,!1),r.poke(b+u,0);b&&r.peek(b,"i8");){r.pokePtr([m,g],0),d.checkRc(this,n.sqlite3_prepare_v3(this.pointer,b,u,0,m,g));const t=r.peekPtr(m);if(b=r.peekPtr(g),u=y-b,t){if(h&&h.push(n.sqlite3_sql(t).trim()),l=new p(this,t,f),c&&l.parameterCount&&(l.bind(c),c=null),_&&l.columnCount){let t=Array.isArray(i.columnNames)?0:1;if(_=!1,e.cbArg||a){for(;l.step();l._lockedByExec=!1){0==t++&&l.getColumnNames(i.columnNames),l._lockedByExec=!0;const n=e.cbArg(l);if(a&&a.push(n),o&&!1===o.call(i,n,l))break}l._lockedByExec=!1}0===t&&l.getColumnNames(i.columnNames)}else l.step();l.reset().finalize(),l=null}}}finally{r.scopedAllocPop(u),l&&(delete l._lockedByExec,l.finalize())}return e.returnVal()},createFunction:function(e,r,i){const o=e=>e instanceof Function;switch(arguments.length){case 1:e=(i=e).name,r=i.xFunc||0;break;case 2:o(r)||(r=(i=r).xFunc||0)}i||(i={}),"string"!=typeof e&&t("Invalid arguments: missing function name.");let l=i.xStep||0,c=i.xFinal||0;const _=i.xValue||0,u=i.xInverse||0;let f;o(r)?(f=!1,(o(l)||o(c))&&t("Ambiguous arguments: scalar or aggregate?"),l=c=null):o(l)?(o(c)||t("Missing xFinal() callback for aggregate or window UDF."),r=null):o(c)?t("Missing xStep() callback for aggregate or window UDF."):t("Missing function-type properties."),!1===f?(o(_)||o(u))&&t("xValue and xInverse are not permitted for non-window UDFs."):o(_)?(o(u)||t("xInverse must be provided if xValue is."),f=!0):o(u)&&t("xValue must be provided if xInverse is.");const p=i.pApp;null==p||"number"==typeof p&&s.isInt32(p)||t("Invalid value for pApp property. Must be a legal WASM pointer value.");const m=i.xDestroy||0;m&&!o(m)&&t("xDestroy property must be a function.");let h=0;a(i,"deterministic")&&(h|=n.SQLITE_DETERMINISTIC),a(i,"directOnly")&&(h|=n.SQLITE_DIRECTONLY),a(i,"innocuous")&&(h|=n.SQLITE_INNOCUOUS),e=e.toLowerCase();const g=r||l,b=a(i,"arity"),y="number"==typeof b?b:g.length?g.length-1:0;let q;return q=f?n.sqlite3_create_window_function(this.pointer,e,y,n.SQLITE_UTF8|h,p||0,l,c,_,u,m):n.sqlite3_create_function_v2(this.pointer,e,y,n.SQLITE_UTF8|h,p||0,r,l,c,m),d.checkRc(this,q),this},selectValue:function(e,t,n){return g(this,e,t,0,n)},selectValues:function(e,t,n){const r=this.prepare(e),s=[];try{for(r.bind(t);r.step();)s.push(r.get(0,n));r.reset()}finally{r.finalize()}return s},selectArray:function(e,t){return g(this,e,t,[])},selectObject:function(e,t){return g(this,e,t,{})},selectArrays:function(e,t){return b(this,e,t,"array")},selectObjects:function(e,t){return b(this,e,t,"object")},openStatementCount:function(){return this.pointer?Object.keys(o.get(this)).length:0},transaction:function(e){let r="BEGIN";arguments.length>1&&(/[^a-zA-Z]/.test(arguments[0])&&t(n.SQLITE_MISUSE,"Invalid argument for BEGIN qualifier."),r+=" "+arguments[0],e=arguments[1]),m(this).exec(r);try{const t=e(this);return this.exec("COMMIT"),t}catch(e){throw this.exec("ROLLBACK"),e}},savepoint:function(e){m(this).exec("SAVEPOINT oo1");try{const t=e(this);return this.exec("RELEASE oo1"),t}catch(e){throw this.exec("ROLLBACK to SAVEPOINT oo1; RELEASE SAVEPOINT oo1"),e}},checkRc:function(e){return l(this,e)}};const y=function(e){return e.pointer||t("Stmt has been closed."),e},q=function(e){return function(e){let t=f[null==e?"null":typeof e];switch(t){case f.boolean:case f.null:case f.number:case f.string:return t;case f.bigint:if(r.bigIntEnabled)return t;default:return s.isBindableTypedArray(e)?f.blob:void 0}}(e)||t("Unsupported bind() argument type:",typeof e)},E=function(e,n){return e._lockedByExec&&t("Operation is illegal when statement is locked:",n),e},v=function i(o,a,l,c){E(y(o),"bind()"),i._||(i._tooBigInt=e=>t("BigInt value is too big to store without precision loss:",e),i._={string:function(e,t,s,i){const[o,a]=r.allocCString(s,!0);return(i?n.sqlite3_bind_blob:n.sqlite3_bind_text)(e.pointer,t,o,a,n.SQLITE_WASM_DEALLOC)}}),q(c),a=function(e,r){const i="number"==typeof r?r:n.sqlite3_bind_parameter_index(e.pointer,r);return 0!==i&&s.isInt32(i)?(i<1||i>e.parameterCount)&&t("Bind index",r,"is out of range."):t("Invalid bind() parameter name: "+r),i}(o,a);let _=0;switch(null==c?f.null:l){case f.null:_=n.sqlite3_bind_null(o.pointer,a);break;case f.string:_=i._.string(o,a,c,!1);break;case f.number:{let e;s.isInt32(c)?e=n.sqlite3_bind_int:"bigint"==typeof c?s.bigIntFits64(c)?r.bigIntEnabled?e=n.sqlite3_bind_int64:s.bigIntFitsDouble(c)?(c=Number(c),e=n.sqlite3_bind_double):i._tooBigInt(c):i._tooBigInt(c):(c=Number(c),e=r.bigIntEnabled&&Number.isInteger(c)?n.sqlite3_bind_int64:n.sqlite3_bind_double),_=e(o.pointer,a,c);break}case f.boolean:_=n.sqlite3_bind_int(o.pointer,a,c?1:0);break;case f.blob:{if("string"==typeof c){_=i._.string(o,a,c,!0);break}c instanceof ArrayBuffer?c=new Uint8Array(c):s.isBindableTypedArray(c)||t("Binding a value as a blob requires","that it be a string, Uint8Array, Int8Array, or ArrayBuffer.");const e=r.alloc(c.byteLength||1);r.heap8().set(c.byteLength?c:[0],e),_=n.sqlite3_bind_blob(o.pointer,a,e,c.byteLength,n.SQLITE_WASM_DEALLOC);break}default:e.config.warn("Unsupported bind() argument type:",c),t("Unsupported bind() argument type: "+typeof c)}return _&&d.checkRc(o.db.pointer,_),o._mayGet=!1,o};p.prototype={finalize:function(){if(this.pointer){E(this,"finalize()");const e=n.sqlite3_finalize(this.pointer);return delete o.get(this.db)[this.pointer],i.delete(this),delete this._mayGet,delete this.parameterCount,delete this._lockedByExec,delete this.db,e}},clearBindings:function(){return E(y(this),"clearBindings()"),n.sqlite3_clear_bindings(this.pointer),this._mayGet=!1,this},reset:function(e){E(this,"reset()"),e&&this.clearBindings();const t=n.sqlite3_reset(y(this).pointer);return this._mayGet=!1,l(this.db,t),this},bind:function(){let e,n;switch(y(this),arguments.length){case 1:e=1,n=arguments[0];break;case 2:e=arguments[0],n=arguments[1];break;default:t("Invalid bind() arguments.")}return void 0===n?this:(this.parameterCount||t("This statement has no bindable parameters."),this._mayGet=!1,null===n?v(this,e,f.null,n):Array.isArray(n)?(1!==arguments.length&&t("When binding an array, an index argument is not permitted."),n.forEach(((e,t)=>v(this,t+1,q(e),e))),this):(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),"object"!=typeof n||s.isBindableTypedArray(n)?v(this,e,q(n),n):(1!==arguments.length&&t("When binding an object, an index argument is not permitted."),Object.keys(n).forEach((e=>v(this,e,q(n[e]),n[e]))),this)))},bindAsBlob:function(e,n){y(this),1===arguments.length&&(n=e,e=1);const r=q(n);return f.string!==r&&f.blob!==r&&f.null!==r&&t("Invalid value type for bindAsBlob()"),v(this,e,f.blob,n)},step:function(){E(this,"step()");const t=n.sqlite3_step(y(this).pointer);switch(t){case n.SQLITE_DONE:return this._mayGet=!1;case n.SQLITE_ROW:return this._mayGet=!0;default:this._mayGet=!1,e.config.warn("sqlite3_step() rc=",t,n.sqlite3_js_rc_str(t),"SQL =",n.sqlite3_sql(this.pointer)),d.checkRc(this.db.pointer,t)}},stepReset:function(){return this.step(),this.reset()},stepFinalize:function(){try{const e=this.step();return this.reset(),e}finally{try{this.finalize()}catch(e){}}},get:function(e,i){if(y(this)._mayGet||t("Stmt.step() has not (recently) returned true."),Array.isArray(e)){let t=0;const n=this.columnCount;for(;t=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t).valueOf():t}{const r=n.sqlite3_column_double(this.pointer,e);return(r>Number.MAX_SAFE_INTEGER||rt("The pointer property is read-only.")};Object.defineProperty(p.prototype,"pointer",e),Object.defineProperty(d.prototype,"pointer",e)}if(Object.defineProperty(p.prototype,"columnCount",{enumerable:!1,get:function(){return n.sqlite3_column_count(this.pointer)},set:()=>t("The columnCount property is read-only.")}),e.oo1={DB:d,Stmt:p},s.isUIThread()){e.oo1.JsStorageDb=function(e="session"){"session"!==e&&"local"!==e&&t("JsStorageDb db name must be one of 'session' or 'local'."),u.call(this,{filename:e,flags:"c",vfs:"kvvfs"})};const r=e.oo1.JsStorageDb;r.prototype=Object.create(d.prototype),r.clearStorage=n.sqlite3_js_kvvfs_clear,r.prototype.clearStorage=function(){return r.clearStorage(m(this).filename)},r.storageSize=n.sqlite3_js_kvvfs_size,r.prototype.storageSize=function(){return r.storageSize(m(this).filename)}}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){e.initWorker1API=function(){const e=(...e)=>{throw new Error(e.join(" "))};globalThis.WorkerGlobalScope instanceof Function||e("initWorker1API() must be run from a Worker thread.");const t=this.sqlite3||e("Missing this.sqlite3 object."),n=t.oo1.DB,r=function(e){let t=s.idMap.get(e);return t||(t="db#"+ ++s.idSeq+"@"+e.pointer,s.idMap.set(e,t),t)},s={dbList:[],idSeq:0,idMap:new WeakMap,xfer:[],open:function(e){const t=new n(e);return this.dbs[r(t)]=t,this.dbList.indexOf(t)<0&&this.dbList.push(t),t},close:function(e,n){if(e){delete this.dbs[r(e)];const s=e.filename,i=t.wasm.sqlite3_wasm_db_vfs(e.pointer,0);e.close();const o=this.dbList.indexOf(e);o>=0&&this.dbList.splice(o,1),n&&s&&i&&t.wasm.sqlite3_wasm_vfs_unlink(i,s)}},post:function(e,t){t&&t.length?(globalThis.postMessage(e,Array.from(t)),t.length=0):globalThis.postMessage(e)},dbs:Object.create(null),getDb:function(t,n=!0){return this.dbs[t]||(n?e("Unknown (or closed) DB ID:",t):void 0)}},i=function(t,n=!0){const r=s.getDb(t.dbId,!1)||s.dbList[0];return n?function(t=s.dbList[0]){return t&&t.pointer?t:e("DB is not opened.")}(r):r},o={open:function(n){const i=Object.create(null),o=n.args||Object.create(null);o.simulateError&&e("Throwing because of simulateError flag.");const a=Object.create(null);let l,c;var _;if(i.vfs=o.vfs,""===(_=o.filename)||":"===_[0]?i.filename=o.filename||"":(i.filename=o.filename,l=o.byteArray,l&&(c=function(e){const n=/^file:.+(vfs=(\w+))/.exec(e);return t.capi.sqlite3_vfs_find(n?n[2]:0)}(o.filename))),c){let e;try{e=t.wasm.allocFromTypedArray(l);const n=t.wasm.sqlite3_wasm_vfs_create_file(c,i.filename,e,l.byteLength);n&&t.SQLite3Error.toss(n)}catch(e){throw new t.SQLite3Error(e.name+" creating "+o.filename+": "+e.message,{cause:e})}finally{e&&t.wasm.dealloc(e)}}const u=s.open(i);return a.filename=u.filename,a.persistent=!!t.capi.sqlite3_js_db_uses_vfs(u.pointer,"opfs"),a.dbId=r(u),a.vfs=u.dbVfsName(),a},close:function(e){const t=i(e,!1),n={filename:t&&t.filename};if(t){const n=!(!e.args||"object"!=typeof e.args||!e.args.unlink);s.close(t,n)}return n},exec:function(t){const n="string"==typeof t.args?{sql:t.args}:t.args||Object.create(null);"stmt"===n.rowMode?e("Invalid rowMode for 'exec': stmt mode","does not work in the Worker API."):n.sql||e("'exec' requires input SQL.");const r=i(t);(n.callback||Array.isArray(n.resultRows))&&(r._blobXfer=s.xfer);const o=n.callback;let a=0;const l=!!n.columnNames;"string"==typeof o&&(l||(n.columnNames=[]),n.callback=function(e,t){s.post({type:o,columnNames:n.columnNames,rowNumber:++a,row:e},s.xfer)});try{const e=n.countChanges?r.changes(!0,64===n.countChanges):void 0;r.exec(n),void 0!==e&&(n.changeCount=r.changes(!0,64===n.countChanges)-e),n.callback instanceof Function&&(n.callback=o,s.post({type:o,columnNames:n.columnNames,rowNumber:null,row:void 0}))}finally{delete r._blobXfer,n.callback&&(n.callback=o)}return n},"config-get":function(){const e=Object.create(null),n=t.config;return["bigIntEnabled"].forEach((function(t){Object.getOwnPropertyDescriptor(n,t)&&(e[t]=n[t])})),e.version=t.version,e.vfsList=t.capi.sqlite3_js_vfs_list(),e.opfsEnabled=!!t.opfs,e},export:function(e){const n=i(e),r={byteArray:t.capi.sqlite3_js_db_export(n.pointer),filename:n.filename,mimetype:"application/x-sqlite3"};return s.xfer.push(r.byteArray.buffer),r},toss:function(t){e("Testing worker exception")},"opfs-tree":async function(n){return t.opfs||e("OPFS support is unavailable."),await t.opfs.treeList()}};globalThis.onmessage=async function(t){let n,i=(t=t.data).dbId,a=t.type;const l=performance.now();try{o.hasOwnProperty(a)&&o[a]instanceof Function?n=await o[a](t):e("Unknown db worker message type:",t.type)}catch(e){a="error",n={operation:t.type,message:e.message,errorClass:e.name,input:t},e.stack&&(n.stack="string"==typeof e.stack?e.stack.split(/\n\s*/):e.stack)}i||(i=n.dbId||s.dbList[0]&&r(s.dbList[0])),s.post({type:a,dbId:i,messageId:t.messageId,workerReceivedTime:l,workerRespondTime:performance.now(),departureTime:t.departureTime,result:n},s.xfer)},globalThis.postMessage({type:"sqlite3-api",result:"worker1-ready"})}.bind({sqlite3:e})})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.wasm,n=e.capi,r=e.util.toss3,s=Object.create(null),i=Object.create(null),o=e.StructBinder;e.vfs=s,e.vtab=i;const a=n.sqlite3_index_info;a.prototype.nthConstraint=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const n=this.$aConstraint+a.sqlite3_index_constraint.structInfo.sizeof*e;return t?n:new a.sqlite3_index_constraint(n)},a.prototype.nthConstraintUsage=function(e,t=!1){if(e<0||e>=this.$nConstraint)return!1;const n=this.$aConstraintUsage+a.sqlite3_index_constraint_usage.structInfo.sizeof*e;return t?n:new a.sqlite3_index_constraint_usage(n)},a.prototype.nthOrderBy=function(e,t=!1){if(e<0||e>=this.$nOrderBy)return!1;const n=this.$aOrderBy+a.sqlite3_index_orderby.structInfo.sizeof*e;return t?n:new a.sqlite3_index_orderby(n)};const l=function e(n,s,i,a=e.installMethodArgcCheck){if(n instanceof o.StructType?i instanceof Function||t.isPtr(i)||r("Usage errror: expecting a Function or WASM pointer to one."):r("Usage error: target object is-not-a StructType."),1===arguments.length)return(t,r)=>e(n,t,r,a);e.argcProxy||(e.argcProxy=function(e,t,n,s){return function(...i){return n.length!==arguments.length&&r("Argument mismatch for",e.structInfo.name+"::"+t+": Native signature is:",s),n.apply(this,i)}},e.removeFuncList=function(){this.ondispose.__removeFuncList&&(this.ondispose.__removeFuncList.forEach(((e,n)=>{if("number"==typeof e)try{t.uninstallFunction(e)}catch(e){}})),delete this.ondispose.__removeFuncList)});const l=n.memberSignature(s);l.length<2&&r("Member",s,"does not have a function pointer signature:",l);const c=n.memberKey(s),_=a&&!t.isPtr(i)?e.argcProxy(n,c,i,l):i;if(t.isPtr(_))_&&!t.functionEntry(_)&&r("Pointer",_,"is not a WASM function table entry."),n[c]=_;else{const r=t.installFunction(_,n.memberSignature(s,!0));n[c]=r,n.ondispose&&n.ondispose.__removeFuncList||(n.addOnDispose("ondispose.__removeFuncList handler",e.removeFuncList),n.ondispose.__removeFuncList=[]),n.ondispose.__removeFuncList.push(c,r)}return(t,r)=>e(n,t,r,a)};l.installMethodArgcCheck=!1;const c=function(e,t,n=l.installMethodArgcCheck){const r=new Map;for(const s of Object.keys(t)){const i=t[s],o=r.get(i);if(o){const t=e.memberKey(s);e[t]=e[e.memberKey(o)]}else l(e,s,i,n),r.set(i,s)}return e};o.StructType.prototype.installMethod=function(e,t,n=l.installMethodArgcCheck){return arguments.length<3&&e&&"object"==typeof e?c(this,...arguments):l(this,...arguments)},o.StructType.prototype.installMethods=function(e,t=l.installMethodArgcCheck){return c(this,e,t)},n.sqlite3_vfs.prototype.registerVfs=function(t=!1){this instanceof e.capi.sqlite3_vfs||r("Expecting a sqlite3_vfs-type argument.");const s=n.sqlite3_vfs_register(this,t?1:0);return s&&r("sqlite3_vfs_register(",this,") failed with rc",s),this.pointer!==n.sqlite3_vfs_find(this.$zName)&&r("BUG: sqlite3_vfs_find(vfs.$zName) failed for just-installed VFS",this),this},s.installVfs=function(e){let n=0;const s=["io","vfs"];for(const r of s){const s=e[r];s&&(++n,c(s.struct,s.methods,!!s.applyArgcCheck),"vfs"===r&&(s.struct.$zName||"string"!=typeof s.name||s.struct.addOnDispose(s.struct.$zName=t.allocCString(s.name)),s.struct.registerVfs(!!s.asDefault)))}return n||r("Misuse: installVfs() options object requires at least","one of:",s),this};const _=function(n,r){const s=function(n,r){return function(s,i=!1){if(0===arguments.length&&(s=new r),s instanceof r)return this.set(s.pointer,s),s;t.isPtr(s)||e.SQLite3Error.toss("Invalid argument to",n+"()");let o=this.get(s);return i&&this.delete(s),o}.bind(new Map)}(n,r);return Object.assign(Object.create(null),{StructType:r,create:e=>{const n=s();return t.pokePtr(e,n.pointer),n},get:e=>s(e),unget:e=>s(e,!0),dispose:e=>{const t=s(e,!0);t&&t.dispose()}})};i.xVtab=_("xVtab",n.sqlite3_vtab),i.xCursor=_("xCursor",n.sqlite3_vtab_cursor),i.xIndexInfo=e=>new n.sqlite3_index_info(e),i.xError=function t(r,s,i){if(t.errorReporter instanceof Function)try{t.errorReporter("sqlite3_module::"+r+"(): "+s.message)}catch(e){}let o;return s instanceof e.WasmAllocError?o=n.SQLITE_NOMEM:arguments.length>2?o=i:s instanceof e.SQLite3Error&&(o=s.resultCode),o||n.SQLITE_ERROR},i.xError.errorReporter=console.error.bind(console),i.xRowid=(e,n)=>t.poke(e,n,"i64"),i.setupModule=function(s){let o=!1;const a=this instanceof n.sqlite3_module?this:s.struct||(o=new n.sqlite3_module);try{const n=s.methods||r("Missing 'methods' object.");for(const e of Object.entries({xConnect:"xCreate",xDisconnect:"xDestroy"})){const t=e[0],r=e[1];!0===n[t]?n[t]=n[r]:!0===n[r]&&(n[r]=n[t])}if(s.catchExceptions){const r=function(n,r){return["xConnect","xCreate"].indexOf(n)>=0?function(s,o,a,l,c,_){try{return r(...arguments)||0}catch(r){return r instanceof e.WasmAllocError||(t.dealloc(t.peekPtr(_)),t.pokePtr(_,t.allocCString(r.message))),i.xError(n,r)}}:function(...e){try{return r(...e)||0}catch(e){return i.xError(n,e)}}},s=["xCreate","xConnect","xBestIndex","xDisconnect","xDestroy","xOpen","xClose","xFilter","xNext","xEof","xColumn","xRowid","xUpdate","xBegin","xSync","xCommit","xRollback","xFindFunction","xRename","xSavepoint","xRelease","xRollbackTo","xShadowName"],o=Object.create(null);for(const e of s){const t=n[e];t instanceof Function&&("xConnect"===e&&n.xCreate===t?o[e]=n.xCreate:"xCreate"===e&&n.xConnect===t?o[e]=n.xConnect:o[e]=r(e,t))}c(a,o,!1)}else c(a,n,!!s.applyArgcCheck);if(0===a.$iVersion){let e;e="number"==typeof s.iVersion?s.iVersion:a.$xShadowName?3:a.$xSavePoint||a.$xRelease||a.$xRollbackTo?2:1,a.$iVersion=e}}catch(e){throw o&&o.dispose(),e}return a},n.sqlite3_module.prototype.setupModule=function(e){return i.setupModule.call(this,e)}})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=function t(r){if(!globalThis.SharedArrayBuffer||!globalThis.Atomics)return Promise.reject(new Error("Cannot install OPFS: Missing SharedArrayBuffer and/or Atomics. The server must emit the COOP/COEP response headers to enable those. See https://sqlite.org/wasm/doc/trunk/persistence.md#coop-coep"));if("undefined"==typeof WorkerGlobalScope)return Promise.reject(new Error("The OPFS sqlite3_vfs cannot run in the main thread because it requires Atomics.wait()."));if(!(globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle&&globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle&&navigator?.storage?.getDirectory))return Promise.reject(new Error("Missing required OPFS APIs."));r&&"object"==typeof r||(r=Object.create(null));const s=new URL(globalThis.location.href).searchParams;if(s.has("opfs-disable"))return Promise.resolve(e);void 0===r.verbose&&(r.verbose=s.has("opfs-verbose")?+s.get("opfs-verbose")||2:1),void 0===r.sanityChecks&&(r.sanityChecks=s.has("opfs-sanity-check")),void 0===r.proxyUri&&(r.proxyUri=t.defaultProxyUri),"function"==typeof r.proxyUri&&(r.proxyUri=r.proxyUri());const i=new Promise((function(t,s){const i=[e.config.error,e.config.warn,e.config.log],o=(e,...t)=>{r.verbose>e&&i[e]("OPFS syncer:",...t)},a=(...e)=>o(2,...e),l=(...e)=>o(1,...e),c=(...e)=>o(0,...e),_=e.util.toss,u=e.capi,d=e.util,f=e.wasm,p=u.sqlite3_vfs,m=u.sqlite3_file,h=u.sqlite3_io_methods,g=Object.create(null);g.metrics={dump:function(){let t,n=0,r=0,s=0;for(t in x.opIds){const e=T[t];n+=e.count,r+=e.time,s+=e.wait,e.avgTime=e.count&&e.time?e.time/e.count:0,e.avgWait=e.count&&e.wait?e.wait/e.count:0}e.config.log(globalThis.location.href,"metrics for",globalThis.location.href,":",T,"\nTotal of",n,"op(s) for",r,"ms (incl. "+s+" ms of waiting on the async side)"),e.config.log("Serialization metrics:",T.s11n),w.postMessage({type:"opfs-async-metrics"})},reset:function(){let e;for(e in x.opIds)(t=T[e]=Object.create(null)).count=t.time=t.wait=0;var t;let n=T.s11n=Object.create(null);n=n.serialize=Object.create(null),n.count=n.time=0,n=T.s11n.deserialize=Object.create(null),n.count=n.time=0}};const b=new h,y=(new p).addOnDispose((()=>b.dispose()));let q;const E=e=>(q=!0,y.dispose(),s(e)),v=()=>(q=!1,t(e)),w=new Worker(new URL(n.p+n.u(892),n.b));setTimeout((()=>{void 0===q&&E(new Error("Timeout while waiting for OPFS async proxy worker."))}),4e3),w._originalOnError=w.onerror,w.onerror=function(e){c("Error initializing OPFS asyncer:",e),E(new Error("Loading OPFS async Worker failed for unknown reasons."))};const S=u.sqlite3_vfs_find(null),A=S?new p(S):null;b.$iVersion=1,y.$iVersion=2,y.$szOsFile=u.sqlite3_file.structInfo.sizeof,y.$mxPathname=1024,y.$zName=f.allocCString("opfs"),y.$xDlOpen=y.$xDlError=y.$xDlSym=y.$xDlClose=null,y.addOnDispose("$zName",y.$zName,"cleanup default VFS wrapper",(()=>A?A.dispose():null));const x=Object.create(null);x.verbose=r.verbose,x.littleEndian=(()=>{const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]})(),x.asyncIdleWaitTime=150,x.asyncS11nExceptions=1,x.fileBufferSize=65536,x.sabS11nOffset=x.fileBufferSize,x.sabS11nSize=2*y.$mxPathname,x.sabIO=new SharedArrayBuffer(x.fileBufferSize+x.sabS11nSize),x.opIds=Object.create(null);const T=Object.create(null);{let e=0;x.opIds.whichOp=e++,x.opIds.rc=e++,x.opIds.xAccess=e++,x.opIds.xClose=e++,x.opIds.xDelete=e++,x.opIds.xDeleteNoWait=e++,x.opIds.xFileSize=e++,x.opIds.xLock=e++,x.opIds.xOpen=e++,x.opIds.xRead=e++,x.opIds.xSleep=e++,x.opIds.xSync=e++,x.opIds.xTruncate=e++,x.opIds.xUnlock=e++,x.opIds.xWrite=e++,x.opIds.mkdir=e++,x.opIds["opfs-async-metrics"]=e++,x.opIds["opfs-async-shutdown"]=e++,x.opIds.retry=e++,x.sabOP=new SharedArrayBuffer(4*e),g.metrics.reset()}x.sq3Codes=Object.create(null),["SQLITE_ACCESS_EXISTS","SQLITE_ACCESS_READWRITE","SQLITE_BUSY","SQLITE_ERROR","SQLITE_IOERR","SQLITE_IOERR_ACCESS","SQLITE_IOERR_CLOSE","SQLITE_IOERR_DELETE","SQLITE_IOERR_FSYNC","SQLITE_IOERR_LOCK","SQLITE_IOERR_READ","SQLITE_IOERR_SHORT_READ","SQLITE_IOERR_TRUNCATE","SQLITE_IOERR_UNLOCK","SQLITE_IOERR_WRITE","SQLITE_LOCK_EXCLUSIVE","SQLITE_LOCK_NONE","SQLITE_LOCK_PENDING","SQLITE_LOCK_RESERVED","SQLITE_LOCK_SHARED","SQLITE_LOCKED","SQLITE_MISUSE","SQLITE_NOTFOUND","SQLITE_OPEN_CREATE","SQLITE_OPEN_DELETEONCLOSE","SQLITE_OPEN_MAIN_DB","SQLITE_OPEN_READONLY"].forEach((e=>{void 0===(x.sq3Codes[e]=u[e])&&_("Maintenance required: not found:",e)})),x.opfsFlags=Object.assign(Object.create(null),{OPFS_UNLOCK_ASAP:1,defaultUnlockAsap:!1});const I=(e,...t)=>{const n=x.opIds[e]||_("Invalid op ID:",e);x.s11n.serialize(...t),Atomics.store(x.sabOPView,x.opIds.rc,-1),Atomics.store(x.sabOPView,x.opIds.whichOp,n),Atomics.notify(x.sabOPView,x.opIds.whichOp);const r=performance.now();Atomics.wait(x.sabOPView,x.opIds.rc,-1);const s=Atomics.load(x.sabOPView,x.opIds.rc);if(T[e].wait+=performance.now()-r,s&&x.asyncS11nExceptions){const t=x.s11n.deserialize();t&&c(e+"() async error:",...t)}return s};g.debug={asyncShutdown:()=>{l("Shutting down OPFS async listener. The OPFS VFS will no longer work."),I("opfs-async-shutdown")},asyncRestart:()=>{l("Attempting to restart OPFS VFS async listener. Might work, might not."),w.postMessage({type:"opfs-async-restart"})}};const k=function e(t=16){e._chars||(e._n=(e._chars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012346789").length);const n=[];let r=0;for(;r{O.start=performance.now(),O.op=e,++T[e].count},L=()=>T[O.op].time+=performance.now()-O.start,C={xCheckReservedLock:function(e,t){const n=F[e];return f.poke(t,n.lockType?1:0,"i32"),0},xClose:function(e){P("xClose");let t=0;const n=F[e];return n&&(delete F[e],t=I("xClose",e),n.sq3File&&n.sq3File.dispose()),L(),t},xDeviceCharacteristics:function(e){return u.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,n){return u.SQLITE_NOTFOUND},xFileSize:function(e,t){P("xFileSize");let n=I("xFileSize",e);if(0==n)try{const e=x.s11n.deserialize()[0];f.poke(t,e,"i64")}catch(e){c("Unexpected error reading xFileSize() result:",e),n=x.sq3Codes.SQLITE_IOERR}return L(),n},xLock:function(e,t){P("xLock");const n=F[e];let r=0;return n.lockType?n.lockType=t:(r=I("xLock",e,t),0===r&&(n.lockType=t)),L(),r},xRead:function(e,t,n,r){P("xRead");const s=F[e];let i;try{i=I("xRead",e,n,Number(r)),0!==i&&u.SQLITE_IOERR_SHORT_READ!==i||f.heap8u().set(s.sabView.subarray(0,n),t)}catch(e){c("xRead(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_READ}return L(),i},xSync:function(e,t){P("xSync"),++T.xSync.count;const n=I("xSync",e,t);return L(),n},xTruncate:function(e,t){P("xTruncate");const n=I("xTruncate",e,Number(t));return L(),n},xUnlock:function(e,t){P("xUnlock");const n=F[e];let r=0;return u.SQLITE_LOCK_NONE===t&&n.lockType&&(r=I("xUnlock",e,t)),0===r&&(n.lockType=t),L(),r},xWrite:function(e,t,n,r){P("xWrite");const s=F[e];let i;try{s.sabView.set(f.heap8u().subarray(t,t+n)),i=I("xWrite",e,n,Number(r))}catch(e){c("xWrite(",arguments,") failed:",e,s),i=u.SQLITE_IOERR_WRITE}return L(),i}},N={xAccess:function(e,t,n,r){P("xAccess");const s=I("xAccess",f.cstrToJs(t));return f.poke(r,s?0:1,"i32"),L(),0},xCurrentTime:function(e,t){return f.poke(t,2440587.5+(new Date).getTime()/864e5,"double"),0},xCurrentTimeInt64:function(e,t){return f.poke(t,21086676e7+(new Date).getTime(),"i64"),0},xDelete:function(e,t,n){P("xDelete");const r=I("xDelete",f.cstrToJs(t),n,!1);return L(),r},xFullPathname:function(e,t,n,r){return f.cstrncpy(r,t,n)!!e)):n},g.getDirForFilename=async function(e,t=!1){const n=g.getResolvedPath(e,!0),r=n.pop();let s=g.rootDirectory;for(const e of n)e&&(s=await s.getDirectoryHandle(e,{create:!!t}));return[s,r]},g.mkdir=async function(e){try{return await g.getDirForFilename(e+"/filepart",!0),!0}catch(e){return!1}},g.entryExists=async function(e){try{const[t,n]=await g.getDirForFilename(e);return await t.getFileHandle(n),!0}catch(e){return!1}},g.randomFilename=k,g.registerVfs=(e=!1)=>f.exports.sqlite3_vfs_register(y.pointer,e?1:0),g.treeList=async function(){const e=Object.create(null);return await async function e(t,n){n.name=t.name,n.dirs=[],n.files=[];for await(const r of t.values())if("directory"===r.kind){const t=Object.create(null);n.dirs.push(t),await e(r,t)}else n.files.push(r.name)}(g.rootDirectory,e),e},g.rmfr=async function(){const e=g.rootDirectory,t={recurse:!0};for await(const n of e.values())e.removeEntry(n.name,t)},g.unlink=async function(e,t=!1,n=!1){try{const[n,r]=await g.getDirForFilename(e,!1);return await n.removeEntry(r,{recursive:t}),!0}catch(e){if(n)throw new Error("unlink(",arguments[0],") failed: "+e.message,{cause:e});return!1}},g.traverse=async function(e){const t={recursive:!0,directory:g.rootDirectory};"function"==typeof e&&(e={callback:e}),async function t(n,r){for await(const s of n.values()){if(!1===e.callback(s,n,r))return!1;if(e.recursive&&"directory"===s.kind&&!1===await t(s,r+1))break}}((e=Object.assign(t,e||{})).directory,0)},g.importDb=async function(e,t){if(t instanceof Function)return async function(e,t){const[n,r]=await g.getDirForFilename(e,!0),s=await n.getFileHandle(r,{create:!0});let i,o=await s.createSyncAccessHandle(),a=0,l=!1;try{for(o.truncate(0);void 0!==(i=await t());)i instanceof ArrayBuffer&&(i=new Uint8Array(i)),0===a&&i.byteLength>=15&&(d.affirmDbHeader(i),l=!0),o.write(i,{at:a}),a+=i.byteLength;if((a<512||0!=a%512)&&_("Input size",a,"is not correct for an SQLite database."),!l){const e=new Uint8Array(20);o.read(e,{at:0}),d.affirmDbHeader(e)}return o.write(new Uint8Array([1,1]),{at:18}),a}catch(e){throw await o.close(),o=void 0,await n.removeEntry(r).catch((()=>{})),e}finally{o&&await o.close()}}(e,t);t instanceof ArrayBuffer&&(t=new Uint8Array(t)),d.affirmIsDb(t);const n=t.byteLength,[r,s]=await g.getDirForFilename(e,!0);let i,o=0;try{const e=await r.getFileHandle(s,{create:!0});return i=await e.createSyncAccessHandle(),i.truncate(0),o=i.write(t,{at:0}),o!=n&&_("Expected to write "+n+" bytes but wrote "+o+"."),i.write(new Uint8Array([1,1]),{at:18}),o}catch(e){throw i&&(await i.close(),i=void 0),await r.removeEntry(s).catch((()=>{})),e}finally{i&&await i.close()}},e.oo1){const t=function(...t){const n=e.oo1.DB.dbCtorHelper.normalizeArgs(...t);n.vfs=y.$zName,e.oo1.DB.dbCtorHelper.call(this,n)};t.prototype=Object.create(e.oo1.DB.prototype),e.oo1.OpfsDb=t,t.importDb=g.importDb,e.oo1.DB.dbCtorHelper.setVfsPostOpenSql(y.pointer,(function(e,t){t.capi.sqlite3_busy_timeout(e,1e4),t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}w.onmessage=function({data:t}){switch(t.type){case"opfs-unavailable":E(new Error(t.payload.join(" ")));break;case"opfs-async-loaded":w.postMessage({type:"opfs-async-init",args:x});break;case"opfs-async-inited":if(!0===q)break;try{e.vfs.installVfs({io:{struct:b,methods:C},vfs:{struct:y,methods:N}}),x.sabOPView=new Int32Array(x.sabOP),x.sabFileBufView=new Uint8Array(x.sabIO,0,x.fileBufferSize),x.sabS11nView=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),(()=>{if(x.s11n)return x.s11n;const e=new TextDecoder,t=new TextEncoder("utf-8"),n=new Uint8Array(x.sabIO,x.sabS11nOffset,x.sabS11nSize),r=new DataView(x.sabIO,x.sabS11nOffset,x.sabS11nSize);x.s11n=Object.create(null);const s=Object.create(null);s.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},s.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},s.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},s.string={id:4};const i=e=>s[typeof e]||_("Maintenance required: this value type cannot be serialized.",e),o=e=>{switch(e){case s.number.id:return s.number;case s.bigint.id:return s.bigint;case s.boolean.id:return s.boolean;case s.string.id:return s.string;default:_("Invalid type ID:",e)}};x.s11n.deserialize=function(t=!1){++T.s11n.deserialize.count;const s=performance.now(),i=n[0],a=i?[]:null;if(i){const t=[];let s,l,c,_=1;for(s=0;s{w.onerror=w._originalOnError,delete w._originalOnError,e.opfs=g,g.rootDirectory=t,a("End of OPFS sqlite3_vfs setup.",y),v()})).catch(E):v()}catch(e){c(e),E(e)}break;default:{const e="Unexpected message from the OPFS async worker: "+JSON.stringify(t);c(e),E(new Error(e));break}}}}));return i};t.defaultProxyUri="sqlite3-opfs-async-proxy.js",globalThis.sqlite3ApiBootstrap.initializersAsync.push((async e=>{try{let n=t.defaultProxyUri;return e.scriptInfo.sqlite3Dir&&(t.defaultProxyUri=e.scriptInfo.sqlite3Dir+n),t().catch((t=>{e.config.warn("Ignoring inability to install OPFS sqlite3_vfs:",t.message)}))}catch(t){return e.config.error("installOpfsVfs() exception:",t),Promise.reject(t)}}))})),globalThis.sqlite3ApiBootstrap.initializers.push((function(e){const t=e.util.toss,n=e.util.toss3,r=Object.create(null),s=e.capi,i=e.util,o=e.wasm,a=4096,l=s.SQLITE_OPEN_MAIN_DB|s.SQLITE_OPEN_MAIN_JOURNAL|s.SQLITE_OPEN_SUPER_JOURNAL|s.SQLITE_OPEN_WAL,c=".opaque",_=()=>Math.random().toString(36).slice(2),u=new TextDecoder,d=new TextEncoder,f=Object.assign(Object.create(null),{name:"opfs-sahpool",directory:void 0,initialCapacity:6,clearOnInit:!1,verbosity:2}),p=[e.config.error,e.config.warn,e.config.log],m=(e.config.log,e.config.warn),h=(e.config.error,new Map),g=e=>h.get(e),b=(e,t)=>{t?h.set(e,t):h.delete(e)},y=new Map,q=e=>y.get(e),E=(e,t)=>{t?y.set(e,t):y.delete(e)},v={xCheckReservedLock:function(e,t){const n=q(e);return n.log("xCheckReservedLock"),n.storeErr(),o.poke32(t,1),0},xClose:function(e){const t=q(e);t.storeErr();const n=t.getOFileForS3File(e);if(n)try{t.log(`xClose ${n.path}`),t.mapS3FileToOFile(e,!1),n.sah.flush(),n.flags&s.SQLITE_OPEN_DELETEONCLOSE&&t.deletePath(n.path)}catch(e){return t.storeErr(e,s.SQLITE_IOERR)}return 0},xDeviceCharacteristics:function(e){return s.SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN},xFileControl:function(e,t,n){return s.SQLITE_NOTFOUND},xFileSize:function(e,t){const n=q(e);n.log("xFileSize");const r=n.getOFileForS3File(e).sah.getSize()-a;return o.poke64(t,BigInt(r)),0},xLock:function(e,t){const n=q(e);return n.log(`xLock ${t}`),n.storeErr(),n.getOFileForS3File(e).lockType=t,0},xRead:function(e,t,n,r){const i=q(e);i.storeErr();const l=i.getOFileForS3File(e);i.log(`xRead ${l.path} ${n} @ ${r}`);try{const e=l.sah.read(o.heap8u().subarray(t,t+n),{at:a+Number(r)});return et&&o.poke8(n+t-1,0)}catch(i){return s.SQLITE_NOMEM}finally{o.scopedAllocPop(e)}}return i?i.sqlite3Rc||s.SQLITE_IOERR:0},xOpen:function(e,n,r,i,a){const l=g(e);try{l.log(`xOpen ${o.cstrToJs(n)} ${i}`);const e=n&&o.peek8(n)?l.getPath(n):_();let c=l.getSAHForPath(e);!c&&i&s.SQLITE_OPEN_CREATE&&(l.getFileCount()b(r.pointer,0))),a&&(r.$xRandomness=a.$xRandomness,r.$xSleep=a.$xSleep,a.dispose()),r.$xRandomness||S.xRandomness||(S.xRandomness=function(e,t,n){const r=o.heap8u();let s=0;for(;s0),e.vfs.installVfs({vfs:{struct:r,methods:S}}),r}(this.vfsName),b(this.#c.pointer,this),this.vfsDir=t.directory||"."+this.vfsName,this.#l=new DataView(this.#a.buffer,this.#a.byteOffset),this.isReady=this.reset(!!(t.clearOnInit??f.clearOnInit)).then((()=>{if(this.$error)throw this.$error;return this.getCapacity()?Promise.resolve(void 0):this.addCapacity(t.initialCapacity||f.initialCapacity)}))}#u(e,...t){this.#_>e&&p[e](this.vfsName+":",...t)}log(...e){this.#u(2,...e)}warn(...e){this.#u(1,...e)}error(...e){this.#u(0,...e)}getVfs(){return this.#c}getCapacity(){return this.#r.size}getFileCount(){return this.#s.size}getFileNames(){const e=[],t=this.#s.keys();for(const n of t)e.push(n);return e}async addCapacity(e){for(let t=0;t{try{const r=await n.createSyncAccessHandle();if(this.#r.set(r,t),e)r.truncate(a),this.setAssociatedPath(r,"",0);else{const e=this.getAssociatedPath(r);e?this.#s.set(e,r):this.#i.add(r)}}catch(e){throw this.storeErr(e),this.releaseAccessHandles(),e}})))}getAssociatedPath(e){e.read(this.#a,{at:0});const t=this.#l.getUint32(512);if(this.#a[0]&&(t&s.SQLITE_OPEN_DELETEONCLOSE||!(t&l)))return m(`Removing file with unexpected flags ${t.toString(16)}`,this.#a),this.setAssociatedPath(e,"",0),"";const n=new Uint32Array(2);e.read(n,{at:516});const r=this.computeDigest(this.#a);if(n.every(((e,t)=>e===r[t]))){const t=this.#a.findIndex((e=>0===e));return 0===t&&e.truncate(a),t?u.decode(this.#a.subarray(0,t)):""}return m("Disassociating file with bad digest."),this.setAssociatedPath(e,"",0),""}setAssociatedPath(e,n,r){const s=d.encodeInto(n,this.#a);512<=s.written+1&&t("Path too long:",n),this.#a.fill(0,s.written,512),this.#l.setUint32(512,r);const i=this.computeDigest(this.#a);e.write(this.#a,{at:0}),e.write(i,{at:516}),e.flush(),n?(this.#s.set(n,e),this.#i.delete(e)):(e.truncate(a),this.#i.add(e))}computeDigest(e){let t=3735928559,n=1103547991;for(const r of e)t=31*t+307*r,n=31*n+307*r;return new Uint32Array([t>>>0,n>>>0])}async reset(e){await this.isReady;let t,n=await navigator.storage.getDirectory();for(const e of this.vfsDir.split("/"))e&&(t=n,n=await n.getDirectoryHandle(e,{create:!0}));return this.#e=n,this.#n=t,this.#t=await this.#e.getDirectoryHandle(c,{create:!0}),this.releaseAccessHandles(),this.acquireAccessHandles(e)}getPath(e){return o.isPtr(e)&&(e=o.cstrToJs(e)),(e instanceof URL?e:new URL(e,"file://localhost/")).pathname}deletePath(e){const t=this.#s.get(e);return t&&(this.#s.delete(e),this.setAssociatedPath(t,"",0)),!!t}storeErr(e,t){return e&&(e.sqlite3Rc=t||s.SQLITE_IOERR,this.error(e)),this.$error=e,t}popErr(){const e=this.$error;return this.$error=void 0,e}nextAvailableSAH(){const[e]=this.#i.keys();return e}getOFileForS3File(e){return this.#o.get(e)}mapS3FileToOFile(e,t){t?(this.#o.set(e,t),E(e,this)):(this.#o.delete(e),E(e,!1))}hasFilename(e){return this.#s.has(e)}getSAHForPath(e){return this.#s.get(e)}async removeVfs(){if(!this.#c.pointer||!this.#t)return!1;s.sqlite3_vfs_unregister(this.#c.pointer),this.#c.dispose();try{this.releaseAccessHandles(),await this.#e.removeEntry(c,{recursive:!0}),this.#t=void 0,await this.#n.removeEntry(this.#e.name,{recursive:!0}),this.#e=this.#n=void 0}catch(t){e.config.error(this.vfsName,"removeVfs() failed:",t)}return!0}exportFile(e){const n=this.#s.get(e)||t("File not found:",e),r=n.getSize()-a,s=new Uint8Array(r>0?r:0);if(r>0){const e=n.read(s,{at:a});e!=r&&t("Expected to read "+r+" bytes but read "+e+".")}return s}async importDbChunked(e,n){const r=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to.");r.truncate(0);let o,l=0,c=!1;try{for(;void 0!==(o=await n());)o instanceof ArrayBuffer&&(o=new Uint8Array(o)),0===l&&o.byteLength>=15&&(i.affirmDbHeader(o),c=!0),r.write(o,{at:a+l}),l+=o.byteLength;if((l<512||0!=l%512)&&t("Input size",l,"is not correct for an SQLite database."),!c){const e=new Uint8Array(20);r.read(e,{at:0}),i.affirmDbHeader(e)}r.write(new Uint8Array([1,1]),{at:4114})}catch(e){throw this.setAssociatedPath(r,"",0),e}return this.setAssociatedPath(r,e,s.SQLITE_OPEN_MAIN_DB),l}importDb(e,n){if(n instanceof ArrayBuffer)n=new Uint8Array(n);else if(n instanceof Function)return this.importDbChunked(e,n);const r=this.#s.get(e)||this.nextAvailableSAH()||t("No available handles to import to."),i=n.byteLength;(i<512||i%512!=0)&&t("Byte array size is invalid for an SQLite db.");for(let e=0;e<15;++e)"SQLite format 3".charCodeAt(e)!==n[e]&&t("Input does not contain an SQLite database header.");const o=r.write(n,{at:a});return o!=i?(this.setAssociatedPath(r,"",0),t("Expected to write "+i+" bytes but wrote "+o+".")):(r.write(new Uint8Array([1,1]),{at:4114}),this.setAssociatedPath(r,e,s.SQLITE_OPEN_MAIN_DB)),o}}class x{#d;constructor(e){this.#d=e,this.vfsName=e.vfsName}async addCapacity(e){return this.#d.addCapacity(e)}async reduceCapacity(e){return this.#d.reduceCapacity(e)}getCapacity(){return this.#d.getCapacity(this.#d)}getFileCount(){return this.#d.getFileCount()}getFileNames(){return this.#d.getFileNames()}async reserveMinimumCapacity(e){const t=this.#d.getCapacity();return t{const e=await navigator.storage.getDirectory(),n=".opfs-sahpool-sync-check-"+_(),r=await e.getFileHandle(n,{create:!0}),s=(await r.createSyncAccessHandle()).close();return await s,await e.removeEntry(n),s?.then&&t("The local OPFS API is too old for opfs-sahpool:","it has an async FileSystemSyncAccessHandle.close() method."),!0})().then((async function(){if(n.$testThrowInInit)throw n.$testThrowInInit;const t=new A(n);return t.isReady.then((async()=>{const n=new x(t);if(e.oo1){const r=e.oo1,s=t.getVfs(),i=function(...e){const t=r.DB.dbCtorHelper.normalizeArgs(...e);t.vfs=s.$zName,r.DB.dbCtorHelper.call(this,t)};i.prototype=Object.create(r.DB.prototype),n.OpfsSAHPoolDb=i,r.DB.dbCtorHelper.setVfsPostOpenSql(s.pointer,(function(e,t){t.capi.sqlite3_exec(e,["pragma journal_mode=DELETE;","pragma cache_size=-16384;"],0,0,0)}))}return t.log("VFS initialized."),n})).catch((async e=>(await t.removeVfs().catch((()=>{})),e)))})).catch((e=>r[s]=Promise.reject(e))):r[s]=Promise.reject(new Error("Missing required OPFS APIs."))}})),void 0!==e){const t=Object.assign(Object.create(null),{exports:void 0===Re?e.asm:Re,memory:e.wasmMemory},globalThis.sqlite3ApiConfig||{});let n;globalThis.sqlite3ApiConfig=t;try{n=globalThis.sqlite3ApiBootstrap()}catch(e){throw console.error("sqlite3ApiBootstrap() error:",e),e}finally{delete globalThis.sqlite3ApiBootstrap,delete globalThis.sqlite3ApiConfig}e.sqlite3=n}else console.warn("This is not running in an Emscripten module context, so","globalThis.sqlite3ApiBootstrap() is _not_ being called due to lack","of config info for the WASM environment.","It must be called manually.")})),e.ready});const i=function(){const e=s;if(!e)throw new Error("Expecting globalThis.sqlite3InitModule to be defined by the Emscripten build.");const t=globalThis.sqlite3InitModuleState=Object.assign(Object.create(null),{moduleScript:globalThis?.document?.currentScript,isWorker:"undefined"!=typeof WorkerGlobalScope,location:globalThis.location,urlParams:globalThis?.location?.href?new URL(globalThis.location.href).searchParams:new URLSearchParams});if(t.debugModule=t.urlParams.has("sqlite3.debugModule")?(...e)=>console.warn("sqlite3.debugModule:",...e):()=>{},t.urlParams.has("sqlite3.dir"))t.sqlite3Dir=t.urlParams.get("sqlite3.dir")+"/";else if(t.moduleScript){const e=t.moduleScript.src.split("/");e.pop(),t.sqlite3Dir=e.join("/")+"/"}if(globalThis.sqlite3InitModule=function n(...r){return e(...r).then((e=>{const r=e.sqlite3;r.scriptInfo=t,n.__isUnderTest&&(r.__isUnderTest=!0);const s=r.asyncPostInit;return delete r.asyncPostInit,s()})).catch((e=>{throw console.error("Exception loading sqlite3 module:",e),e}))},globalThis.sqlite3InitModule.ready=e.ready,globalThis.sqlite3InitModuleState.moduleScript){const e=globalThis.sqlite3InitModuleState;let t=e.moduleScript.src.split("/");t.pop(),e.scriptDir=t.join("/")+"/"}return t.debugModule("sqlite3InitModuleState =",t),globalThis.sqlite3InitModule}(),o=s=i}}]); \ No newline at end of file diff --git a/4108.bundle.js b/4108.bundle.js index 8cba25e5..c3cdd793 100644 --- a/4108.bundle.js +++ b/4108.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4108],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),l=e(6314),a=e.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var t=e(5072),r=e.n(t),l=e(7825),a=e.n(l),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),b=e.n(u),p=e(1113),m=e.n(p),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=d(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=b(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},1922:n=>{n.exports="data:image/svg+xml,%3csvg width='200px' height='200px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='lds-pacman' style='background: none;'%3e %3cg style='display:block'%3e %3ccircle cx='76.8' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='37.2' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='57' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e%3c/g%3e%3cg ng-attr-transform='translate(%7b%7bconfig.showBeanOffset%7d%7d 0)' transform='translate(-15 0)'%3e %3cpath d='M50 50L20 50A30 30 0 0 0 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3cpath d='M50 50L20 50A30 30 0 0 1 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(-33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;-45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3c/g%3e %3c/svg%3e"},4108:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>c});var t=e(6540),r=e(3407),l=e(7240),a=e(1922),i=e.n(a);function c(){const[n,o]=t.useState(0);return t.createElement(t.Fragment,null,t.createElement(l.f9,{className:"example-map",initial:{center:(0,r.Rb)([2.364,48.82]),zoom:4}},t.createElement(l.HS,{onTileLoadStart:()=>o((n=>n+1)),onTileLoadEnd:()=>o((n=>n-1)),url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"})),t.createElement("div",{className:"example-spinner",style:{display:n?"initial":"none"}},t.createElement("img",{src:i(),alt:"spinner"}),t.createElement("strong",null,n," Loading...")))}e(5045)}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4108],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),l=e(6314),a=e.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var t=e(5072),r=e.n(t),l=e(7825),a=e.n(l),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),p=e.n(u),b=e(1113),m=e.n(b),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=d(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},1922:n=>{n.exports="data:image/svg+xml,%3csvg width='200px' height='200px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' class='lds-pacman' style='background: none;'%3e %3cg style='display:block'%3e %3ccircle cx='76.8' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.67s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='37.2' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='-0.33s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e %3ccircle cx='57' cy='50' r='4' ng-attr-fill='%7b%7bconfig.c2%7d%7d' fill='%235699d2'%3e %3canimate attributeName='cx' calcMode='linear' values='95;35' keyTimes='0;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3canimate attributeName='fill-opacity' calcMode='linear' values='0;1;1' keyTimes='0;0.2;1' dur='1' begin='0s' repeatCount='indefinite'%3e%3c/animate%3e %3c/circle%3e%3c/g%3e%3cg ng-attr-transform='translate(%7b%7bconfig.showBeanOffset%7d%7d 0)' transform='translate(-15 0)'%3e %3cpath d='M50 50L20 50A30 30 0 0 0 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3cpath d='M50 50L20 50A30 30 0 0 1 80 50Z' ng-attr-fill='%7b%7bconfig.c1%7d%7d' fill='%231d3f72' transform='rotate(-33 50 50)'%3e %3canimateTransform attributeName='transform' type='rotate' calcMode='linear' values='0 50 50;-45 50 50;0 50 50' keyTimes='0;0.5;1' dur='1s' begin='0s' repeatCount='indefinite'%3e%3c/animateTransform%3e %3c/path%3e %3c/g%3e %3c/svg%3e"},4108:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>c});var t=e(6540),r=e(3407),l=e(7240),a=e(1922),i=e.n(a);function c(){const[n,o]=t.useState(0);return t.createElement(t.Fragment,null,t.createElement(l.f9,{className:"example-map",initial:{center:(0,r.Rb)([2.364,48.82]),zoom:4}},t.createElement(l.HS,{onTileLoadStart:()=>o((n=>n+1)),onTileLoadEnd:()=>o((n=>n-1)),url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"})),t.createElement("div",{className:"example-spinner",style:{display:n?"initial":"none"}},t.createElement("img",{src:i(),alt:"spinner"}),t.createElement("strong",null,n," Loading...")))}e(5045)}}]); \ No newline at end of file diff --git a/4629.bundle.js b/4629.bundle.js deleted file mode 100644 index 25e8e5ea..00000000 --- a/4629.bundle.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4629],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),a=e(6314),l=e.n(a)()(r());l.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=l},5045:(n,o,e)=>{var t=e(5072),r=e.n(t),a=e(7825),l=e.n(a),i=e(7659),s=e.n(i),p=e(5056),c=e.n(p),u=e(540),d=e.n(u),m=e(1113),b=e.n(m),g=e(4096),x={};x.styleTagTransform=b(),x.setAttributes=c(),x.insert=s().bind(null,"head"),x.domAPI=l(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},4662:(n,o,e)=>{e.d(o,{A:()=>y});var t=e(8217),r=e(1217),a=e(6702),l=e(503),i=e(2871),s=e(5335),p=e(4294),c=e(1064),u=e(5286),d=e(4778),m=e(3407),b=e(3402);class g extends t.Ay{constructor(n){super(),n=n||{},this.dataProjection=new u.A({code:"",units:"tile-pixels"}),this.featureClass=n.featureClass?n.featureClass:d.Ay,this.geometryName_=n.geometryName,this.layerName_=n.layerName?n.layerName:"layer",this.layers_=n.layers?n.layers:null,this.idProperty_=n.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(n,o,e,t){n.pos=o.geometry;const r=n.readVarint()+n.pos;let a=1,l=0,i=0,s=0,p=0,c=0;for(;n.pos>3}if(l--,1===a||2===a)i+=n.readSVarint(),s+=n.readSVarint(),1===a&&p>c&&(t.push(p),c=p),e.push(i,s),p+=2;else{if(7!==a)throw new Error("Invalid command found in the PBF");p>c&&(e.push(e[c],e[c+1]),p+=2)}}p>c&&(t.push(p),c=p)}createFeature_(n,o,e){const s=o.type;if(0===s)return null;let u;const m=o.properties;let g;this.idProperty_?(g=m[this.idProperty_],delete m[this.idProperty_]):g=o.id,m[this.layerName_]=o.layer.name;const x=[],h=[];this.readRawGeometry_(n,o,x,h);const f=function(n,o){let e;return 1===n?e=1===o?"Point":"MultiPoint":2===n?e=1===o?"LineString":"MultiLineString":3===n&&(e="Polygon"),e}(s,h.length);if(this.featureClass===d.Ay)u=new this.featureClass(f,x,h,2,m,g),u.transform(e.dataProjection);else{let n;if("Polygon"==f){const o=(0,b.yJ)(x,h);n=o.length>1?new i.A(x,"XY",o):new c.Ay(x,"XY",h)}else n="Point"===f?new p.A(x,"XY"):"LineString"===f?new r.A(x,"XY"):"MultiPoint"===f?new l.A(x,"XY"):"MultiLineString"===f?new a.A(x,"XY",h):null;u=new(0,this.featureClass),this.geometryName_&&u.setGeometryName(this.geometryName_);const o=(0,t.hX)(n,!1,e);u.setGeometry(o),void 0!==g&&u.setId(g),u.setProperties(m,!0)}return u}getType(){return"arraybuffer"}readFeatures(n,o){const e=this.layers_;o=this.adaptOptions(o);const t=(0,m.Jt)(o.dataProjection);t.setWorldExtent(o.extent),o.dataProjection=t;const r=new s(n),a=r.readFields(x,{}),l=[];for(const n in a){if(e&&!e.includes(n))continue;const i=a[n],s=i?[0,0,i.extent,i.extent]:null;t.setExtent(s);for(let n=0,e=i.length;n>3)?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null;o.values.push(t)}}function f(n,o,e){if(1==n)o.id=e.readVarint();else if(2==n){const n=e.readVarint()+e.pos;for(;e.pos{e.d(o,{A:()=>s});var t=e(702),r=e(7896);const a={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},l={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends t.A{constructor(n){const o=n.layer.indexOf("-"),e=-1==o?n.layer:n.layer.slice(0,o),t=l[e]||{minZoom:0,maxZoom:20,retina:!0},i=a[n.layer],s=n.apiKey?"?api_key="+n.apiKey:"",p=t.retina&&n.retina?"@2x":"",c=void 0!==n.url?n.url:"https://tiles.stadiamaps.com/tiles/"+n.layer+"/{z}/{x}/{y}"+p+"."+i.extension+s,u=['© Stadia Maps','© OpenMapTiles',r.o];n.layer.startsWith("stamen_")&&u.splice(1,0,'© Stamen Design'),super({attributions:u,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:n.interpolate,maxZoom:void 0!==n.maxZoom?n.maxZoom:t.maxZoom,minZoom:void 0!==n.minZoom?n.minZoom:t.minZoom,opaque:i.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:c,tilePixelRatio:p?2:1,wrapX:n.wrapX,zDirection:n.zDirection})}}const s=i}}]); \ No newline at end of file diff --git a/4783.bundle.js b/4783.bundle.js index 5f8a5cd4..d90a3d10 100644 --- a/4783.bundle.js +++ b/4783.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4783],{6308:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},4783:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var n=t(6540),o=t(3407),r=t(1365),s=t(6717),i=(t(5045),t(7240)),l=t(2381),m=t(6308);const p=new r.A({featureProjection:"EPSG:3857",featureClass:s.A});function c(){const[e,a]=n.useState(15),[t,r]=n.useState(8);return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,o.Rb)([0,0]),zoom:1}},n.createElement(l.A,{layer:"stamen_toner"}),n.createElement(i.KL,{blur:e,radius:t,format:p,url:m.A,weight:(0,n.useCallback)((e=>parseFloat(e.get("mag"))-5),[])})),n.createElement("div",{className:"d-flex flex-row w-100"},n.createElement("div",{className:"w-50 me-2"},n.createElement("label",{htmlFor:"blur"},"Blur"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"50",id:"blur",value:e,onChange:(0,n.useCallback)((e=>a(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",{className:"w-50"},n.createElement("label",{htmlFor:"radius"},"Radius"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"20",id:"radius",value:t,onChange:(0,n.useCallback)((e=>r(parseInt(e.currentTarget.value))),[])})))))}},2381:(e,a,t)=>{t.d(a,{A:()=>s});var n=t(945),o=t(5042),r=t(2662);class s extends r.A{constructor(e,a){var t;super(e,a),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(t=this.props.retina)&&void 0!==t&&t}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,a,t)=>{t.d(a,{A:()=>l});var n=t(702),o=t(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const a=e.layer.indexOf("-"),t=-1==a?e.layer:e.layer.slice(0,a),n=s[t]||{minZoom:0,maxZoom:20,retina:!0},i=r[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=n.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,c=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,opaque:i.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[4783],{6308:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"32ba7744565a0c818ef0e2e35126abbb.geojson"},4783:(e,a,t)=>{t.r(a),t.d(a,{default:()=>p});var n=t(6540),r=t(3407),s=t(1365),o=t(6717),i=(t(5045),t(7240)),l=t(2381),m=t(6308);const c=new s.A({featureProjection:"EPSG:3857",featureClass:o.A});function p(){const[e,a]=n.useState(15),[t,s]=n.useState(8);return n.createElement(n.Fragment,null,n.createElement(i.f9,{className:"example-map",initial:{center:(0,r.Rb)([0,0]),zoom:1}},n.createElement(l.A,{layer:"stamen_toner"}),n.createElement(i.KL,{blur:e,radius:t,format:c,url:m.A,weight:(0,n.useCallback)((e=>parseFloat(e.get("mag"))-5),[])})),n.createElement("div",{className:"d-flex flex-row w-100"},n.createElement("div",{className:"w-50 me-2"},n.createElement("label",{htmlFor:"blur"},"Blur"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"50",id:"blur",value:e,onChange:(0,n.useCallback)((e=>a(parseInt(e.currentTarget.value))),[])}))),n.createElement("div",{className:"w-50"},n.createElement("label",{htmlFor:"radius"},"Radius"),n.createElement("div",{className:"w-100"},n.createElement("input",{type:"range",className:"range-slider range-slider--primary w-100",min:"0",max:"20",id:"radius",value:t,onChange:(0,n.useCallback)((e=>s(parseInt(e.currentTarget.value))),[])})))))}},2381:(e,a,t)=>{t.d(a,{A:()=>o});var n=t(945),r=t(5042),s=t(2662);class o extends s.A{constructor(e,a){var t;super(e,a),this.source=new r.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(t=this.props.retina)&&void 0!==t&&t}),this.ol=new n.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,a,t)=>{t.d(a,{A:()=>l});var n=t(702),r=t(7896);const s={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},o={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class i extends n.A{constructor(e){const a=e.layer.indexOf("-"),t=-1==a?e.layer:e.layer.slice(0,a),n=o[t]||{minZoom:0,maxZoom:20,retina:!0},i=s[e.layer],l=e.apiKey?"?api_key="+e.apiKey:"",m=n.retina&&e.retina?"@2x":"",c=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+i.extension+l,p=['© Stadia Maps','© OpenMapTiles',r.o];e.layer.startsWith("stamen_")&&p.splice(1,0,'© Stamen Design'),super({attributions:p,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:n.minZoom,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:c,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const l=i}}]); \ No newline at end of file diff --git a/5249.bundle.js b/5249.bundle.js index 84365169..078c0cdf 100644 --- a/5249.bundle.js +++ b/5249.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[5249],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var r=l(1601),e=l.n(r),t=l(6314),a=l.n(t)()(e());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,l)=>{var r=l(5072),e=l.n(r),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),u=l(540),d=l.n(u),p=l(1113),g=l.n(p),m=l(4096),x={};x.styleTagTransform=g(),x.setAttributes=b(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),e()(m.A,x),m.A&&m.A.locals&&m.A.locals},5249:(n,o,l)=>{l.r(o),l.d(o,{default:()=>i});var r=l(6540),e=l(3407),t=(l(5045),l(7240));const a=(0,e.Rb)([2.364,48.82]);function i(){return r.createElement(t.f9,{width:"100%",height:"60vh",initial:{center:a,zoom:11}},r.createElement(t.ej,null))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[5249],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var r=l(1601),e=l.n(r),t=l(6314),a=l.n(t)()(e());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,l)=>{var r=l(5072),e=l.n(r),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),u=l(540),p=l.n(u),d=l(1113),g=l.n(d),m=l(4096),v={};v.styleTagTransform=g(),v.setAttributes=b(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p(),e()(m.A,v),m.A&&m.A.locals&&m.A.locals},5249:(n,o,l)=>{l.r(o),l.d(o,{default:()=>i});var r=l(6540),e=l(3407),t=(l(5045),l(7240));const a=(0,e.Rb)([2.364,48.82]);function i(){return r.createElement(t.f9,{width:"100%",height:"60vh",initial:{center:a,zoom:11}},r.createElement(t.ej,null))}}}]); \ No newline at end of file diff --git a/5408.bundle.js b/5408.bundle.js deleted file mode 100644 index ab2d7309..00000000 --- a/5408.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[5408],{6570:t=>{"use strict";function e(t,e,n){n=n||2;var r,o,a,l,u,d,_,f=e&&e.length,p=f?e[0]*n:t.length,m=i(t,0,p,n,!0),x=[];if(!m||m.next===m.prev)return x;if(f&&(m=function(t,e,n,s){var r,o,a,l=[];for(r=0,o=e.length;r80*n){r=a=t[0],o=l=t[1];for(var v=n;va&&(a=u),d>l&&(l=d);_=0!==(_=Math.max(a-r,l-o))?32767/_:0}return s(m,x,n,r,o,_,0),x}function i(t,e,i,n,s){var r,o;if(s===R(t,e,i,n)>0)for(r=e;r=e;r-=n)o=A(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(C(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!m(n,n.next)&&0!==p(n.prev,n,n.next))n=n.next;else{if(C(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function s(t,e,i,h,c,u,g){if(t){!g&&u&&function(t,e,i,n){var s=t;do{0===s.z&&(s.z=d(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,l,h=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,l--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,h*=2}while(o>1)}(s)}(t,h,c,u);for(var _,f,p=t;t.prev!==t.next;)if(_=t.prev,f=t.next,u?o(t,h,c,u):r(t))e.push(_.i/i|0),e.push(t.i/i|0),e.push(f.i/i|0),C(t),t=f.next,p=f.next;else if((t=f)===p){g?1===g?s(t=a(n(t),e,i),e,i,h,c,u,2):2===g&&l(t,e,i,h,c,u):s(n(t),e,i,h,c,u,1);break}}}function r(t){var e=t.prev,i=t,n=t.next;if(p(e,i,n)>=0)return!1;for(var s=e.x,r=i.x,o=n.x,a=e.y,l=i.y,h=n.y,c=sr?s>o?s:o:r>o?r:o,g=a>l?a>h?a:h:l>h?l:h,f=n.next;f!==e;){if(f.x>=c&&f.x<=d&&f.y>=u&&f.y<=g&&_(s,a,r,l,o,h,f.x,f.y)&&p(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function o(t,e,i,n){var s=t.prev,r=t,o=t.next;if(p(s,r,o)>=0)return!1;for(var a=s.x,l=r.x,h=o.x,c=s.y,u=r.y,g=o.y,f=al?a>h?a:h:l>h?l:h,v=c>u?c>g?c:g:u>g?u:g,y=d(f,m,e,i,n),E=d(x,v,e,i,n),T=t.prevZ,A=t.nextZ;T&&T.z>=y&&A&&A.z<=E;){if(T.x>=f&&T.x<=x&&T.y>=m&&T.y<=v&&T!==s&&T!==o&&_(a,c,l,u,h,g,T.x,T.y)&&p(T.prev,T,T.next)>=0)return!1;if(T=T.prevZ,A.x>=f&&A.x<=x&&A.y>=m&&A.y<=v&&A!==s&&A!==o&&_(a,c,l,u,h,g,A.x,A.y)&&p(A.prev,A,A.next)>=0)return!1;A=A.nextZ}for(;T&&T.z>=y;){if(T.x>=f&&T.x<=x&&T.y>=m&&T.y<=v&&T!==s&&T!==o&&_(a,c,l,u,h,g,T.x,T.y)&&p(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;A&&A.z<=E;){if(A.x>=f&&A.x<=x&&A.y>=m&&A.y<=v&&A!==s&&A!==o&&_(a,c,l,u,h,g,A.x,A.y)&&p(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function a(t,e,i){var s=t;do{var r=s.prev,o=s.next.next;!m(r,o)&&x(r,s,s.next,o)&&E(r,o)&&E(o,r)&&(e.push(r.i/i|0),e.push(s.i/i|0),e.push(o.i/i|0),C(s),C(s.next),s=t=o),s=s.next}while(s!==t);return n(s)}function l(t,e,i,r,o,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&f(l,h)){var c=T(l,h);return l=n(l,l.next),c=n(c,c.next),s(l,e,i,r,o,a,0),void s(c,e,i,r,o,a,0)}h=h.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function c(t,e){var i=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o&&(o=a,i=n.x=n.x&&n.x>=c&&s!==n.x&&_(ri.x||n.x===i.x&&u(i,n)))&&(i=n,g=l)),n=n.next}while(n!==h);return i}(t,e);if(!i)return e;var s=T(i,t);return n(s,s.next),n(i,i.next)}function u(t,e){return p(t.prev,t,e.prev)<0&&p(e.next,t,t.next)<0}function d(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*s|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*s|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(s-o)*(n-a)}function f(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(p(t.prev,t,e.prev)||p(t,e.prev,e))||m(t,e)&&p(t.prev,t,t.next)>0&&p(e.prev,e,e.next)>0)}function p(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){var s=y(p(t,e,i)),r=y(p(t,e,n)),o=y(p(i,n,t)),a=y(p(i,n,e));return s!==r&&o!==a||!(0!==s||!v(t,i,e))||!(0!==r||!v(t,n,e))||!(0!==o||!v(i,t,n))||!(0!==a||!v(i,e,n))}function v(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function y(t){return t>0?1:t<0?-1:0}function E(t,e){return p(t.prev,t,t.next)<0?p(t,e,t.next)>=0&&p(t,t.prev,e)>=0:p(t,e,t.prev)<0||p(t,t.next,e)<0}function T(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function A(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function C(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},5341:function(t){t.exports=function(){"use strict";function t(t,n,s,r,o){!function t(i,n,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,l=n-s+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-l*c/a+u)),Math.min(r,Math.floor(n+(a-l)*c/a+u)),o)}var d=i[n],g=s,_=r;for(e(i,s,n),o(i[r],d)>0&&e(i,s,r);g<_;){for(e(i,g,_),g++,_--;o(i[g],d)<0;)g++;for(;o(i[_],d)>0;)_--}0===o(i[s],d)?e(i,s,_):e(i,++_,r),_<=n&&(s=_+1),n<=_&&(r=_-1)}}(t,n,s||0,r||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,r){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,r),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var r=0;r=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var o=this._chooseSplitIndex(i,s,n),a=_(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,r,a,l,h,u,d=1/0,g=1/0,_=e;_<=i-e;_++){var f=o(t,0,_,this.toBBox),p=o(t,_,i,this.toBBox),m=(s=f,r=p,void 0,void 0,void 0,void 0,a=Math.max(s.minX,r.minX),l=Math.max(s.minY,r.minY),h=Math.min(s.maxX,r.maxX),u=Math.min(s.maxY,r.maxY),Math.max(0,h-a)*Math.max(0,u-l)),x=c(f)+c(p);m=e;g--){var _=t.children[g];a(l,t.leaf?s(_):_),h+=u(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}()},9303:(t,e,i)=>{"use strict";i.d(e,{q:()=>g});const n="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,r={env:{RLAYERS_DEBUG:void 0}},o=(t,e,i,n)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`)};let a=globalThis.AbortController,l=globalThis.AbortSignal;if(void 0===a){l=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},a=class{constructor(){e()}signal=new l;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,o("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const h=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),c=t=>h(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?u:null:null;class u extends Array{constructor(t){super(t),this.fill(0)}}class d{heap;length;static#t=!1;static create(t){const e=c(t);if(!e)return[];d.#t=!0;const i=new d(t,e);return d.#t=!1,i}constructor(t,e){if(!d.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class g{#e;#i;#n;#s;#r;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#a;#l;#h;#c;#u;#d;#g;#_;#f;#p;#m;#x;#v;#y;#E;#T;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#v,sizes:t.#m,keyMap:t.#l,keyList:t.#h,valList:t.#c,next:t.#u,prev:t.#d,get head(){return t.#g},get tail(){return t.#_},free:t.#f,isBackgroundFetch:e=>t.#A(e),backgroundFetch:(e,i,n,s)=>t.#C(e,i,n,s),moveToTail:e=>t.#S(e),indexes:e=>t.#R(e),rindexes:e=>t.#w(e),isStale:e=>t.#b(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#a}get size(){return this.#o}get fetchMethod(){return this.#r}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(t){const{max:e=0,ttl:i,ttlResolution:n=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:u,dispose:_,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:x=0,maxEntrySize:v=0,sizeCalculation:y,fetchMethod:E,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:S,ignoreFetchAbort:R}=t;if(0!==e&&!h(e))throw new TypeError("max option must be a nonnegative integer");const w=e?c(e):Array;if(!w)throw new Error("invalid max value: "+e);if(this.#e=e,this.#i=x,this.maxEntrySize=v||this.#i,this.sizeCalculation=y,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==E&&"function"!=typeof E)throw new TypeError("fetchMethod must be a function if specified");if(this.#r=E,this.#E=!!E,this.#l=new Map,this.#h=new Array(e).fill(void 0),this.#c=new Array(e).fill(void 0),this.#u=new w(e),this.#d=new w(e),this.#g=0,this.#_=0,this.#f=d.create(e),this.#o=0,this.#a=0,"function"==typeof _&&(this.#n=_),"function"==typeof f?(this.#s=f,this.#p=[]):(this.#s=void 0,this.#p=void 0),this.#y=!!this.#n,this.#T=!!this.#s,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!R,0!==this.maxEntrySize){if(0!==this.#i&&!h(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!h(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=h(n)||0===n?n:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!h(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(0===this.#e&&0===this.ttl&&0===this.#i)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){const t="LRU_CACHE_UNBOUNDED";(t=>!s.has(t))(t)&&(s.add(t),o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,g))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#L(){const t=new u(this.#e),e=new u(this.#e);this.#v=t,this.#x=e,this.#P=(i,s,r=n.now())=>{if(e[i]=0!==s?r:0,t[i]=s,0!==s&&this.ttlAutopurge){const t=setTimeout((()=>{this.#b(i)&&this.delete(this.#h[i])}),s+1);t.unref&&t.unref()}},this.#M=i=>{e[i]=0!==t[i]?n.now():0},this.#D=(n,r)=>{if(t[r]){const o=t[r],a=e[r];if(!o||!a)return;n.ttl=o,n.start=a,n.now=i||s();const l=n.now-a;n.remainingTTL=o-l}};let i=0;const s=()=>{const t=n.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=n=>{const r=this.#l.get(n);if(void 0===r)return 0;const o=t[r],a=e[r];return o&&a?o-((i||s())-a):1/0},this.#b=n=>{const r=e[n],o=t[n];return!!o&&!!r&&(i||s())-r>o}}#M=()=>{};#D=()=>{};#P=()=>{};#b=()=>!1;#I(){const t=new u(this.#e);this.#a=0,this.#m=t,this.#F=e=>{this.#a-=t[e],t[e]=0},this.#O=(t,e,i,n)=>{if(this.#A(e))return 0;if(!h(i)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(i=n(e,t),!h(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.#k=(e,i,n)=>{if(t[e]=i,this.#i){const i=this.#i-t[e];for(;this.#a>i;)this.#N(!0)}this.#a+=t[e],n&&(n.entrySize=i,n.totalCalculatedSize=this.#a)}}#F=t=>{};#k=(t,e,i)=>{};#O=(t,e,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#_;this.#G(e)&&(!t&&this.#b(e)||(yield e),e!==this.#g);)e=this.#d[e]}*#w({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#g;this.#G(e)&&(!t&&this.#b(e)||(yield e),e!==this.#_);)e=this.#u[e]}#G(t){return void 0!==t&&this.#l.get(this.#h[t])===t}*entries(){for(const t of this.#R())void 0===this.#c[t]||void 0===this.#h[t]||this.#A(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*rentries(){for(const t of this.#w())void 0===this.#c[t]||void 0===this.#h[t]||this.#A(this.#c[t])||(yield[this.#h[t],this.#c[t]])}*keys(){for(const t of this.#R()){const e=this.#h[t];void 0===e||this.#A(this.#c[t])||(yield e)}}*rkeys(){for(const t of this.#w()){const e=this.#h[t];void 0===e||this.#A(this.#c[t])||(yield e)}}*values(){for(const t of this.#R())void 0===this.#c[t]||this.#A(this.#c[t])||(yield this.#c[t])}*rvalues(){for(const t of this.#w())void 0===this.#c[t]||this.#A(this.#c[t])||(yield this.#c[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#R()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;if(void 0!==s&&t(s,this.#h[i],this))return this.get(this.#h[i],e)}}forEach(t,e=this){for(const i of this.#R()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#h[i],this)}}rforEach(t,e=this){for(const i of this.#w()){const n=this.#c[i],s=this.#A(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#h[i],this)}}purgeStale(){let t=!1;for(const e of this.#w({allowStale:!0}))this.#b(e)&&(this.delete(this.#h[e]),t=!0);return t}info(t){const e=this.#l.get(t);if(void 0===e)return;const i=this.#c[e],s=this.#A(i)?i.__staleWhileFetching:i;if(void 0===s)return;const r={value:s};if(this.#v&&this.#x){const t=this.#v[e],i=this.#x[e];if(t&&i){const e=t-(n.now()-i);r.ttl=e,r.start=Date.now()}}return this.#m&&(r.size=this.#m[e]),r}dump(){const t=[];for(const e of this.#R({allowStale:!0})){const i=this.#h[e],s=this.#c[e],r=this.#A(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;const o={value:r};if(this.#v&&this.#x){o.ttl=this.#v[e];const t=n.now()-this.#x[e];o.start=Math.floor(Date.now()-t)}this.#m&&(o.size=this.#m[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=n.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;const{ttl:n=this.ttl,start:s,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i;let{noUpdateTTL:l=this.noUpdateTTL}=i;const h=this.#O(t,e,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(t),this;let c=0===this.#o?void 0:this.#l.get(t);if(void 0===c)c=0===this.#o?this.#_:0!==this.#f.length?this.#f.pop():this.#o===this.#e?this.#N(!1):this.#o,this.#h[c]=t,this.#c[c]=e,this.#l.set(t,c),this.#u[this.#_]=c,this.#d[c]=this.#_,this.#_=c,this.#o++,this.#k(c,h,a),a&&(a.set="add"),l=!1;else{this.#S(c);const i=this.#c[c];if(e!==i){if(this.#E&&this.#A(i)){i.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=i;void 0===e||r||(this.#y&&this.#n?.(e,t,"set"),this.#T&&this.#p?.push([e,t,"set"]))}else r||(this.#y&&this.#n?.(i,t,"set"),this.#T&&this.#p?.push([i,t,"set"]));if(this.#F(c),this.#k(c,h,a),this.#c[c]=e,a){a.set="replace";const t=i&&this.#A(i)?i.__staleWhileFetching:i;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===n||this.#v||this.#L(),this.#v&&(l||this.#P(c,n,s),a&&this.#D(a,c)),!r&&this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}return this}pop(){try{for(;this.#o;){const t=this.#c[this.#g];if(this.#N(!0),this.#A(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}}}#N(t){const e=this.#g,i=this.#h[e],n=this.#c[e];return this.#E&&this.#A(n)?n.__abortController.abort(new Error("evicted")):(this.#y||this.#T)&&(this.#y&&this.#n?.(n,i,"evict"),this.#T&&this.#p?.push([n,i,"evict"])),this.#F(e),t&&(this.#h[e]=void 0,this.#c[e]=void 0,this.#f.push(e)),1===this.#o?(this.#g=this.#_=0,this.#f.length=0):this.#g=this.#u[e],this.#l.delete(i),this.#o--,e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=e,s=this.#l.get(t);if(void 0!==s){const t=this.#c[s];if(this.#A(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#b(s))return i&&this.#M(s),n&&(n.has="hit",this.#D(n,s)),!0;n&&(n.has="stale",this.#D(n,s))}else n&&(n.has="miss");return!1}peek(t,e={}){const{allowStale:i=this.allowStale}=e,n=this.#l.get(t);if(void 0===n||!i&&this.#b(n))return;const s=this.#c[n];return this.#A(s)?s.__staleWhileFetching:s}#C(t,e,i,n){const s=void 0===e?void 0:this.#c[e];if(this.#A(s))return s;const r=new a,{signal:o}=i;o?.addEventListener("abort",(()=>r.abort(o.reason)),{signal:r.signal});const l={signal:r.signal,options:i,context:n},h=(n,s=!1)=>{const{aborted:o}=r.signal,a=i.ignoreFetchAbort&&void 0!==n;if(i.status&&(o&&!s?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!a&&!s)return c(r.signal.reason);const h=u;return this.#c[e]===u&&(void 0===n?h.__staleWhileFetching?this.#c[e]=h.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,n,l.options))),n},c=n=>{const{aborted:s}=r.signal,o=s&&i.allowStaleOnFetchAbort,a=o||i.allowStaleOnFetchRejection,l=a||i.noDeleteOnFetchRejection,h=u;if(this.#c[e]===u&&(l&&void 0!==h.__staleWhileFetching?o||(this.#c[e]=h.__staleWhileFetching):this.delete(t)),a)return i.status&&void 0!==h.__staleWhileFetching&&(i.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw n};i.status&&(i.status.fetchDispatched=!0);const u=new Promise(((e,n)=>{const o=this.#r?.(t,s,l);o&&o instanceof Promise&&o.then((t=>e(void 0===t?void 0:t)),n),r.signal.addEventListener("abort",(()=>{i.ignoreFetchAbort&&!i.allowStaleOnFetchAbort||(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>h(t,!0)))}))})).then(h,(t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),c(t)))),d=Object.assign(u,{__abortController:r,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,d,{...l.options,status:void 0}),e=this.#l.get(t)):this.#c[e]=d,d}#A(t){if(!this.#E)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof a}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:_,forceRefresh:f=!1,status:p,signal:m}=e;if(!this.#E)return p&&(p.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:p});const x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:p,signal:m};let v=this.#l.get(t);if(void 0===v){p&&(p.fetch="miss");const e=this.#C(t,v,x,_);return e.__returned=e}{const e=this.#c[v];if(this.#A(e)){const t=i&&void 0!==e.__staleWhileFetching;return p&&(p.fetch="inflight",t&&(p.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const s=this.#b(v);if(!f&&!s)return p&&(p.fetch="hit"),this.#S(v),n&&this.#M(v),p&&this.#D(p,v),e;const r=this.#C(t,v,x,_),o=void 0!==r.__staleWhileFetching&&i;return p&&(p.fetch=s?"stale":"refresh",o&&s&&(p.returnedStale=!0)),o?r.__staleWhileFetching:r.__returned=r}}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:r}=e,o=this.#l.get(t);if(void 0!==o){const e=this.#c[o],a=this.#A(e);return r&&this.#D(r,o),this.#b(o)?(r&&(r.get="stale"),a?(r&&i&&void 0!==e.__staleWhileFetching&&(r.returnedStale=!0),i?e.__staleWhileFetching:void 0):(s||this.delete(t),r&&i&&(r.returnedStale=!0),i?e:void 0)):(r&&(r.get="hit"),a?e.__staleWhileFetching:(this.#S(o),n&&this.#M(o),e))}r&&(r.get="miss")}#z(t,e){this.#d[e]=t,this.#u[t]=e}#S(t){t!==this.#_&&(t===this.#g?this.#g=this.#u[t]:this.#z(this.#d[t],this.#u[t]),this.#z(this.#_,t),this.#_=t)}delete(t){let e=!1;if(0!==this.#o){const i=this.#l.get(t);if(void 0!==i)if(e=!0,1===this.#o)this.clear();else{this.#F(i);const e=this.#c[i];if(this.#A(e)?e.__abortController.abort(new Error("deleted")):(this.#y||this.#T)&&(this.#y&&this.#n?.(e,t,"delete"),this.#T&&this.#p?.push([e,t,"delete"])),this.#l.delete(t),this.#h[i]=void 0,this.#c[i]=void 0,i===this.#_)this.#_=this.#d[i];else if(i===this.#g)this.#g=this.#u[i];else{const t=this.#d[i];this.#u[t]=this.#u[i];const e=this.#u[i];this.#d[e]=this.#d[i]}this.#o--,this.#f.push(i)}}if(this.#T&&this.#p?.length){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}return e}clear(){for(const t of this.#w({allowStale:!0})){const e=this.#c[t];if(this.#A(e))e.__abortController.abort(new Error("deleted"));else{const i=this.#h[t];this.#y&&this.#n?.(e,i,"delete"),this.#T&&this.#p?.push([e,i,"delete"])}}if(this.#l.clear(),this.#c.fill(void 0),this.#h.fill(void 0),this.#v&&this.#x&&(this.#v.fill(0),this.#x.fill(0)),this.#m&&this.#m.fill(0),this.#g=0,this.#_=0,this.#f.length=0,this.#a=0,this.#o=0,this.#T&&this.#p){const t=this.#p;let e;for(;e=t?.shift();)this.#s?.(...e)}}}},71:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(2135),r=i(1685);const o="length";class a extends r.Ay{constructor(t,e,i){super(t),this.element=e,this.index=i}}class l extends n.A{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(s.A.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(s.A.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(s.A.REMOVE,i,t)),this.dispatchEvent(new a(s.A.ADD,e,t))}updateLength_(){this.set(o,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i{"use strict";i.d(e,{A:()=>n});const n={ADD:"add",REMOVE:"remove"}},7607:(t,e,i)=>{"use strict";i.d(e,{$r:()=>h,Ay:()=>d,bL:()=>a,xo:()=>o});var n=i(8143),s=i(1078),r=i(8711);function o(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}function a(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}let l=null;function h(t){l||(l=(0,r.Y)(t.width,t.height,void 0,{willReadFrequently:!0}));const e=l.canvas,i=t.width;e.width!==i&&(e.width=i);const n=t.height;return e.height!==n&&(e.height=n),l.clearRect(0,0,i,n),l.drawImage(t,0,0),l.getImageData(0,0,i,n).data}const c=[256,256];class u extends n.A{constructor(t){const e=s.A.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null}getSize(){if(this.size_)return this.size_;const t=o(this.data_);return t?[t.width,t.height]:c}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==s.A.IDLE&&this.state!==s.A.ERROR)return;this.state=s.A.LOADING,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=s.A.LOADED,t.changed()})).catch((function(e){t.error_=e,t.state=s.A.ERROR,t.changed()}))}}const d=u},25:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},6717:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(4120),s=i(6837),r=i(588),o=i(9438);class a extends n.A{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.JH)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.KT)(t,s.A.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:((0,r.v)("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const l=a},5213:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});var n=i(1685),s=i(4120),r=i(1064),o=i(3407),a=i(1597);const l="accuracy",h="accuracyGeometry",c="altitude",u="altitudeAccuracy",d="heading",g="position",_="projection",f="speed",p="tracking",m="trackingOptions";class x extends n.Ay{constructor(t){super("error"),this.code=t.code,this.message=t.message}}class v extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=o.R6,this.watchId_=void 0,this.addChangeListener(_,this.handleProjectionChanged_),this.addChangeListener(p,this.handleTrackingChanged_),void 0!==t.projection&&this.setProjection(t.projection),void 0!==t.trackingOptions&&this.setTrackingOptions(t.trackingOptions),this.setTracking(void 0!==t.tracking&&t.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const t=this.getProjection();t&&(this.transform_=(0,o.FO)((0,o.Jt)("EPSG:4326"),t),this.position_&&this.set(g,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){const e=t.coords;this.set(l,e.accuracy),this.set(c,null===e.altitude?void 0:e.altitude),this.set(u,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(d,null===e.heading?void 0:(0,a.eh)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];const i=this.transform_(this.position_);this.set(g,i.slice()),this.set(f,null===e.speed?void 0:e.speed);const n=(0,r.kj)(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(h,n),this.changed()}positionError_(t){this.dispatchEvent(new x(t))}getAccuracy(){return this.get(l)}getAccuracyGeometry(){return this.get(h)||null}getAltitude(){return this.get(c)}getAltitudeAccuracy(){return this.get(u)}getHeading(){return this.get(d)}getPosition(){return this.get(g)}getProjection(){return this.get(_)}getSpeed(){return this.get(f)}getTracking(){return this.get(p)}getTrackingOptions(){return this.get(m)}setProjection(t){this.set(_,(0,o.Jt)(t))}setTracking(t){this.set(p,t)}setTrackingOptions(t){this.set(m,t)}}const y=v},3938:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>g,D4:()=>d,RA:()=>u,f6:()=>c});var n=i(9332),s=i(6837),r=i(6141),o=i(7771),a=i(9438),l=i(4238);class h extends n.A{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"==typeof n?r.A.IDLE:n,this.image_=null,this.loader="function"==typeof n?n:null}changed(){this.dispatchEvent(s.A.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==r.A.IDLE&&this.loader){this.state=r.A.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;(0,l.hq)((()=>this.loader(this.getExtent(),e,this.getPixelRatio()))).then((t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=r.A.LOADED})).catch((t=>{this.state=r.A.ERROR,console.error(t)})).finally((()=>this.changed()))}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function c(t,e,i){const n=t;let r=!0,l=!1,h=!1;const c=[(0,a.Jz)(n,s.A.LOAD,(function(){h=!0,l||e()}))];return n.src&&o.DT?(l=!0,n.decode().then((function(){r&&e()})).catch((function(t){r&&(h?e():i())}))):c.push((0,a.Jz)(n,s.A.ERROR,i)),function(){r=!1,c.forEach(a.JH)}}function u(t,e){return e&&(t.src=e),t.src&&o.DT?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):function(t,e){return new Promise(((e,i)=>{function n(){r(),e(t)}function s(){r(),i(new Error("Image load error"))}function r(){t.removeEventListener("load",n),t.removeEventListener("error",s)}t.addEventListener("load",n),t.addEventListener("error",s)}))}(t)}function d(t,e){return e&&(t.src=e),t.src&&o.DT&&o.XM?t.decode().then((()=>createImageBitmap(t))).catch((e=>{if(t.complete&&t.width)return t;throw e})):u(t)}const g=h},6141:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},190:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(8143),s=i(1078),r=i(8711),o=i(3938);class a extends n.A{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=s.A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=s.A.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,r.Y)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=s.A.LOADED:this.state=s.A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==s.A.ERROR&&(this.state=s.A.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==s.A.IDLE&&(this.state=s.A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,o.f6)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}const l=a},2961:(t,e,i)=>{"use strict";i.d(e,{A:()=>mt});var n=i(4120),s=i(71),r=i(2135),o=i(2284),a=i(25),l=i(4238),h=i(4087),c=i(9703),u=i(915),d=i(2241),g=i(764),_=i(6933);class f extends a.A{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,h.b0)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,c.Zz)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,c.T9)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let l;const h=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const d=h.projection,f=(0,_.Li)(t.slice(),d),p=[[0,0]];if(d.canWrapX()&&n){const t=d.getExtent(),e=(0,u.RG)(t);p.push([-e,0],[e,0])}const m=e.layerStatesArray,x=m.length,v=[],y=[];for(let n=0;n=0;--s){const r=m[s],u=r.layer;if(u.hasRenderer()&&(0,g.l)(r,h)&&o.call(a,u)){const s=u.getRenderer(),o=u.getSource();if(s&&o){const a=o.getWrapX()?f:t,h=c.bind(null,r.managed);y[0]=a[0]+p[n][0],y[1]=a[1]+p[n][1],l=s.forEachFeatureAtCoordinate(y,e,i,h,v)}if(l)return l}}if(0===v.length)return;const E=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*E)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,s,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l.rT,this,s,r)}getMap(){return this.map_}renderFrame(t){(0,h.b0)()}scheduleExpireIconCache(t){d.ue.canExpireCache()&&t.postRenderFunctions.push(p)}}function p(t,e){d.ue.expire()}const m=f;var x=i(8450),v=i(9960),y=i(3984),E=i(5176),T=i(8774),A=i(9438),C=i(8711);const S=class extends m{constructor(t){super(t),this.fontChangeListenerKey_=(0,A.KT)(T.yY,x.A.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=E.XI+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new v.A(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,A.JH)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(y.A.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex}));e.some((t=>t.layer instanceof o.A&&t.layer.getDeclutter()))&&(t.declutter={});const i=t.viewState;this.children_.length=0;const n=[];let s=null;for(let r=0,o=e.length;r=0;--i){const n=e[i],s=n.layer;s.getDeclutter()&&s.renderDeclutter(t,n)}e.forEach((e=>e.layer.renderDeferred(t)))}}};var R=i(6837),w=i(8620),b=i(1685),I=i(588),L=i(3530);class P extends b.Ay{constructor(t,e){super(t),this.layer=e}}const M="layers";class D extends w.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(M,this.handleLayersChanged_),i?Array.isArray(i)?i=new s.A(i.slice(),{unique:!0}):(0,I.v)("function"==typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new s.A(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(A.JH),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,A.KT)(t,r.A.ADD,this.handleLayersAdd_,this),(0,A.KT)(t,r.A.REMOVE,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(A.JH);(0,L.I)(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t{this.clickTimeoutId_=void 0;const e=new O.A(k.A.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==k.A.POINTERUP||e.type==k.A.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=k.A.POINTERDOWN&&e.type!=k.A.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new O.A(k.A.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new O.A(k.A.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,A.KT)(t,k.A.POINTERMOVE,this.handlePointerMove_,this),(0,A.KT)(t,k.A.POINTERUP,this.handlePointerUp_,this),(0,A.KT)(this.element_,k.A.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,A.KT)(this.element_.getRootNode(),k.A.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new O.A(k.A.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new O.A(k.A.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,A.JH)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.A.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,A.JH)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const B=j;var U=i(5801),X=i(2585),W=i(3116);const Z=1/0,Y=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,L.I)(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,I.v)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=Z&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;for(;t>1;){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=rt;){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o0;)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),i!==V.A.IDLE||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,n.load())}};var q=i(3568),K=i(2703),$=i(7456),J=i(2898),Q=i(9186),tt=i(6068),et=i(4473),it=i(4051),nt=i(4423),st=i(9888),rt=i(6856);const ot=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};var at=i(8751),lt=i(3711),ht=i(5243),ct=i(6514),ut=i(3407),dt=i(4401),gt=i(4422);function _t(t){t instanceof g.A?t.setMapInternal(null):t instanceof F&&t.getLayers().forEach(_t)}function ft(t,e){if(t instanceof g.A)t.setMapInternal(e);else if(t instanceof F){const i=t.getLayers().getArray();for(let t=0,n=i.length;tthis.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new s.A;return(void 0===t.zoom||t.zoom)&&e.push(new Q.A(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new J.A(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new $.A(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new s.A,i=new ot(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new it.A),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new tt.A({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new et.A({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new lt.A),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new ht.A({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new st.A),e.push(new rt.A({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new at.A({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new nt.A({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new H(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(W.A.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(W.A.VIEW,this.handleViewChanged_),this.addChangeListener(W.A.SIZE,this.handleSizeChanged_),this.addChangeListener(W.A.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof q.Ay||t.view.then((function(t){i.setView(new q.Ay(t))})),this.controls.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(r.A.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(r.A.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){ft(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:l.rT,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof F?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:l.rT,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],r="changedTouches"in t?t.changedTouches[0]:t;return[(r.clientX-e.left)/n,(r.clientY-e.top)/s]}getTarget(){return this.get(W.A.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,ut.te)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,c.Bb)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(W.A.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof s.A)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[K.A.ANIMATING]||e[K.A.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new P("removelayer",e)),this.set(W.A.LAYERGROUP,t)}setSize(t){this.set(W.A.SIZE,t)}setTarget(t){this.set(W.A.TARGET,t)}setView(t){if(!t||t instanceof q.Ay)return void this.set(W.A.VIEW,t);this.set(W.A.VIEW,new q.Ay);const e=this;t.then((function(t){e.setView(new q.Ay(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[n,s],!(0,dt.Ie)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,gt.R8)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,ct.aI)(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}const mt=pt},277:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(5801);class s extends n.A{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const r=s},3445:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(6837);const s={SINGLECLICK:"singleclick",CLICK:n.A.CLICK,DBLCLICK:n.A.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},5801:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}const r=s},2585:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},3116:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},4120:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(1685),s=i(8450),r=i(1854),o=i(4087),a=i(3530);class l extends n.Ay{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class h extends r.A{constructor(t){super(),this.on,this.once,this.un,(0,o.v6)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=s.A.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.p)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const c=h},8450:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PROPERTYCHANGE:"propertychange"}},1854:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(9332),s=i(6837),r=i(9438);class o extends n.A{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(s.A.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s{"use strict";i.d(e,{A:()=>f});var n=i(4120),s=i(2585),r=i(5176),o=i(915),a=i(9438),l=i(8711);const h="element",c="map",u="offset",d="position",g="positioning";class _ extends n.A{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+r.Q5,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(h,this.handleElementChanged),this.addChangeListener(c,this.handleMapChanged),this.addChangeListener(u,this.handleOffsetChanged),this.addChangeListener(d,this.handlePositionChanged),this.addChangeListener(g,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(h)}getId(){return this.id}getMap(){return this.get(c)||null}getOffset(){return this.get(u)}getPosition(){return this.get(d)}getPositioning(){return this.get(g)}handleElementChanged(){(0,l.gS)(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&((0,l.bf)(this.element),(0,a.JH)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.KT)(t,s.A.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(h,t)}setMap(t){this.set(c,t)}setOffset(t){this.set(u,t)}setPosition(t){this.set(d,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(d))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),s=this.getRect(n,[(0,l.Gq)(n),(0,l.DK)(n)]),r=void 0===(t=t||{}).margin?20:t.margin;if(!(0,o.ms)(i,s)){const n=s[0]-i[0],o=i[2]-s[2],a=s[1]-i[1],l=i[3]-s[3],h=[0,0];if(n<0?h[0]=n-r:o<0&&(h[0]=Math.abs(o)+r),a<0?h[1]=a-r:l<0&&(h[1]=Math.abs(l)+r),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const s=[n[0]+h[0],n[1]+h[1]],r=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(s),duration:r.duration,easing:r.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[n,s,n+e[0],s+e[1]]}setPositioning(t){this.set(g,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),s=this.getPositioning();this.setVisible(!0);let r="0%",o="0%";"bottom-right"==s||"center-right"==s||"top-right"==s?r="-100%":"bottom-center"!=s&&"center-center"!=s&&"top-center"!=s||(r="-50%"),"bottom-left"==s||"bottom-center"==s||"bottom-right"==s?o="-100%":"center-left"!=s&&"center-center"!=s&&"center-right"!=s||(o="-50%");const a=`translate(${r}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}}const f=_},8143:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(9332),s=i(6837),r=i(1078),o=i(4087),a=i(3474);class l extends n.A{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(s.A.CHANGE)}release(){this.state===r.A.ERROR&&this.setState(r.A.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==r.A.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==r.A.LOADED){t.interimTile=null;break}t.getState()==r.A.LOADING?e=t:t.getState()==r.A.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==r.A.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){(0,o.b0)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:(0,a.a6)(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const h=l},61:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(4969),s=i(186);class r extends n.A{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey(),e=(0,s.K)(t)[0];this.forEach((t=>{t.tileCoord[0]!==e&&(this.remove((0,s.i7)(t.tileCoord)),t.release())}))}}const o=r},1110:(t,e,i)=>{"use strict";i.d(e,{A:()=>r,N:()=>s});class n{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function s(t,e,i,s,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=s,r):new n(t,e,i,s)}const r=n},1078:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},3568:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>R});var n=i(4120),s=i(2703),r=i(9015),o=i(9496),a=i(3407),l=i(4238),h=i(6933),c=i(588),u=i(1597);function d(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const l=e?0:r[0]*s,h=e?0:r[1]*s,c=a?a[0]:0,d=a?a[1]:0;let g=t[0]+l/2+c,_=t[2]-l/2+c,f=t[1]+h/2+d,p=t[3]-h/2+d;g>_&&(g=(_+g)/2,_=g),f>p&&(f=(p+f)/2,p=f);let m=(0,u.qE)(n[0],g,_),x=(0,u.qE)(n[1],f,p);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,g-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-_)/t),x+=-t*Math.log(1+Math.max(0,f-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,x]}}function g(t){return t}var _=i(915),f=i(6514);function p(t,e,i,n){const s=(0,_.RG)(e)/i[0],r=(0,_.Oq)(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function m(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,u.qE)(n,i/2,2*e)}function x(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,l){if(void 0!==r){const o=n?p(t,n,a,s):t;return i&&l?m(r,o,e):(0,u.qE)(r,e,o)}}}var v=i(4498),y=i(3474),E=i(1064);class T extends n.A{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.Av)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.RJ)(),t.center&&(t.center=(0,a.Ad)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.SD)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in r.A)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,r=void 0!==t.maxZoom?t.maxZoom:28;const l=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,d=void 0!==t.showFullExtent&&t.showFullExtent,g=(0,a.Av)(t.projection,"EPSG:3857"),v=g.getExtent();let y=t.constrainOnlyCenter,E=t.extent;if(h||E||!g.isGlobal()||(y=!1,E=v),void 0!==t.resolutions){const o=t.resolutions;i=o[s],n=void 0!==o[r]?o[r]:o[o.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?p(l,i,o,n):l;if(a)return e?m(s,c,h):(0,u.qE)(s,h,c);const d=Math.min(c,s),g=Math.floor((0,f.FT)(t,d,r));return t[g]>c&&g1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[s.A.INTERACTING]>0}cancelAnimations(){let t;this.setHint(s.A.ANIMATING,-this.hints_[s.A.ANIMATING]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const l=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===l?s.targetResolution:s.sourceResolution+l*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===l?(0,u.xP)(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+l*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(s.A.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&A(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,h.e$)(i,t-this.getRotation()),(0,h.WQ)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.te)(t,this.getProjection()):t}getCenterInternal(){return this.get(r.A.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.JR)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,c.v)(e,"The view center is not defined");const i=this.getResolution();(0,c.v)(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return(0,c.v)(void 0!==n,"The view rotation is not defined"),(0,_.Bg)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(r.A.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.SD)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,_.RG)(t)/e[0],n=(0,_.Oq)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(r.A.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=S(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=(0,f.FT)(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,u.qE)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,u.qE)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,c.v)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,c.v)(!(0,_.Im)(t),"Cannot fit empty extent provided as `geometry`");const e=(0,a.SD)(t,this.getProjection());i=(0,E.VY)(e)}else if("Circle"===t.getType()){const e=(0,a.SD)(t.getExtent(),this.getProjection());i=(0,E.VY)(e),i.rotate(this.getRotation(),(0,_.q1)(e))}else{const e=(0,a.Tf)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=s.length;t{"use strict";i.d(e,{A:()=>n});const n={ANIMATING:0,INTERACTING:1}},9015:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},6514:(t,e,i)=>{"use strict";function n(t,e,i){let n,r;i=i||s;let o=0,a=t.length,l=!1;for(;o>1),r=+i(t[n],e),r<0?o=n+1:(a=n,l=!r);return l?o:~o}function s(t,e){return t>e?1:te?-1:0}function o(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s0?s-1:s}return n-1}if(i>0){for(let i=1;i0||i&&0===r)}))}i.d(e,{El:()=>n,FT:()=>o,V_:()=>s,WC:()=>c,X$:()=>l,aI:()=>h,gI:()=>a,rG:()=>r})},588:(t,e,i)=>{"use strict";function n(t,e){if(!t)throw new Error(e)}i.d(e,{v:()=>n})},3730:(t,e,i)=>{"use strict";i.d(e,{_j:()=>T,oJ:()=>_,sH:()=>E,$C:()=>S,cD:()=>y,S8:()=>A,eE:()=>v,dI:()=>C,fu:()=>x});const n={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var s={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};s.max=s.whitepoint[2].D65,s.rgb=function(t,e){e=e||s.whitepoint[2].E;var i,n,r,o=t[0]/e[0],a=t[1]/e[1],l=t[2]/e[2];return n=-.96924363628087*o+1.87596750150772*a+.041555057407175*l,r=.055630079696993*o+-.20397695888897*a+1.056971514242878*l,i=(i=3.240969941904521*o+-1.537383177570093*a+-.498610760293*l)>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,[255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},n.xyz=function(t,e){var i=t[0]/255,n=t[1]/255,r=t[2]/255,o=.21263900587151*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.71516867876775*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.072192315360733*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92),a=.019330818715591*i+.11919477979462*n+.95053215224966*r;return[(.41239079926595*i+.35758433938387*n+.18048078840183*r)*(e=e||s.whitepoint[2].E)[0],o*e[1],a*e[2]]};const r=s,o={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,i){var n,s,o,a,l,h,c,u,d;return o=t[0],a=t[1],l=t[2],0===o?[0,0,0]:(e=e||"D65",i=i||2,n=a/(13*o)+4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2]))||0,s=l/(13*o)+9*u/(c+15*u+3*d)||0,[9*(h=o>8?u*Math.pow((o+16)/116,3):u*o*.0011070564598794539)*n/(4*s)||0,h,h*(12-3*n-20*s)/(4*s)||0])}};r.luv=function(t,e,i){var n,s,o,a,l,h,c,u,d,g,_;e=e||"D65",i=i||2,g=4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2])),_=9*u/(c+15*u+3*d),n=4*(a=t[0])/(a+15*(l=t[1])+3*(h=t[2]))||0,s=9*l/(a+15*l+3*h)||0;var f=l/u;return[o=f<=.008856451679035631?903.2962962962961*f:116*Math.pow(f,1/3)-16,13*o*(n-g),13*o*(s-_)]};var a={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]},xyz:function(t){return o.xyz(a.luv(t))}};const l=a;o.lchuv=function(t){var e=t[0],i=t[1],n=t[2],s=Math.sqrt(i*i+n*n),r=360*Math.atan2(n,i)/2/Math.PI;return r<0&&(r+=360),[e,s,r]},r.lchuv=function(t){return o.lchuv(r.luv(t))};const h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c=function(t){var e,i,n=[],s=1;if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),h[t])n=h[t].slice(),i="rgb";else if("transparent"===t)s=0,i="rgb",n=[0,0,0];else if("#"===t[0]){var r=t.slice(1),o=r.length;s=1,o<=4?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],4===o&&(s=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],8===o&&(s=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var a=e[1],l="cmyk"===(i=a.replace(/a$/,""))?4:"gray"===i?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=n.shift()),s=(n=n.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===i?255*t:"h"===i[0]?100*t:"l"!==i[0]||e?"lab"===i?125*t:"lch"===i?e<2?150*t:360*t:"o"!==i[0]||e?"oklab"===i?.4*t:"oklch"===i?e<2?.4*t:360*t:t:t:100*t;if("h"===i[e]||2===e&&"h"===i[i.length-1]){if(void 0!==u[t])return u[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)}))).length>l?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),i=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:i,values:n,alpha:s}};var u={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};const d={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,i,n,s,r,o=t[0]/360,a=t[1]/100,l=t[2]/100,h=0;if(0===a)return[r=255*l,r,r];for(e=2*l-(i=l<.5?l*(1+a):l+a-l*a),s=[0,0,0];h<3;)(n=o+1/3*-(h-1))<0?n++:n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,s[h++]=255*r;return s}};n.hsl=function(t){var e,i,n=t[0]/255,s=t[1]/255,r=t[2]/255,o=Math.min(n,s,r),a=Math.max(n,s,r),l=a-o;return a===o?e=0:n===a?e=(s-r)/l:s===a?e=2+(r-n)/l:r===a&&(e=4+(n-s)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+a)/2,[e,100*(a===o?0:i<=.5?l/(a+o):l/(2-a-o)),100*i]};var g=i(1597);function _(t){return"string"==typeof t?t:C(t)}const f=1024,p={};let m=0;function x(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function v(t){const e=r.lchuv(n.xyz(t));return e[3]=t[3],e}function y(t){const e=r.rgb(l.xyz(t));return e[3]=t[3],e}function E(t){if(p.hasOwnProperty(t))return p[t];if(m>=f){let t=0;for(const e in p)3&t++||(delete p[e],--m)}const e=function(t){var e;Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var i=c(t);if(!i.space)return[];const s="h"===i.space[0]?d.min:n.min,r="h"===i.space[0]?d.max:n.max;return(e=Array(3))[0]=Math.min(Math.max(i.values[0],s[0]),r[0]),e[1]=Math.min(Math.max(i.values[1],s[1]),r[1]),e[2]=Math.min(Math.max(i.values[2],s[2]),r[2]),"h"===i.space[0]&&(e=d.rgb(e)),e.push(Math.min(Math.max(i.alpha,0),1)),e}(t);if(4!==e.length)throw new Error('Failed to parse "'+t+'" as color');for(const i of e)if(isNaN(i))throw new Error('Failed to parse "'+t+'" as color');return A(e),p[t]=e,++m,e}function T(t){return Array.isArray(t)?t:E(t)}function A(t){return t[0]=(0,g.qE)(t[0]+.5|0,0,255),t[1]=(0,g.qE)(t[1]+.5|0,0,255),t[2]=(0,g.qE)(t[2]+.5|0,0,255),t[3]=(0,g.qE)(t[3],0,1),t}function C(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}function S(t){try{return E(t),!0}catch(t){return!1}}},7295:(t,e,i)=>{"use strict";i.d(e,{F:()=>l});var n=i(6141),s=i(8711),r=i(7907),o=i(2241),a=i(3730);function l(t){return t?Array.isArray(t)?(0,a.dI)(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return o.ue.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,i=o.ue.getPattern(e,void 0,t.color);if(i)return i;const a=o.ue.get(t.src,"anonymous",null);if(a.getImageState()!==n.A.LOADED)return null;const l=(0,s.Y)(t.size[0],t.size[1]);return l.drawImage(a.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),(0,r.J)(l.canvas,e,void 0,n.A.LOADED,t.color,!0),o.ue.getPattern(e,void 0,t.color)}(t):t:null}},4422:(t,e,i)=>{"use strict";i.d(e,{R8:()=>r,z3:()=>o});const n={info:1,warn:2,error:3,none:4};let s=n.info;function r(...t){s>n.warn||console.warn(...t)}function o(...t){s>n.error||console.error(...t)}},7456:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(972),s=i(6837),r=i(5176),o=i(6514),a=i(8711),l=i(4238);class h extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",o=void 0!==t.collapseLabel?t.collapseLabel:"›",a=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=a):this.collapseLabel_=o;const l=void 0!==t.label?t.label:"i";"string"==typeof l?(this.label_=document.createElement("span"),this.label_.textContent=l,this.label_.className=n):this.label_=l;const h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(h),this.toggleButton_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const c=e+" "+r.XI+" "+r.$N+(this.collapsed_&&this.collapsible_?" "+r.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map((t=>(0,l.hq)((()=>t))))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,o.aI)(e,this.renderedAttributions_)){(0,a.gS)(this.ulElement_);for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(2585),r=i(4238),o=i(9438),a=i(8711);class l extends n.A{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){(0,a.bf)(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&(0,a.bf)(this.element);for(let t=0,e=this.listenerKeys.length;t{"use strict";i.d(e,{A:()=>_});var n=i(972),s=i(6837),r=i(3116),o=i(5176),a=i(9438),l=i(8711);const h=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];class c extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;const i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;const n=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=n,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${o.XI} ${o.$N}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(u(e))if(d(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{let i;i=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():g(t)}(i):g(i)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=d(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,l.fo)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,l.fo)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let e=0,i=t.length;e{"use strict";i.d(e,{A:()=>u});var n=i(972),s=i(613),r=i(3407),o=i(9438),a=i(6933);const l="projection",h="coordinateFormat";class c extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.className=void 0!==t.className?t.className:"ol-mouse-position",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un,this.addChangeListener(l,this.handleProjectionChanged_),t.coordinateFormat&&this.setCoordinateFormat(t.coordinateFormat),t.projection&&this.setProjection(t.projection),this.renderOnMouseOut_=void 0!==t.placeholder,this.placeholder_=this.renderOnMouseOut_?t.placeholder:" ",this.renderedHTML_=e.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==t.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(h)}getProjection(){return this.get(l)}handleMouseMove(t){const e=this.getMap();this.updateHTML_(e.getEventPixel(t))}handleMouseOut(t){this.updateHTML_(null)}setMap(t){if(super.setMap(t),t){const e=t.getViewport();this.listenerKeys.push((0,o.KT)(e,s.A.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,o.KT)(e,s.A.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(t){this.set(h,t)}setProjection(t){this.set(l,(0,r.Jt)(t))}updateHTML_(t){let e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){const t=this.getProjection();this.transform_=t?(0,r.FO)(this.mapProjection_,t):r.R6}const i=this.getMap().getCoordinateFromPixelInternal(t);if(i){const t=(0,r.Tf)();if(t&&(this.transform_=(0,r.FO)(this.mapProjection_,t)),this.transform_(i,i),this.wrapX_){const e=t||this.getProjection()||this.mapProjection_;(0,a.Li)(i,e)}const n=this.getCoordinateFormat();e=n?n(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)}render(t){const e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}}const u=c},6950:(t,e,i)=>{"use strict";i.d(e,{A:()=>v});var n=i(71),s=i(972),r=i(6837),o=i(2961),a=i(2585),l=i(3116),h=i(8450),c=i(1795),u=i(3568),d=i(9015),g=i(5176),_=i(915),f=i(9438),p=i(1064),m=i(8711);class x extends s.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===t.collapsed||t.collapsed,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==t.rotateWithView&&t.rotateWithView,this.viewExtent_=void 0;const e=void 0!==t.className?t.className:"ol-overviewmap",i=void 0!==t.tipLabel?t.tipLabel:"Overview map",s=void 0!==t.collapseLabel?t.collapseLabel:"‹";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const a=void 0!==t.label?t.label:"›";"string"==typeof a?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=i,h.appendChild(l),h.addEventListener(r.A.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const u=new o.A({view:t.view,controls:new n.A,interactions:new n.A});this.ovmap_=u,t.layers&&t.layers.forEach((function(t){u.addLayer(t)}));const d=document.createElement("div");d.className="ol-overviewmap-box",d.style.boxSizing="border-box",this.boxOverlay_=new c.A({position:[0,0],positioning:"center-center",element:d}),this.ovmap_.addOverlay(this.boxOverlay_);const _=e+" "+g.XI+" "+g.$N+(this.collapsed_&&this.collapsible_?" "+g.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),f=this.element;f.className=_,f.appendChild(this.ovmapDiv_),f.appendChild(h);const p=this,m=this.boxOverlay_,x=this.boxOverlay_.getElement(),v=function(t){const e={clientX:(i=t).clientX,clientY:i.clientY};var i;const n=u.getEventCoordinateInternal(e);m.setPosition(n)},y=function(t){const e=u.getEventCoordinateInternal(t);p.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",y)};x.addEventListener("mousedown",(function(){window.addEventListener("mousemove",v),window.addEventListener("mouseup",y)}))}setMap(t){const e=this.getMap();if(t!==e){if(e){const t=e.getView();t&&this.unbindView_(t),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,f.KT)(t,h.A.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const e=t.getView();e&&(this.bindView_(e),e.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===l.A.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const i=this.getMap().getView();this.bindView_(i)}else this.ovmap_.isRendered()||t.key!==l.A.TARGET&&t.key!==l.A.SIZE||this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new u.Ay({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView().calculateExtentInternal(i);if(this.viewExtent_&&(0,_.aI)(n,this.viewExtent_))return;this.viewExtent_=n;const s=e.getSize(),r=e.getView().calculateExtentInternal(s),o=e.getPixelFromCoordinateInternal((0,_.Py)(n)),a=e.getPixelFromCoordinateInternal((0,_.k_)(n)),l=Math.abs(o[0]-a[0]),h=Math.abs(o[1]-a[1]),c=s[0],u=s[1];l<.1*c||h<.1*u||l>.75*c||h>.75*u?this.resetExtent_():(0,_.ms)(r,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),s=e.getView(),r=Math.log(7.5)/Math.LN2,o=1/(.1*Math.pow(2,r/2));(0,_.Af)(n,o),s.fitInternal((0,p.VY)(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),s=e.getView(),r=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenterInternal(),h=n.getResolution(),c=s.getResolution(),u=i[0]*h/c,d=i[1]*h/c;if(o.setPosition(l),a){a.style.width=u+"px",a.style.height=d+"px";const t="rotate("+r+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,f.Jz)(this.ovmap_,a.A.POSTRENDER,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(g.nT),this.collapsed_?(0,m.fo)(this.collapseLabel_,this.label_):(0,m.fo)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}}const v=x},2898:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const o=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=o,a.appendChild(this.label_),a.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+r.XI+" "+r.$N,h=this.element;h.className=l,h.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(r.Si)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.vT}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(r.Si);t||0!==i?t&&0!==i&&this.element.classList.remove(r.Si):this.element.classList.add(r.Si)}this.label_.style.transform=t}this.rotation_=i}}const l=a},3965:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(972),s=i(5176),r=i(3407);const o="units",a=[1,2,5],l=25.4/.28;class h extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+s.XI,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(o,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(o)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(o,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),s="degrees"==n?"degrees":"m";let o=(0,r.hO)(i,t.resolution,e,s);const h=this.minWidth_*(this.dpi_||l)/l,c=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||l)/l:void 0;let u=h*o,d="";if("degrees"==n){const t=r.Ig.degrees;u*=t,u=c){g=p,_=m,f=x;break}if(_>=h)break;p=g,m=_,x=f,++v}const y=this.scaleBar_?this.createScaleBar(_,g,d):g.toFixed(f<0?-f:0)+" "+d;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=_&&(this.innerElement_.style.width=_+"px",this.renderedWidth_=_),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),s=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),r=this.scaleBarSteps_,o=t/r,a=[this.createMarker("absolute")];for(let n=0;n
`+this.createMarker("relative")+(n%2==0||2===r?this.createStepText(n,t,!1,e,i):"")+"")}return a.push(this.createStepText(r,t,!0,e,i)),(this.scaleBarText_?`
`+s+"
":"")+a.join("")}createMarker(t){return`
`}createStepText(t,e,i,n,s){const r=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+s);return`
`+r+"
"}getScaleForResolution(){return(0,r.hO)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||l)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}}const c=h},9186:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",o=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",a=void 0!==t.zoomInLabel?t.zoomInLabel:"+",l=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",h=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",c=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=n,u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof a?document.createTextNode(a):a),u.addEventListener(s.A.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener(s.A.CLICK,this.handleClick_.bind(this,-i),!1);const g=e+" "+r.XI+" "+r.$N,_=this.element;_.className=g,_.appendChild(u),_.appendChild(d),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:o.vT})):e.setZoom(n)}}}const l=a},9439:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(972),s=i(6837),r=i(613),o=i(5176),a=i(1597),l=i(3474),h=i(9438),c=i(1685);class u extends n.A{constructor(t){super({target:(t=t||{}).target,element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=0,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+o.XI;const n=this.element;n.className=e+" "+o.XI+" "+o.$N,n.appendChild(i),n.addEventListener(r.A.POINTERDOWN,this.handleDraggerStart_.bind(this),!1),n.addEventListener(r.A.POINTERMOVE,this.handleDraggerDrag_.bind(this),!1),n.addEventListener(r.A.POINTERUP,this.handleDraggerEnd_.bind(this),!1),n.addEventListener(s.A.CLICK,this.handleContainerClick_.bind(this),!1),i.addEventListener(s.A.CLICK,c.dG,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const s=t.firstElementChild,r=getComputedStyle(s),o=s.offsetWidth+parseFloat(r.marginRight)+parseFloat(r.marginLeft),a=s.offsetHeight+parseFloat(r.marginTop)+parseFloat(r.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=1,this.widthLimit_=e-o):(this.direction_=0,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),s=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:s,duration:this.duration_,easing:l.vT})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,h.KT)(i,r.A.POINTERMOVE,t,this),(0,h.KT)(i,r.A.POINTERUP,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(h.JH),this.dragListenerKeys_.length=0)}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;1==this.direction_?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,(0,a.qE)(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){const e=this.getMap().getView().getValueForResolutionFunction();return(0,a.qE)(1-e(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}}const d=u},1727:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(972),s=i(6837),r=i(5176),o=i(3407),a=i(1064);class l extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild("string"==typeof i?document.createTextNode(i):i),o.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+r.XI+" "+r.$N,l=this.element;l.className=a,l.appendChild(o)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?(0,o.SD)(this.extent,t.getProjection()):t.getProjection().getExtent();t.fitInternal((0,a.VY)(e))}}const h=l},6933:(t,e,i)=>{"use strict";i.d(e,{$x:()=>_,Io:()=>g,Li:()=>f,U$:()=>p,WQ:()=>o,aI:()=>h,aP:()=>l,e$:()=>c,hG:()=>d,hs:()=>u,sG:()=>a});var n=i(915),s=i(1597),r=i(2806);function o(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function a(t,e){const i=t[0],n=t[1],s=e[0],r=e[1],o=s[0],a=s[1],l=r[0],h=r[1],c=l-o,u=h-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,_;return d<=0?(g=o,_=a):d>=1?(g=l,_=h):(g=o+d*c,_=a+d*u),[g,_]}function l(t,e,i){const n=(0,s.xP)(e+180,360)-180,o=Math.abs(3600*n),a=i||0;let l=Math.floor(o/3600),h=Math.floor((o-3600*l)/60),c=(0,s.Mg)(o-3600*l-60*h,a);c>=60&&(c=0,h+=1),h>=60&&(h=0,l+=1);let u=l+"°";return 0===h&&0===c||(u+=" "+(0,r.H)(h,2)+"′"),0!==c&&(u+=" "+(0,r.H)(c,2,a)+"″"),0!==n&&(u+=" "+t.charAt(n<0?1:0)),u}function h(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function c(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function u(t,e){return t[0]*=e,t[1]*=e,t}function d(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function g(t,e){return Math.sqrt(d(t,e))}function _(t,e){return d(t,a(t,e))}function f(t,e){if(e.canWrapX()){const i=(0,n.RG)(e.getExtent()),s=p(t,e,i);s&&(t[0]-=s*i)}return t}function p(t,e,i){const s=e.getExtent();let r=0;return e.canWrapX()&&(t[0]s[2])&&(i=i||(0,n.RG)(s),r=Math.floor((t[0]-s[0])/i)),r}},5176:(t,e,i)=>{"use strict";i.d(e,{$N:()=>a,K5:()=>u,Q5:()=>s,Si:()=>n,Vv:()=>o,XI:()=>r,nT:()=>l});const n="ol-hidden",s="ol-selectable",r="ol-unselectable",o="ol-unsupported",a="ol-control",l="ol-collapsed",h=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),c=["style","variant","weight","size","lineHeight","family"],u=function(t){const e=t.match(h);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=c.length;t{"use strict";i.d(e,{DK:()=>h,Gq:()=>l,WM:()=>g,Y:()=>s,Yg:()=>a,bf:()=>u,fo:()=>c,gS:()=>d,lr:()=>o});var n=i(7771);function s(t,e,i,s){let r;return r=i&&i.length?i.shift():n.Wl?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",s)}let r;function o(){return r||(r=s(1,1)),r}function a(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function l(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function h(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function c(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function u(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function d(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function g(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}},3474:(t,e,i)=>{"use strict";function n(t){return Math.pow(t,3)}function s(t){return 1-n(1-t)}function r(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{T9:()=>r,a6:()=>n,sn:()=>o,vT:()=>s})},9438:(t,e,i)=>{"use strict";i.d(e,{JH:()=>o,Jz:()=>r,KT:()=>s});var n=i(3530);function s(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function r(t,e,i,n){return s(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.I)(t))}},1685:(t,e,i)=>{"use strict";function n(t){t.stopPropagation()}i.d(e,{Ay:()=>s,dG:()=>n});const s=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}},6837:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},9332:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(25),s=i(1685),r=i(4238),o=i(3530);class a extends n.A{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new s.Ay(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});let h;i in a||(a[i]=0,l[i]=0),++a[i];for(let t=0,e=n.length;t0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=r.tV,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}const l=a},8704:(t,e,i)=>{"use strict";i.d(e,{A4:()=>E,GB:()=>x,Gk:()=>u,IO:()=>h,Js:()=>l,Kg:()=>v,Q7:()=>a,TS:()=>p,Zm:()=>g,at:()=>d,eL:()=>c,fs:()=>T,k5:()=>m,qG:()=>f,t5:()=>_,tE:()=>y});var n=i(3445),s=i(4238),r=i(7771),o=i(588);function a(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n{"use strict";i.d(e,{DG:()=>y,Fq:()=>u,SR:()=>E,T8:()=>a,Xj:()=>x,Ye:()=>P,ZD:()=>A,_D:()=>v,cT:()=>h,go:()=>p,ho:()=>m,j:()=>o,mE:()=>c,qA:()=>d,qg:()=>T,wl:()=>l});var n=i(6514),s=i(3730);let r=0;const o=0,a=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},C={[A.Get]:L((([t,e])=>void 0!==e?function(t){switch(t){case"string":return h;case"color":return c;case"number":return l;case"boolean":return a;case"number[]":return u;default:throw new Error(`Unrecognized type hint: ${t}`)}}(e.value):g),R(1,2),(function(t,e){const i=T(t[1],e);if(!(i instanceof v))throw new Error("Expected a literal argument for get operation");if("string"!=typeof i.value)throw new Error("Expected a string argument for get operation");return e.properties.add(i.value),3===t.length?[i,T(t[2],e)]:[i]})),[A.Var]:L((([t])=>t.type),R(1,1),(function(t,e,i,n){const s=t[1];if("string"!=typeof s)throw new Error("Expected a string argument for var operation");if(e.variables.add(s),!("variables"in e.style)||void 0===e.style.variables[s])return[new v(g,s)];const r=T(e.style.variables[s],e);if(r.value=s,n&&!m(n,r.type))throw new Error(`The variable ${s} has type ${p(r.type)} but the following type was expected: ${p(n)}`);return[r]})),[A.Id]:L(l|h,S,(function(t,e){e.featureId=!0})),[A.Concat]:L(h,R(2,1/0),w(g)),[A.GeometryType]:L(h,S,(function(t,e){e.geometryType=!0})),[A.Resolution]:L(l,S),[A.Zoom]:L(l,S),[A.Time]:L(l,S),[A.Any]:L(a,R(2,1/0),w(a)),[A.All]:L(a,R(2,1/0),w(a)),[A.Not]:L(a,R(1,1),w(a)),[A.Equal]:L(a,R(2,2),w(g),b),[A.NotEqual]:L(a,R(2,2),w(g),b),[A.GreaterThan]:L(a,R(2,2),w(g),b),[A.GreaterThanOrEqualTo]:L(a,R(2,2),w(g),b),[A.LessThan]:L(a,R(2,2),w(g),b),[A.LessThanOrEqualTo]:L(a,R(2,2),w(g),b),[A.Multiply]:L((t=>{let e=l|c;for(let i=0;i{let e=g;for(let i=1;i{let e=g;for(let i=2;i{let e=c|l;for(let i=3;i{let e=g;for(let i=1;i2===t.length?u|d:3===t.length||4===t.length?u|c:u),R(1,1/0),w(l)),[A.Color]:L(c,R(1,4),w(l)),[A.Band]:L(l,R(1,3),w(l)),[A.Palette]:L(c,R(2,2),(function(t,e){const i=T(t[1],e,l);if(i.type!==l)throw new Error(`The first argument of palette must be an number, got ${p(i.type)} instead`);const n=t[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const s=new Array(n.length);for(let t=0;te)throw new Error(`Expected ${e===1/0?`${t} or more`:`${t} to ${e}`} arguments for ${s}, got ${r}`)}}function w(t){return function(e,i){const n=e[0],s=e.length-1,r=new Array(s);for(let o=0;o{"use strict";i.d(e,{uZ:()=>x,nR:()=>v,VO:()=>c,Lm:()=>g,z0:()=>p,$R:()=>l,Tl:()=>_,Sl:()=>f});const n=class{constructor(t,e){this.name=t,this.data=e,this.texture_=null}getTexture(t){if(!this.texture_){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_}delete(t){this.texture_&&t.deleteTexture(this.texture_),this.texture_=null}};var s=i(9825),r=i(2323),o=i(3730),a=i(4401);function l(t){const e=t.toString();return e.includes(".")?e:e+".0"}function h(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(l).join(", ")})`}function c(t){const e=(0,o._j)(t),i=e.length>3?e[3]:1;return h([e[0]/255*i,e[1]/255*i,e[2]/255*i,i])}const u={};let d=0;function g(t){return t in u||(u[t]=d++),u[t]}function _(t){return l(g(t))}function f(t){return"u_var_"+t}function p(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{}}}const m="getBandValue",x="u_paletteTextures";function v(t,e,i,n){const r=(0,s.qg)(t,i,e);if((0,s.Xj)(r.type,s.j))throw new Error("No matching type was found");if(!(0,s.ho)(e,r.type)){const t=(0,s.go)(e),i=(0,s.go)(r.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return T(r,e,n)}function y(t){return(e,i,n)=>{const s=i.args.length,r=new Array(s);for(let t=0;t{const i=e.args[0].value;return i in t.properties||(t.properties[i]={name:i,type:e.type}),(t.inFragmentShader?"v_prop_":"a_prop_")+i},[s.ZD.GeometryType]:(t,e,i)=>{const n="geometryType";return n in t.properties||(t.properties[n]={name:n,type:s.cT,evaluator:t=>(0,s.Ye)(t.getGeometry())}),(t.inFragmentShader?"v_prop_":"a_prop_")+n},[s.ZD.Var]:(t,e)=>{const i=e.args[0].value;return i in t.variables||(t.variables[i]={name:i,type:e.type}),f(i)},[s.ZD.Resolution]:()=>"u_resolution",[s.ZD.Zoom]:()=>"u_zoom",[s.ZD.Time]:()=>"u_time",[s.ZD.Any]:y((t=>`(${t.join(" || ")})`)),[s.ZD.All]:y((t=>`(${t.join(" && ")})`)),[s.ZD.Not]:y((([t])=>`(!${t})`)),[s.ZD.Equal]:y((([t,e])=>`(${t} == ${e})`)),[s.ZD.NotEqual]:y((([t,e])=>`(${t} != ${e})`)),[s.ZD.GreaterThan]:y((([t,e])=>`(${t} > ${e})`)),[s.ZD.GreaterThanOrEqualTo]:y((([t,e])=>`(${t} >= ${e})`)),[s.ZD.LessThan]:y((([t,e])=>`(${t} < ${e})`)),[s.ZD.LessThanOrEqualTo]:y((([t,e])=>`(${t} <= ${e})`)),[s.ZD.Multiply]:y((t=>`(${t.join(" * ")})`)),[s.ZD.Divide]:y((([t,e])=>`(${t} / ${e})`)),[s.ZD.Add]:y((t=>`(${t.join(" + ")})`)),[s.ZD.Subtract]:y((([t,e])=>`(${t} - ${e})`)),[s.ZD.Clamp]:y((([t,e,i])=>`clamp(${t}, ${e}, ${i})`)),[s.ZD.Mod]:y((([t,e])=>`mod(${t}, ${e})`)),[s.ZD.Pow]:y((([t,e])=>`pow(${t}, ${e})`)),[s.ZD.Abs]:y((([t])=>`abs(${t})`)),[s.ZD.Floor]:y((([t])=>`floor(${t})`)),[s.ZD.Ceil]:y((([t])=>`ceil(${t})`)),[s.ZD.Round]:y((([t])=>`floor(${t} + 0.5)`)),[s.ZD.Sin]:y((([t])=>`sin(${t})`)),[s.ZD.Cos]:y((([t])=>`cos(${t})`)),[s.ZD.Atan]:y((([t,e])=>void 0!==e?`atan(${t}, ${e})`:`atan(${t})`)),[s.ZD.Sqrt]:y((([t])=>`sqrt(${t})`)),[s.ZD.Match]:y((t=>{const e=t[0],i=t[t.length-1];let n=null;for(let s=t.length-3;s>=1;s-=2)n=`(${e} == ${t[s]} ? ${t[s+1]} : ${n||i})`;return n})),[s.ZD.Between]:y((([t,e,i])=>`(${t} >= ${e} && ${t} <= ${i})`)),[s.ZD.Interpolate]:y((([t,e,...i])=>{let n="";for(let s=0;s{const e=t[t.length-1];let i=null;for(let n=t.length-3;n>=0;n-=2)i=`(${t[n]} ? ${t[n+1]} : ${i||e})`;return i})),[s.ZD.In]:y((([t,...e],i)=>{const n=function(t,e){return`operator_in_${Object.keys(e.functions).length}`}(0,i),s=[];for(let t=0;t`vec${t.length}(${t.join(", ")})`)),[s.ZD.Color]:y((t=>{if(1===t.length)return`vec4(vec3(${t[0]} / 255.0), 1.0)`;if(2===t.length)return`(${t[1]} * vec4(vec3(${t[0]} / 255.0), 1.0))`;const e=t.slice(0,3).map((t=>`${t} / 255.0`));return 3===t.length?`vec4(${e.join(", ")}, 1.0)`:`(${t[3]} * vec4(${e.join(", ")}, 1.0))`})),[s.ZD.Band]:y((([t,e,i],n)=>{if(!(m in n.functions)){let t="";const e=n.bandCount||1;for(let i=0;i{const[i,...r]=e.args,a=r.length,l=new Uint8Array(4*a);for(let t=0;t0)return l(t.value);if((t.type&s.T8)>0)return t.value.toString();if((t.type&s.cT)>0)return _(t.value.toString());if((t.type&s.mE)>0)return c(t.value);if((t.type&s.Fq)>0)return h(t.value);if((t.type&s.qA)>0)return n=t.value,h((0,a.xq)(n));var n;throw new Error(`Unexpected expression ${t.value} (expected type ${(0,s.go)(e)})`)}},915:(t,e,i)=>{"use strict";i.d(e,{$C:()=>y,$u:()=>G,Af:()=>z,Bg:()=>I,HY:()=>k,Im:()=>N,Ld:()=>a,Li:()=>U,Mx:()=>j,N:()=>g,NW:()=>B,Oq:()=>P,Py:()=>D,QJ:()=>X,R:()=>S,R8:()=>E,RG:()=>O,Rj:()=>c,S5:()=>d,Tr:()=>s,UG:()=>C,Vy:()=>p,WU:()=>F,X$:()=>v,Ym:()=>l,Yw:()=>L,_N:()=>M,aI:()=>m,aZ:()=>_,bE:()=>x,dP:()=>f,k_:()=>R,ms:()=>h,o8:()=>o,q1:()=>w,qF:()=>b,r:()=>r,sB:()=>A,vz:()=>u});var n=i(1580);function s(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;ir&&(h|=n.A.RIGHT),lo&&(h|=n.A.ABOVE),h===n.A.UNKNOWN&&(h=n.A.INTERSECTING),h}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function _(t){return g(1/0,1/0,-1/0,-1/0,t)}function f(t,e){const i=t[0],n=t[1];return g(i,n,i,n,e)}function p(t,e,i,n,s){return E(_(s),t,e,i,n)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e,i){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function y(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function E(t,e,i,n,s){for(;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function N(t){return t[2]=a&&p<=h),s||!(o&n.A.RIGHT)||r&n.A.RIGHT||(m=_-(g-h)*f,s=m>=l&&m<=c),s||!(o&n.A.BELOW)||r&n.A.BELOW||(p=g-(_-l)/f,s=p>=a&&p<=h),s||!(o&n.A.LEFT)||r&n.A.LEFT||(m=_-(g-a)*f,s=m>=l&&m<=c)}return s}function B(t,e,i,n){if(N(t))return _(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r=i[2])){const e=O(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function X(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];U(t,e);const s=O(n);if(O(t)>s&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-s,t[3]]]}return[t]}},1580:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},1142:(t,e,i)=>{"use strict";i.d(e,{m8:()=>r,nF:()=>o});var n=i(4238);let s=!1;function r(t,e,i,n,r,o,a){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(l.responseType="arraybuffer"),l.withCredentials=s,l.onload=function(t){if(!l.status||l.status>=200&&l.status<300){const t=e.getType();try{let n;"text"==t||"json"==t?n=l.responseText:"xml"==t?n=l.responseXML||l.responseText:"arraybuffer"==t&&(n=l.response),n?o(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):a()}catch{a()}}else a()},l.onerror=a,l.send()}function o(t,e){return function(i,s,o,a,l){const h=this;r(t,e,i,s,o,(function(t,e){h.addFeatures(t),void 0!==a&&a(t)}),l||n.tV)}}},6067:(t,e,i)=>{"use strict";i.d(e,{A:()=>V});var n=i(4087);function s(t,e){return r(t,e,[]).join("")}function r(t,e,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?i.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(t.nodeValue);else{let n;for(n=t.firstChild;n;n=n.nextSibling)r(n,e,i)}return i}function o(t,e){return function(i,n){const s=t.call(void 0!==e?e:this,i,n);void 0!==s&&n[n.length-1].push(s)}}function a(t,e,i){return function(n,s){const r=t.call(void 0!==i?i:this,n,s);if(void 0!==r){const t=s[s.length-1],i=void 0!==e?e:n.localName;let o;i in t?o=t[i]:(o=[],t[i]=o),o.push(r)}}}function l(t,e,i){return function(n,s){const r=t.call(void 0!==i?i:this,n,s);void 0!==r&&(s[s.length-1][void 0!==e?e:n.localName]=r)}}function h(t,e,i){let n,s;for(i=void 0!==i?i:{},n=0,s=t.length;n{"use strict";i.d(e,{B4:()=>a,W8:()=>r,hq:()=>l,rT:()=>s,tV:()=>o});var n=i(6514);function s(){return!0}function r(){return!1}function o(){}function a(t){let e,i,s,r=!1;return function(){const o=Array.prototype.slice.call(arguments);return r&&this===s&&(0,n.aI)(o,i)||(r=!0,s=this,i=o,e=t.apply(this,arguments)),e}}function l(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},7430:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(4120),s=i(4087),r=i(9703),o=i(915),a=i(3407),l=i(4238),h=i(7622);const c=(0,r.vt)();class u extends n.A{constructor(){super(),this.extent_=(0,o.S5)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.B4)(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,s.b0)()}closestPointXY(t,e,i,n){return(0,s.b0)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,s.b0)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.aZ)(t),this.extentRevision_=this.getRevision()}return(0,o.$u)(this.extent_,t)}rotate(t,e){(0,s.b0)()}scale(t,e,i){(0,s.b0)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,s.b0)()}getType(){return(0,s.b0)()}applyTransform(t){(0,s.b0)()}intersectsExtent(t){return(0,s.b0)()}translate(t,e){(0,s.b0)()}transform(t,e){const i=(0,a.Jt)(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const l=i.getExtent(),u=i.getWorldExtent(),d=(0,o.Oq)(u)/(0,o.Oq)(l);return(0,r.Zz)(c,u[0],u[3],d,-d,0,0,0),(0,h.Rc)(t,0,t.length,s,c,n),(0,a.RG)(i,e)(t,n,s)}:(0,a.RG)(i,e);return this.applyTransform(n),this}}const d=u},4338:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(7430),r=i(915),o=i(9438);class a extends s.A{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(o.JH),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;et.clone()))}const h=a},1217:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6514),h=i(1374),c=i(6361),u=i(9969),d=i(4350),g=i(904);class _ extends n.Ay{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){(0,l.X$)(this.flatCoordinates,t),this.changed()}clone(){const t=new _(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,h.j)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,u.gr)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,c.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,u.SH)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,g.k)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new _(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,d.gp)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const f=_},6702:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(1217),s=i(2096),r=i(3953),o=i(915),a=i(2497),l=i(3671),h=i(6514),c=i(6361),u=i(9969),d=i(4350);class g extends s.Ay{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,s=e.length;t{"use strict";i.d(e,{A:()=>u});var n=i(4294),s=i(2096),r=i(915),o=i(2497),a=i(6514),l=i(6361),h=i(1597);class c extends s.Ay{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,a.X$)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new c(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,r.Ld)(this.getExtent(),t,e))return n;const s=this.flatCoordinates,o=this.stride;for(let r=0,a=s.length;r{"use strict";i.d(e,{A:()=>v});var n=i(503),s=i(1064),r=i(2096),o=i(3953),a=i(915),l=i(2497),h=i(6514),c=i(2616),u=i(6361),d=i(4350),g=i(3402),_=i(8609),f=i(4049),p=i(2845),m=i(3671);class x extends r.Ay{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,s=[],r=[];for(let t=0,e=n.length;t{"use strict";i.d(e,{A:()=>l});var n=i(2096),s=i(915),r=i(2497),o=i(1597);class a extends n.Ay{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=(0,o.hG)(t,e,s[0],s[1]);if(r{"use strict";i.d(e,{kj:()=>T,Ay:()=>E,nD:()=>C,VY:()=>A});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6361),h=i(8609);class c extends n.Ay{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new c(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,h.eN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,l.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new c(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const u=c;var d=i(4294),g=i(6514),_=i(2616),f=i(4350),p=i(3402),m=i(2845),x=i(1597),v=i(2490);class y extends n.Ay{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,g.X$)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new y(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.HX)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.oW)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,m.zb)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,h.PK)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,p.ug)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,l.cD)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,r.q1)(this.getExtent());this.flatInteriorPoint_=(0,_.J)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new d.A(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new u(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r{"use strict";i.d(e,{Ay:()=>u,dn:()=>h,p0:()=>l,v7:()=>c});var n=i(7430),s=i(4087),r=i(915),o=i(7622);class a extends n.A{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return(0,r.Vy)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,s.b0)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length{"use strict";function n(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;er,PK:()=>s,eN:()=>n})},4049:(t,e,i)=>{"use strict";i.d(e,{C:()=>s});var n=i(915);function s(t,e,i,s){const r=[];let o=(0,n.S5)();for(let a=0,l=i.length;a{"use strict";i.d(e,{HX:()=>o,MD:()=>r,c:()=>a,n:()=>l,oW:()=>h,te:()=>c});var n=i(1597);function s(t,e,i,s,r,o,a){const l=t[e],h=t[e+1],c=t[i]-l,u=t[i+1]-h;let d;if(0===c&&0===u)d=e;else{const g=((r-l)*c+(o-h)*u)/(c*c+u*u);if(g>1)d=i;else{if(g>0){for(let r=0;rr&&(r=l),o=i,a=s}return r}function o(t,e,i,n,s){for(let o=0,a=i.length;o{"use strict";i.d(e,{Gd:()=>a,a_:()=>r,t7:()=>s,zb:()=>o});var n=i(915);function s(t,e,i,s,o){return!(0,n.sB)(o,(function(n){return!r(t,e,i,s,n[0],n[1])}))}function r(t,e,i,n,s,r){let o=0,a=t[i-n],l=t[i-n+1];for(;er&&(i-a)*(r-l)-(s-a)*(n-l)>0&&o++:n<=r&&(i-a)*(r-l)-(s-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function o(t,e,i,n,s,o){if(0===i.length)return!1;if(!r(t,e,i[0],n,s,o))return!1;for(let e=1,a=i.length;e{"use strict";function n(t,e,i,n){for(let n=0,s=i.length;nr,_n:()=>n,d6:()=>o,z2:()=>s})},6361:(t,e,i)=>{"use strict";function n(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;or,cD:()=>s,n2:()=>n})},2616:(t,e,i)=>{"use strict";i.d(e,{J:()=>r,p:()=>o});var n=i(6514),s=i(2845);function r(t,e,i,r,o,a,l){let h,c,u,d,g,_,f;const p=o[a+1],m=[];for(let n=0,s=i.length;nv&&(u=(d+g)/2,(0,s.zb)(t,e,i,r,u,p)&&(x=u,v=n)),d=g}return isNaN(x)&&(x=o[a]),l?(l.push(x,p,v),l):[x,p,v]}function o(t,e,i,n,s){let o=[];for(let a=0,l=i.length;a{"use strict";i.d(e,{L8:()=>a,SH:()=>r,gr:()=>o});var n=i(6514),s=i(1597);function r(t,e,i,r,o,a,l){let h,c;const u=(i-e)/r;if(1===u)h=e;else if(2===u)h=e,c=o;else if(0!==u){let s=t[e],a=t[e+1],l=0;const u=[0];for(let n=e+r;n1?l:2,a=a||new Array(l);for(let e=0;e>1;r{"use strict";i.d(e,{HT:()=>h,Wp:()=>c,fB:()=>a,gp:()=>o,sj:()=>l});var n=i(915),s=i(1374),r=i(2845);function o(t,e,i,r,o){const a=(0,n.R8)((0,n.S5)(),t,e,i,r);return!!(0,n.HY)(o,a)&&(!!(0,n.ms)(o,a)||a[0]>=o[0]&&a[2]<=o[2]||a[1]>=o[1]&&a[3]<=o[3]||(0,s.j)(t,e,i,r,(function(t,e){return(0,n.Mx)(o,t,e)})))}function a(t,e,i,n,s){for(let r=0,a=i.length;r{"use strict";function n(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;an})},3402:(t,e,i)=>{"use strict";function n(t,e,i,n){for(;e0}function r(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,a=i.length;oh,PA:()=>r,mb:()=>o,ug:()=>a,NK:()=>l})},1374:(t,e,i)=>{"use strict";function n(t,e,i,n,s){let r;for(e+=n;en})},3671:(t,e,i)=>{"use strict";i.d(e,{AL:()=>r,Hg:()=>l,P4:()=>s,n$:()=>o,sx:()=>h});var n=i(1597);function s(t,e,i,s,r,o,a){const l=(i-e)/s;if(l<3){for(;e0;){const i=c.pop(),o=c.pop();let a=0;const l=t[o],d=t[o+1],g=t[i],_=t[i+1];for(let e=o+s;ea&&(u=e,a=r)}a>r&&(h[(u-e)/s]=1,o+s0&&f>g)&&(_<0&&p<_||_==p||_>0&&p>_)?(l=i,h=d):(r[a++]=l,r[a++]=h,c=l,u=h,l=i,h=d)}return r[a++]=l,r[a++]=h,a}function l(t,e,i,n,s,r,o,l){for(let h=0,c=i.length;h{"use strict";function n(t,e,i,n,s,r){r=r||[];let o=0;for(let a=e;an,Tl:()=>o,e$:()=>s,hs:()=>r})},7771:(t,e,i)=>{"use strict";i.d(e,{DT:()=>c,FT:()=>d,Wl:()=>h,XM:()=>u,_p:()=>s,cr:()=>l,ew:()=>a,j:()=>o,oF:()=>r});const n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",s=n.includes("firefox"),r=n.includes("safari")&&!n.includes("chrom")&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),o=n.includes("webkit")&&!n.includes("edge"),a=n.includes("macintosh"),l="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,h="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,u="function"==typeof createImageBitmap,d=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},6068:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==s.A.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();(0,n.D2)(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}const o=r},422:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(1685),s=i(1409),r=i(25),o=i(1064);class a extends r.A{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new o.Ay([i])}getGeometry(){return this.geometry_}}const l=a;var h=i(8704);const c="boxcancel";class u extends n.Ay{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class d extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new l(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:h.at,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new u("boxdrag",t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new u(e?"boxend":c,t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new u("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new u(c,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}const g=d},4473:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(1409),s=i(4238),r=i(8704),o=i(3474),a=i(6933);class l extends n.A{constructor(t){super({stopDown:s.W8}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:(0,r.Q7)(r.TS,r.fs);this.condition_=t.onFocusOnly?(0,r.Q7)(r.eL,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,s=e.getEventPixel((0,n.v)(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(s[0],s[1]),this.lastCentroid){const e=[this.lastCentroid[0]-s[0],s[1]-this.lastCentroid[1]],i=t.map.getView();(0,a.hs)(e,i.getResolution()),(0,a.e$)(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=s,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),a=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:o.vT})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const h=l},4051:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(1409),s=i(4238),r=i(8704),o=i(4498);class a extends n.A{constructor(t){t=t||{},super({stopDown:s.W8}),this.condition_=t.condition?t.condition:r.IO,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!(0,r.A4)(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===o.b8)return;const n=e.getSize(),s=t.pixel,a=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=a-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=a}handleUpEvent(t){return!(0,r.A4)(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!(0,r.A4)(t)&&(!(!(0,r.at)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}}const l=a},4423:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(422),s=i(3474),r=i(8704);class o extends n.A{constructor(t){super({condition:(t=t||{}).condition?t.condition:r.Kg,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:s.vT})}}const a=o},9964:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>W});var n=i(2096),s=i(915),r=i(2497),o=i(7622);class a extends n.Ay{constructor(t,e,i){super(),void 0!==i&&void 0===e?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){const t=new a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=t-s[0],o=e-s[1],a=r*r+o*o;if(a=e[0]||t[1]<=e[1]&&t[3]>=e[1]||(0,s.sB)(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i=i?t[e-i]:t[e]}function O(t,e,i){let n,s;eo)return D(B(t,n),B(t,s));let a=0;n=i?n-=i:n<0&&(n+=i);let r=n+1;r>=i&&(r-=i);const o=t[n],a=o[0],l=o[1],h=t[r];return[a+(h[0]-a)*s,l+(h[1]-l)*s]}class U extends E.A{constructor(t){const e=t;e.stopDown||(e.stopDown=S.W8),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:S.rT,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new l([NaN,NaN]),s=(0,L.Ad)(t[0],i),r=(0,I.hG)(s,(0,L.Ad)(t[t.length-1],i));n.setCenterAndRadius(s,Math.sqrt(r),this.geometryLayout_);const o=(0,L.Tf)();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=y.A:"LineString"===t?e=_.A:"Polygon"===t&&(e=T.Ay),i=function(i,n,s){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new A.A({source:new C.A({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:X(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:R.TS,this.freehandCondition_,t.freehand?this.freehandCondition_=R.Gk:this.freehandCondition_=t.freehandCondition?t.freehandCondition:R.Kg,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(g.A.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?R.Gk:t:R.Zm,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===c.A.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===p.A.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&t.type===p.A.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===p.A.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===p.A.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===p.A.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===p.A.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===p.A.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new f.A(p.A.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,s.Tr)([i,n]),o=this.traceSource_.getFeaturesInExtent(r);if(0===o.length)return;const a=function(t,e){const i=[];for(let n=0;nt.endIndex||!i&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e=r;--e)n.push(F(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&(0,I.Io)(e.startPx,t.pixel)i.startIndex?hi.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const t=B(h.coordinates,l),s=i.getPixelFromCoordinate(t);(0,I.Io)(s,e.startPx)>n&&(c=!1)}if(c){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(ithis.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,s=[this.finishCoordinate_];const r=this.mode_;if("Point"===r)i=!0;else if("Circle"===r)i=2===this.sketchCoords_.length;else if("LineString"===r)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,s=[t[0][0],t[0][t[0].length-2]],s=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,r=s.length;n=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),this.geometryFunction_(s,e,i)):"Polygon"===r&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),n&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n?this.finishDrawing():this.sketchFeature_}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let s=0;s=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return null;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();return"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new x.A([e])):"MultiLineString"===this.type_?t.setGeometry(new m.A([e])):"MultiPolygon"===this.type_&&t.setGeometry(new v.A([e])),this.dispatchEvent(new M("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t),t}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new M("drawabort",t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;e{"use strict";i.d(e,{Ay:()=>h,D2:()=>l,e4:()=>a});var n=i(4120),s=i(2187),r=i(3474);class o extends n.A{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(s.A.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(s.A.ACTIVE,t)}setMap(t){this.map_=t}}function a(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:r.sn,center:t.getConstrainedCenter(s)})}}function l(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:r.vT})}const h=o},9888:(t,e,i)=>{"use strict";i.d(e,{A:()=>u});var n=i(6837),s=i(6292);const r="ArrowLeft",o="ArrowRight",a="ArrowDown";var l=i(8704),h=i(6933);class c extends s.Ay{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return(0,l.TS)(t)&&(0,l.tE)(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==a||n==r||n==o||"ArrowUp"==n)){const l=t.map.getView(),c=l.getResolution()*this.pixelDelta_;let u=0,d=0;n==a?d=-c:n==r?u=-c:n==o?u=c:d=c;const g=[u,d];(0,h.e$)(g,l.getRotation()),(0,s.e4)(l,g,this.duration_),i.preventDefault(),e=!0}}return!e}}const u=c},6856:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(6837),s=i(6292),r=i(8704);class o extends s.Ay{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!(0,r.GB)(t)&&(0,r.tE)(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN||t.type==n.A.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,o="+"===n?this.delta_:-this.delta_,a=r.getView();(0,s.D2)(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const a=o},9132:(t,e,i)=>{"use strict";i.d(e,{A:()=>M});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(6717),l=i(3445),h=i(4294),c=i(1409),u=i(5902),d=i(8280),g=i(2757),_=i(731),f=i(8704),p=i(915),m=i(6933),x=i(9276),v=i(6514),y=i(1064),E=i(3407),T=i(4087);const A=[0,0,0,0],C=[],S="modifyend";class R extends r.Ay{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class w extends c.A{constructor(t){let e;if(super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:f.fs,this.defaultDeleteCondition_=function(t){return(0,f.Js)(t)&&(0,f.t5)(t)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:f.Gk,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new u.A,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new g.A({source:new _.A({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:P(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,t.features?e=t.features:t.source&&(this.source_=t.source,e=new n.A(this.source_.getFeatures()),this.source_.addEventListener(d.A.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(d.A.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(s.A.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(s.A.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===t.snapToPointer?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(o.A.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new n.A;const i=this.featuresBeingModified_.getArray();for(let t=0,n=e.length;t=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n=0;--t)this.insertVertex_(s[t],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),s=i.featureSegments[0],r=i.featureSegments[1];s.segment[0]=e,s.segment[1]=e,r.segment[0]=e,r.segment[1]=e,this.rBush_.update((0,p.dP)(e),s);let o=n;const a=(0,E.Tf)();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=(0,y.nD)(o).transform(e,a)}this.rBush_.update(o.getExtent(),r)}else this.rBush_.update((0,p.Tr)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new R(S,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),s=e.getView().getProjection(),r=function(t,e){return I(n,t,s)-I(n,e,s)};let o,l;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{i&&"Point"===i.getType()&&(i=new h.A((0,E.te)(i.getCoordinates(),s)));const n=i||t.getGeometry();if(t instanceof a.A&&this.features_.getArray().includes(t)){l=n;const e=t.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:l,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=(0,E.SD)((0,p.dP)(n,A),s),i=e.getView().getResolution()*this.pixelTolerance_,r=(0,E.JR)((0,p.r)(t,i,A),s);o=this.rBush_.getInExtent(r)}if(o&&o.length>0){const i=o.sort(r)[0],a=i.segment;let h=L(n,i,s);const c=e.getPixelFromCoordinate(h);let u=(0,m.Io)(t,c);if(l||u<=this.pixelTolerance_){const t={};if(t[(0,T.v6)(a)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(a[0]),s=e.getPixelFromCoordinate(a[1]),r=(0,m.hG)(c,n),l=(0,m.hG)(c,s);u=Math.sqrt(Math.min(r,l)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=r>l?a[1]:a[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[(0,T.v6)(i.geometry)]=!0;for(let e=1,i=o.length;e=0;--o)s=t[o],u=s[0],d=(0,T.v6)(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===s[1]?(e[d].right=u,e[d].index=u.index):1==s[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,l=e[d].left,a=e[d].index,h=a-1,u=void 0!==l?l:c,h<0&&(h=0),r=u.geometry,n=r.getCoordinates(),i=n,g=!1,r.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(r,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==l&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:e};this.rBush_.insert((0,p.Tr)(t.segment),t)}this.updateSegmentIndices_(r,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(s){s.geometry===t&&(void 0===i||void 0===s.depth||(0,v.aI)(s.depth,i))&&s.index>e&&(s.index+=n)}))}}function b(t,e){return t.index-e.index}function I(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let s=n;if(1===e.index){const e=(0,E.Tf)();e&&(s=s.clone().transform(e,i));const n=(0,m.hG)(s.getCenter(),(0,E.Ad)(t,i)),r=Math.sqrt(n)-s.getRadius();return r*r}}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,m.$x)(s,C)}function L(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&1===e.index){let e=n;const s=(0,E.Tf)();return s&&(e=e.clone().transform(s,i)),(0,E.te)(e.getClosestPoint((0,E.Ad)(t,i)),i)}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,E.te)((0,m.sG)(s,C),i)}function P(){const t=(0,x.mY)();return function(e,i){return t.Point}}const M=w},8751:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(6292),r=i(7771),o=i(8704),a=i(1597);class l extends s.Ay{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:o.Gk;this.condition_=t.onFocusOnly?(0,o.Q7)(o.eL,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==n.A.WHEEL)return!0;const e=t.map,i=t.originalEvent;let s;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==n.A.WHEEL&&(s=i.deltaY,r._p&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=r.cr),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),0===s)return!1;this.lastDelta_=s;const o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=e.getView();if("trackpad"===this.mode_&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,a.qE)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,s.D2)(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const h=l},3711:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(1409),s=i(4238),r=i(4498);class o extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],s=this.targetPointers[1],o=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=o;const a=t.map,l=a.getView();l.getConstraints().rotation!==r.b8&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel((0,n.v)(this.targetPointers))),this.rotating_&&(a.render(),l.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const a=o},5243:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(1409),s=i(4238);class r extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel((0,n.v)(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const o=r},1409:(t,e,i)=>{"use strict";i.d(e,{A:()=>a,v:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==s.A.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==s.A.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==s.A.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==s.A.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function o(t){const e=t.length;let i=0,n=0;for(let s=0;s{"use strict";i.d(e,{A:()=>n});const n={ACTIVE:"active"}},4458:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(71),s=i(1685),r=i(6717),o=i(2187),a=i(1409),l=i(4238),h=i(8704),c=i(3407);class u extends s.Ay{constructor(t,e,i,n,s){super(t),this.features=e,this.coordinate=i,this.startCoordinate=n,this.mapBrowserEvent=s}}class d extends a.A{constructor(t){let e;if(super(t=t||{}),this.on,this.once,this.un,this.lastCoordinate_=null,this.startCoordinate_=null,this.features_=void 0!==t.features?t.features:null,t.layers&&!this.features_)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=l.rT;this.layerFilter_=e,this.filter_=t.filter&&!this.features_?t.filter:l.rT,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.condition_=t.condition?t.condition:h.Gk,this.lastFeature_=null,this.addChangeListener(o.A.ACTIVE,this.handleActiveChanged_)}handleDownEvent(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translatestart",e,t.coordinate,this.startCoordinate_,t)),!0}return!1}handleUpEvent(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translateend",e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1}handleDragEvent(t){if(this.lastCoordinate_){const e=t.coordinate,i=t.map.getView().getProjection(),s=(0,c.Ad)(e,i),r=(0,c.Ad)(this.lastCoordinate_,i),o=s[0]-r[0],a=s[1]-r[1],l=this.features_||new n.A([this.lastFeature_]),h=(0,c.Tf)();l.forEach((function(t){const e=t.getGeometry();h?(e.transform(h,i),e.translate(o,a),e.transform(i,h)):e.translate(o,a),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new u("translating",l,e,this.startCoordinate_,t))}}handleMoveEvent(t){const e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")}featuresAtPixel_(t,e){return e.forEachFeatureAtPixel(t,((t,e)=>{if(t instanceof r.A&&this.filter_(t,e)&&(!this.features_||this.features_.getArray().includes(t)))return t}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})}getHitTolerance(){return this.hitTolerance_}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();super.setMap(t),this.updateState_(e)}handleActiveChanged_(){this.updateState_(null)}updateState_(t){let e=this.getMap();const i=this.getActive();e&&i||(e=e||t,!e)||e.getViewport().classList.remove("ol-grab","ol-grabbing")}}const g=d},8620:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(4120),s=i(5332),r=i(4087),o=i(588),a=i(1597);class l extends n.A{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[s.A.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.v)("number"==typeof e[s.A.OPACITY],"Layer opacity must be a number"),e[s.A.VISIBLE]=void 0===t.visible||t.visible,e[s.A.Z_INDEX]=t.zIndex,e[s.A.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[s.A.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[s.A.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[s.A.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.qE)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return(0,r.b0)()}getLayerStatesArray(t){return(0,r.b0)()}getExtent(){return this.get(s.A.EXTENT)}getMaxResolution(){return this.get(s.A.MAX_RESOLUTION)}getMinResolution(){return this.get(s.A.MIN_RESOLUTION)}getMinZoom(){return this.get(s.A.MIN_ZOOM)}getMaxZoom(){return this.get(s.A.MAX_ZOOM)}getOpacity(){return this.get(s.A.OPACITY)}getSourceState(){return(0,r.b0)()}getVisible(){return this.get(s.A.VISIBLE)}getZIndex(){return this.get(s.A.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(s.A.EXTENT,t)}setMaxResolution(t){this.set(s.A.MAX_RESOLUTION,t)}setMinResolution(t){this.set(s.A.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(s.A.MAX_ZOOM,t)}setMinZoom(t){this.set(s.A.MIN_ZOOM,t)}setOpacity(t){(0,o.v)("number"==typeof t,"Layer opacity must be a number"),this.set(s.A.OPACITY,t)}setVisible(t){this.set(s.A.VISIBLE,t)}setZIndex(t){this.set(s.A.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const h=l},2808:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(764),s=i(5360);class r extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(s.A.PRELOAD)}setPreload(t){this.set(s.A.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(s.A.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(s.A.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const o=r},2284:(t,e,i)=>{"use strict";i.d(e,{A:()=>Z});var n=i(764),s=i(5341),r=i(9276),o=i(7733),a=i(3628),l=i(9700),h=i(6936),c=i(953),u=i(1426),d=i(9825),g=i(3730);function _(t,e,i){const n=(0,d.qg)(t,i);if(!(0,d.ho)(e,n.type)){const t=(0,d.go)(e),i=(0,d.go)(n.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return f(n,i)}function f(t,e){if(t instanceof d._D){if(t.type===d.mE&&"string"==typeof t.value){const e=(0,g.sH)(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case d.ZD.Number:case d.ZD.String:case d.ZD.Coalesce:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;et.properties[i];case d.ZD.Var:return t=>t.variables[i];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case d.ZD.Id:return t=>t.featureId;case d.ZD.GeometryType:return t=>t.geometryType;case d.ZD.Concat:{const i=t.args.map((t=>f(t,e)));return t=>"".concat(...i.map((e=>e(t).toString())))}case d.ZD.Resolution:return t=>t.resolution;case d.ZD.Any:case d.ZD.All:case d.ZD.Between:case d.ZD.In:case d.ZD.Not:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;e{const e=s[0](t),i=s[1](t),n=s[2](t);return e>=i&&e<=n};case d.ZD.In:return t=>{const e=s[0](t);for(let i=1;i!s[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}(t,e);case d.ZD.Equal:case d.ZD.NotEqual:case d.ZD.LessThan:case d.ZD.LessThanOrEqualTo:case d.ZD.GreaterThan:case d.ZD.GreaterThanOrEqualTo:return function(t,e){const i=t.operator,n=f(t.args[0],e),s=f(t.args[1],e);switch(i){case d.ZD.Equal:return t=>n(t)===s(t);case d.ZD.NotEqual:return t=>n(t)!==s(t);case d.ZD.LessThan:return t=>n(t)n(t)<=s(t);case d.ZD.GreaterThan:return t=>n(t)>s(t);case d.ZD.GreaterThanOrEqualTo:return t=>n(t)>=s(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}(t,e);case d.ZD.Multiply:case d.ZD.Divide:case d.ZD.Add:case d.ZD.Subtract:case d.ZD.Clamp:case d.ZD.Mod:case d.ZD.Pow:case d.ZD.Abs:case d.ZD.Floor:case d.ZD.Ceil:case d.ZD.Round:case d.ZD.Sin:case d.ZD.Cos:case d.ZD.Atan:case d.ZD.Sqrt:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{let e=1;for(let i=0;is[0](t)/s[1](t);case d.ZD.Add:return t=>{let e=0;for(let i=0;is[0](t)-s[1](t);case d.ZD.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(en?n:e};case d.ZD.Mod:return t=>s[0](t)%s[1](t);case d.ZD.Pow:return t=>Math.pow(s[0](t),s[1](t));case d.ZD.Abs:return t=>Math.abs(s[0](t));case d.ZD.Floor:return t=>Math.floor(s[0](t));case d.ZD.Ceil:return t=>Math.ceil(s[0](t));case d.ZD.Round:return t=>Math.round(s[0](t));case d.ZD.Sin:return t=>Math.sin(s[0](t));case d.ZD.Cos:return t=>Math.cos(s[0](t));case d.ZD.Atan:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case d.ZD.Sqrt:return t=>Math.sqrt(s[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}(t,e);case d.ZD.Case:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s{for(let e=0;e{const e=n[0](t);for(let s=1;s{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a=s)return 2===a?l:h?m(e,s,r,o,i,l):p(e,s,r,o,i,l);r=i,o=l}return o}}(t,e);case d.ZD.ToString:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{const i=s[0](e);return t.args[0].type===d.mE?(0,g.dI)(i):i.toString()};throw new Error(`Unsupported convert operator ${i}`)}(t,e);default:throw new Error(`Unsupported operator ${i}`)}}function p(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i;return n+(1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1))*(r-n)}function m(t,e,i,n,s,r){if(0==s-i)return n;const o=(0,g.eE)(n),a=(0,g.eE)(r);let l=a[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const h=[p(t,e,i,o[0],s,a[0]),p(t,e,i,o[1],s,a[1]),o[2]+p(t,e,i,0,s,l),p(t,e,i,n[3],s,r[3])];return(0,g.S8)((0,g.cD)(h))}var x=i(3530),v=i(4401);function y(t){return!0}function E(t){const e=(0,d.SR)(),i=t.length,n=new Array(i);for(let s=0;s4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function U(t,e){const i=G(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const X="renderOrder";class W extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(X)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter==0&&(t.declutter[i]=new s(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(X,t)}setStyle(t){this.style_=void 0===t?r.d1:t;const e=function(t){if(void 0===t)return r.d1;if(!t)return null;if("function"==typeof t)return t;if(t instanceof r.Ay)return t;if(!Array.isArray(t))return E([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof r.Ay){const i=new Array(e);for(let n=0;n{"use strict";i.d(e,{A:()=>A});var n=i(71),s=i(3984),r=i(6717),o=i(3628),a=i(1217),l=i(4294),h=i(953),c=i(9276),u=i(1426),d=i(2757),g=i(731),_=i(915),f=i(1597),p=i(6933),m=i(3407),x=i(7331);function v(t,e,i){const n=[];let s=t(0),r=t(1),o=e(s),a=e(r);const l=[r,s],h=[a,o],c=[1,0],u={};let d,g,_,p,m,x,v=1e5;for(;--v>0&&c.length>0;)_=c.pop(),s=l.pop(),o=h.pop(),x=_.toString(),x in u||(n.push(o[0],o[1]),u[x]=!0),p=c.pop(),r=l.pop(),a=h.pop(),m=(_+p)/2,d=t(m),g=e(d),(0,f.Q1)(g[0],g[1],o[0],o[1],a[0],a[1]){const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new c.Ay({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new u.A({font:"12px Calibri,sans-serif",textAlign:"right",fill:new o.A({color:"rgba(0,0,0,1)"}),stroke:new h.A({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(s.A.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:E,this.setSource(new g.A({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new n.A,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new c.Ay({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,_.Li)(i,this.projection_),this.loadedExtent_&&((0,_.bE)(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),s=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=(0,_._N)(s,t);if(this.renderedExtent_&&(0,_.aI)(this.renderedExtent_,o)&&this.renderedResolution_===e)return;if(this.renderedExtent_=o,this.renderedResolution_=e,(0,_.Im)(o))return;const a=(0,_.q1)(o),l=e*e/4;(!this.projection_||!(0,m.tI)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(o,a,e,l);let h,c=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(c+=this.meridians_.length),this.parallelsLabels_&&(c+=this.parallels_.length);c>this.featurePool_.length;)h=new r.A,this.featurePool_.push(h);const u=n.getFeaturesCollection();u.clear();let d,g,f=0;for(d=0,g=this.meridians_.length;dMath.PI/2);const d=(0,x.r2)(t);for(let t=a;t<=l;++t){let i,n,c,g,_=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,c=this.meridiansLabels_.length;n=a?(t[0]=o[0],t[2]=o[2]):r=!0);const l=[(0,f.qE)(e[0],this.minX_,this.maxX_),(0,f.qE)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let c=(0,f.qE)(h[0],this.minLon_,this.maxLon_),u=(0,f.qE)(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,p,m,x,v=t;r||(v=[(0,f.qE)(t[0],this.minX_,this.maxX_),(0,f.qE)(t[1],this.minY_,this.maxY_),(0,f.qE)(t[2],this.minX_,this.maxX_),(0,f.qE)(t[3],this.minY_,this.maxY_)]);const y=(0,_.NW)(v,this.toLonLatTransform_,void 0,8);let E=y[3],T=y[2],A=y[1],C=y[0];if(r||((0,_.Ym)(v,this.bottomLeft_)&&(C=this.minLon_,A=this.minLat_),(0,_.Ym)(v,this.bottomRight_)&&(T=this.maxLon_,A=this.minLat_),(0,_.Ym)(v,this.topLeft_)&&(C=this.minLon_,E=this.maxLat_),(0,_.Ym)(v,this.topRight_)&&(T=this.maxLon_,E=this.maxLat_),E=(0,f.qE)(E,u,this.maxLat_),T=(0,f.qE)(T,c,this.maxLon_),A=(0,f.qE)(A,this.minLat_,u),C=(0,f.qE)(C,this.minLon_,c)),c=Math.floor(c/s)*s,x=(0,f.qE)(c,this.minLon_,this.maxLon_),p=this.addMeridian_(x,A,E,n,t,0),g=0,r)for(;(x-=s)>=C&&g++n[r]&&(s=r,r=1);const o=Math.max(e[1],n[s]),a=Math.min(e[3],n[r]),l=(0,f.qE)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[s-1]+(n[r-1]-n[s-1])*(l-n[s])/(n[r]-n[s]),l],c=this.meridiansLabels_[i].geom;return c.setCoordinates(h),c}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,s){const r=function(t,e,i,n,s){const r=(0,m.Jt)("EPSG:4326");return v((function(n){return[e+(i-e)*n,t]}),(0,m.RG)(r,n),s)}(t,e,i,this.projection_,n);let o=this.parallels_[s];return o?(o.setFlatCoordinates("XY",r),o.changed()):o=new a.A(r,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let s=0,r=n.length-2;n[s]>n[r]&&(s=r,r=0);const o=Math.max(e[0],n[s]),a=Math.min(e[2],n[r]),l=(0,f.qE)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[s+1]+(n[r+1]-n[s+1])*(l-n[s])/(n[r]-n[s])],c=this.parallelsLabels_[i].geom;return c.setCoordinates(h),c}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=(0,m.Jt)("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=(0,m.RG)(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const A=T},1905:(t,e,i)=>{"use strict";i.d(e,{A:()=>z});var n=i(2284),s=i(8280),r=i(2703),o=i(259),a=i(492),l=i(6514);const h=new Uint8Array(4),c=class{constructor(t,e){this.helper_=t;const i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.depthbuffer_=i.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){(0,l.aI)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return h[0]=0,h[1]=0,h[2]=0,h[3]=0,h;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return h[0]=this.data_[4*i],h[1]=this.data_[4*i+1],h[2]=this.data_[4*i+2],h[3]=this.data_[4*i+3],h}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}};var u=i(130),d=i(9777);const g="GENERATE_POINT_BUFFERS";var _=i(9703),f=i(588),p=i(915);function m(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}i(6570);var x=i(3407),v=i(4087),y=i(9438);class E extends a.A{constructor(t,e){const i=e.uniforms||{},n=(0,_.vt)();i[d.M8.PROJECTION_MATRIX]=n,super(t,{uniforms:i,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new o.Ay(u.H7,u.Be),this.indicesBuffer_=new o.Ay(u.IP,u.Be),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const r=e.attributes?e.attributes.map((function(t){return{name:"a_prop_"+t.name,size:1,type:d.jQ.FLOAT}})):[];this.attributes=[{name:"a_position",size:2,type:d.jQ.FLOAT},{name:"a_index",size:1,type:d.jQ.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:d.jQ.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:d.jQ.FLOAT})),this.attributes.push(...r),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=(0,p.S5)(),this.currentTransform_=n,this.renderTransform_=(0,_.vt)(),this.invertRenderTransform_=(0,_.vt)(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function(){const t='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function x(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new Error(t)}(0!==n,"Transformation matrix cannot be inverted");const x=t[0],i=t[1],u=t[2],o=t[3],f=t[4],s=t[5];return e[0]=o/n,e[1]=-i/n,e[2]=-u/n,e[3]=x/n,e[4]=(u*s-o*f)/n,e[5]=-(x*s-i*f)/n,e}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var u={exports:{}};function o(e,t,n){n=n||2;var r,x,i,u,o,s,l,v=t&&t.length,h=v?t[0]*n:e.length,c=f(e,0,h,n,!0),g=[];if(!c||c.next===c.prev)return g;if(v&&(c=function(e,t,n,r){var x,i,u,o=[];for(x=0,i=t.length;x80*n){r=i=e[0],x=u=e[1];for(var b=n;bi&&(i=o),s>u&&(u=s);l=0!==(l=Math.max(i-r,u-x))?32767/l:0}return a(c,g,n,r,x,l,0),g}function f(e,t,n,r,x){var i,u;if(x===O(e,t,n,r)>0)for(i=t;i=t;i-=r)u=P(i,e[i],e[i+1],u);return u&&m(u,u.next)&&(B(u),u=u.next),u}function s(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(B(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,x,i,u){if(e){!u&&i&&function(e,t,n,r){var x=e;do{0===x.z&&(x.z=b(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,function(e){var t,n,r,x,i,u,o,f,s=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,o=0,t=0;t0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=xi?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=of?o>s?o:s:f>s?f:s,y=a>l?a>v?a:v:l>v?l:v,g=b(h,c,t,n,r),d=b(p,y,t,n,r),Z=e.prevZ,m=e.nextZ;Z&&Z.z>=g&&m&&m.z<=d;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;Z&&Z.z>=g;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;m&&m.z<=d;){if(m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function h(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!m(x,i)&&A(x,r,r.next,i)&&z(x,i)&&z(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),B(r),B(r.next),r=e=i),r=r.next}while(r!==e);return s(r)}function c(e,t,n,r,x,i){var u=e;do{for(var o=u.next.next;o!==u.prev;){if(u.i!==o.i&&Z(u,o)){var f=F(u,o);return u=s(u,u.next),f=s(f,f.next),a(u,t,n,r,x,i,0),void a(f,t,n,r,x,i,0)}o=o.next}u=u.next}while(u!==e)}function p(e,t){return e.x-t.x}function y(e,t){var n=function(e,t){var n,r=t,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=x&&o>u&&(u=o,n=r.x=r.x&&r.x>=a&&x!==r.x&&M(in.x||r.x===n.x&&g(n,r)))&&(n=r,v=f)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=F(n,e);return s(r,r.next),s(n,n.next)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function b(e,t,n,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x=(e-u)*(i-o)&&(e-u)*(r-o)>=(n-u)*(t-o)&&(n-u)*(i-o)>=(x-u)*(r-o)}function Z(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||m(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var x=I(w(e,t,n)),i=I(w(e,t,r)),u=I(w(n,r,e)),o=I(w(n,r,t));return x!==i&&u!==o||(!(0!==x||!E(e,n,t))||(!(0!==i||!E(e,r,t))||(!(0!==u||!E(n,e,r))||!(0!==o||!E(n,t,r)))))}function E(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function z(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function F(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function P(e,t,n,r){var x=new _(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var x=0,i=t,u=n-r;i0&&(r+=e[x-1].length,n.holes.push(r))}return n};var N=i(u.exports);const R=[],S={vertexPosition:0,indexPosition:0};function T(e,t,n,r,x){e[t+0]=n,e[t+1]=r,e[t+2]=x}function U(e,t,n,r,x,i){const u=3+x,o=e[t+0],f=e[t+1],s=R;s.length=x;for(let n=0;n0?f:2*Math.PI-f}let d=-1,M=-1,Z=l;const w=null!==i;if(null!==x){d=b(y,g,r(s,[...[e[x],e[x+1]]])),Math.cos(d)<=.985&&(Z+=Math.tan((d-Math.PI)/2))}if(w){M=b(g,y,r(s,[...[e[i],e[i+1]]])),Math.cos(M)<=.985&&(Z+=Math.tan((Math.PI-M)/2))}function m(e,t){return 0===t?1e4*e:Math.sign(t)*(1e4*e+Math.abs(t))}return u.push(c[0],c[1],p[0],p[1],d,M,a,m(0,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(1,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(2,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(3,l)),u.push(...f),o.push(h,h+1,h+2,h+1,h+3,h+2),{length:a+Math.sqrt((g[0]-y[0])*(g[0]-y[0])+(g[1]-y[1])*(g[1]-y[1])),angle:Z}}function G(e,t,n,r,x){const i=2+x;let u=t;const o=e.slice(u,u+x);u+=x;const f=e[u++];let s=0;const a=new Array(f-1);for(let t=0;t{const i=r.data;switch(i.type){case t:{const e=3,t=2,n=i.customAttributesSize,r=t+n,x=new Float32Array(i.renderInstructions),u=x.length/r,o=4*u*(n+e),f=new Uint32Array(6*u),s=new Float32Array(o);let a;for(let e=0;e0?c=o+(n-1)*r:l&&(c=i-r);let p=null;n{const e=t.data;if(e.type===g){const i=e.projectionTransform;this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,(0,_.T9)(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const a=this.getLayer().getSource();this.sourceListenKeys_=[(0,y.KT)(a,s.A.ADDFEATURE,this.handleSourceFeatureAdded_,this),(0,y.KT)(a,s.A.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),(0,y.KT)(a,s.A.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),(0,y.KT)(a,s.A.CLEAR,this.handleSourceFeatureClear_,this)],a.forEachFeature((t=>{this.featureCache_[(0,v.v6)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new c(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[(0,v.v6)(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[i,n,s]=function(t,e){const i=t.viewState.projection,n=e.getSource().getWrapX()&&i.canWrapX(),s=i.getExtent(),r=t.extent,o=n?(0,p.RG)(s):null,a=n?Math.ceil((r[2]-s[2])/o)+1:1;return[n?Math.floor((r[0]-s[0])/o):0,a,o]}(t,this.getLayer());return this.renderWorlds(t,!1,i,n,s),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,i,n,s),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),i=e.getSource(),s=t.viewState,o=!t.viewHints[r.A.ANIMATING]&&!t.viewHints[r.A.INTERACTING],a=!(0,p.aI)(this.previousExtent_,t.extent),l=this.sourceRevision_ 0) {\n if (gl_FragColor.a < 0.05) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_parameters;\nattribute float a_distance;\nattribute vec2 a_joinAngles;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n float halfAngle = joinAngle / 2.0;\n float c = cos(halfAngle);\n float s = sin(halfAngle);\n vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n float length = 1.0 / s;\n return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n // if on a cap or the join angle is too high, offset the line along the segment normal\n if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n return point - normal * offsetPx;\n }\n // offset is applied along the inverted normal (positive offset goes "right" relative to line direction)\n return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n v_angleStart = a_joinAngles.x;\n v_angleEnd = a_joinAngles.y;\n float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);\n // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);\n\n float lineWidth = ${this.strokeWidthExpression_};\n float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n // compute segment start/end in px with offset\n vec2 segmentStartPx = worldToPx(a_segmentStart);\n vec2 segmentEndPx = worldToPx(a_segmentEnd);\n vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n \n // compute current vertex position\n float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n vec2 joinDirection;\n vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;\n // if angle is too high, do not make a proper join\n if (cos(angle) > 0.985 || isCap(angle)) {\n joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n } else {\n joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n }\n positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n gl_Position = pxToScreen(positionPx);\n\n v_segmentStart = segmentStartPx;\n v_segmentEnd = segmentEndPx;\n v_width = lineWidth;\n v_prop_hitColor = a_prop_hitColor;\n v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n vec2 tangent = normalize(end - start);\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 startToPoint = point - start;\n return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n float c = cos(joinAngle * 0.5);\n float s = sin(joinAngle * 0.5);\n float direction = -sign(sin(joinAngle));\n vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n float radius = width * 0.5 * s;\n return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n if (cos(joinAngle) > 0.985) { // avoid risking a division by zero\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n float miterLength = 1. / sin(joinAngle * 0.5);\n float miterLimit = ${this.strokeMiterLimitExpression_};\n if (miterLength > miterLimit) {\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n if (capType == ${(0,A.Tl)("butt")}) {\n return buttCapDistanceField(point, start, end);\n } else if (capType == ${(0,A.Tl)("square")}) {\n return squareCapDistanceField(point, start, end, width);\n }\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n if (joinType == ${(0,A.Tl)("bevel")}) {\n return bevelJoinField(point, start, end, width, joinAngle);\n } else if (joinType == ${(0,A.Tl)("miter")}) {\n return miterJoinDistanceField(point, start, end, width, joinAngle);\n }\n return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n if (isCap(joinAngle)) {\n return capDistanceField(point, start, end, width, capType);\n }\n return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nvoid main(void) {\n vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(currentPoint);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n\n float segmentLength = length(v_segmentEnd - v_segmentStart);\n vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;\n vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n vec2 startToPoint = currentPoint - v_segmentStart;\n float currentLengthPx = max(0., min(dot(segmentTangent, startToPoint), segmentLength)) + v_distanceOffsetPx; \n float currentRadiusPx = abs(dot(segmentNormal, startToPoint));\n float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;\n vec4 color = ${this.strokeColorExpression_} * u_globalAlpha;\n float capType = ${this.strokeCapExpression_};\n float joinType = ${this.strokeJoinExpression_};\n float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);\n float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);\n float distance = max(\n segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),\n max(segmentStartDistance, segmentEndDistance)\n );\n distance = max(distance, ${this.strokeDistanceFieldExpression_});\n gl_FragColor = color * smoothstep(0.5, -0.5, distance);\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getFillVertexShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n v_prop_hitColor = a_prop_hitColor;\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n vec2 pxOrigin = worldToPx(u_patternOrigin);\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(pxPos);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}}var M=i(1597),D=i(8711);const F="blur",O="gradient",k="radius",N=["#00f","#0ff","#0f0","#ff0","#f00"];class G extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(O,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:N),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?function(t){return t.get(i)}:i,this.setRenderOrder(null)}getBlur(){return this.get(F)}getGradient(){return this.get(O)}getRadius(){return this.get(k)}handleGradientChanged_(){this.gradient_=function(t){const e=(0,D.Y)(1,256),i=e.createLinearGradient(0,0,1,256),n=1/(t.length-1);for(let e=0,s=t.length;e{const e=this.weightFunction_(t);return void 0!==e?(0,M.qE)(e,0,1):1}}],uniforms:{u_size:()=>2*(this.get(k)+this.get(F)),u_blurSlope:()=>this.get(k)/Math.max(1,this.get(F))},hitDetectionEnabled:!0,vertexShader:t.getSymbolVertexShader(),fragmentShader:t.getSymbolFragmentShader(),postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}const z=G},8044:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(764);class s extends n.A{constructor(t){super(t=t||{})}}const r=s;var o=i(6769),a=i(6141),l=i(2703),h=i(9703),c=i(915),u=i(3407);class d extends o.A{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,r=this.getLayer().getSource(),o=t.viewHints;let h=t.extent;if(void 0!==e.extent&&(h=(0,c._N)(h,(0,u.SD)(e.extent,n.projection))),!o[l.A.ANIMATING]&&!o[l.A.INTERACTING]&&!(0,c.Im)(h))if(r){const t=n.projection,e=r.getImage(h,s,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===a.A.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,h.Bb)(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!(0,c.Ym)(s,n))return null;const r=this.image_.getExtent(),o=this.image_.getImage(),a=(0,c.RG)(r),l=Math.floor(o.width*((n[0]-r[0])/a));if(l<0||l>=o.width)return null;const u=(0,c.Oq)(r),d=Math.floor(o.height*((r[3]-n[1])/u));return d<0||d>=o.height?null:this.getImageData(o,l,d)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),s=i.getResolution(),[r,o]=Array.isArray(s)?s:[s,s],a=i.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],d=t.pixelRatio,g=t.viewState,_=g.center,f=g.resolution,p=d*r/(f*a),m=d*o/(f*a);this.prepareContainer(t,e);const x=this.context.canvas.width,v=this.context.canvas.height,y=this.getRenderContext(t);let E=!1,T=!0;if(l.extent){const e=(0,u.SD)(l.extent,g.projection);T=(0,c.HY)(e,t.extent),E=T&&!(0,c.ms)(e,t.extent),E&&this.clipUnrotated(y,t,e)}const A=i.getImage(),C=(0,h.Zz)(this.tempTransform,x/2,v/2,p,m,0,a*(n[0]-_[0])/r,a*(_[1]-n[3])/o);this.renderedResolution=o*d/a;const S=A.width*C[0],R=A.height*C[3];if(this.getLayer().getSource().getInterpolate()||(y.imageSmoothingEnabled=!1),this.preRender(y,t),T&&S>=.5&&R>=.5){const t=C[4],e=C[5],i=l.opacity;1!==i&&(y.save(),y.globalAlpha=i),y.drawImage(A,0,0,+A.width,+A.height,t,e,S,R),1!==i&&y.restore()}return this.postRender(this.context,t),E&&y.restore(),y.imageSmoothingEnabled=!0,this.container}}const g=d,_=class extends r{constructor(t){super(t)}createRenderer(){return new g(this)}getData(t){return super.getData(t)}}},764:(t,e,i)=>{"use strict";i.d(e,{A:()=>g,l:()=>d});var n=i(8620),s=i(6837),r=i(5332),o=i(3984),a=i(3568),l=i(588),h=i(915),c=i(9438);class u extends n.A{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(r.A.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(r.A.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,c.JH)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,c.KT)(t,s.A.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.Ay?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return d(n,e.viewState)&&(!s||(0,h.HY)(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof a.Ay?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(r.A.MAP,t)}getMapInternal(){return this.get(r.A.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,c.JH)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,c.JH)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,c.KT)(t,o.A.PRECOMPOSE,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.v)(!e.some((function(t){return t.layer===i.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}),this),this.mapRenderKey_=(0,c.KT)(this,s.A.CHANGE,t.render,t),this.changed())}setSource(t){this.set(r.A.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const g=u},5332:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},945:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(2808),s=i(4029);class r extends n.A{constructor(t){super(t)}createRenderer(){return new s.A(this)}}const o=r},5360:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},2757:(t,e,i)=>{"use strict";i.d(e,{A:()=>y});var n=i(2284),s=i(136),r=i(6769),o=i(7343),a=i(3984),l=i(2703),h=i(3663),c=i(915),u=i(8711),d=i(3608),g=i(6514),_=i(3407),f=i(4087),p=i(6933);class m extends r.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,c.S5)(),this.wrappedRenderedExtent_=(0,c.S5)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,a=s.resolution,h=s.projection,u=s.rotation,d=h.getExtent(),g=this.getLayer().getSource(),_=this.getLayer().getDeclutter(),f=e.pixelRatio,p=e.viewHints,m=!(p[l.A.ANIMATING]||p[l.A.INTERACTING]),x=this.context,v=Math.round((0,c.RG)(n)/a*f),y=Math.round((0,c.Oq)(n)/a*f),E=g.getWrapX()&&h.canWrapX(),T=E?(0,c.RG)(d):null,A=E?Math.ceil((n[2]-d[2])/T)+1:1;let C=E?Math.floor((n[0]-d[0])/T):0;do{let n=this.getRenderTransform(r,a,0,f,v,y,C*T);e.declutter&&(n=n.slice(0)),t.execute(x,[x.canvas.width,x.canvas.height],n,u,m,void 0===i?o.y2:i?o.$i:o.x$,i?_&&e.declutter[_]:void 0)}while(++C{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*h.tF,u=t[1]*h.tF;a.push(this.getRenderTransform(e,i,n,h.tF,l,u,0).slice());const g=o.getSource(),f=s.getExtent();if(g.getWrapX()&&s.canWrapX()&&!(0,c.ms)(f,r)){let t=r[0];const s=(0,c.RG)(f);let o,d=0;for(;tf[2];)++d,o=s*d,a.push(this.getRenderTransform(e,i,n,h.tF,l,u,o).slice()),t-=s}const p=(0,_.Tf)();this.hitDetectionImageData_=(0,h._7)(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n,(0,d.j)(i,this.renderedPixelRatio_),p?s:null)}e((0,h.F8)(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const r=(0,f.v6)(t),o=l[r];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,r,o,i,h,d&&e.declutter[d]?e.declutter[d].all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[l.A.ANIMATING],r=t.viewHints[l.A.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&n||!h&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const u=t.extent,f=t.viewState,m=f.projection,x=f.resolution,v=t.pixelRatio,y=e.getRevision(),E=e.getRenderBuffer();let T=e.getRenderOrder();void 0===T&&(T=d.Eo);const A=f.center.slice(),C=(0,c.r)(u,E*x),S=C.slice(),R=[C.slice()],w=m.getExtent();if(i.getWrapX()&&m.canWrapX()&&!(0,c.ms)(w,t.extent)){const t=(0,c.RG)(w),e=Math.max((0,c.RG)(C)/2,t);C[0]=w[0]-e,C[2]=w[2]+e,(0,p.Li)(A,m);const i=(0,c.Li)(R[0],m);i[0]w[0]&&i[2]>w[2]&&R.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==x&&this.renderedRevision_==y&&this.renderedRenderOrder_==T&&this.renderedFrameDeclutter_===!!t.declutter&&(0,c.ms)(this.wrappedRenderedExtent_,C))return(0,g.aI)(this.renderedExtent_,S)||(this.hitDetectionImageData_=null,this.renderedExtent_=S),this.renderedCenter_=A,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new s.A((0,d.gY)(x,v),C,x,v),I=(0,_.Tf)();let L;if(I){for(let t=0,e=R.length;t{let n;const s=t.getStyleFunction()||e.getStyleFunction();if(s&&(n=s(t,x)),n){const e=this.renderFeature(t,P,n,b,L,this.getLayer().getDeclutter(),i);M=M&&!e}},F=(0,_.JR)(C,m),O=i.getFeaturesInExtent(F);T&&O.sort(T);for(let t=0,e=O.length;t{"use strict";i.d(e,{A:()=>S});var n=i(2284),s=i(136),r=i(7343),o=i(4029),a=i(1078),l=i(2703),h=i(808),c=i(3663),u=i(9703),d=i(6514),g=i(915),_=i(3608),f=i(4087),p=i(4401),m=i(6933);const x={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},v={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class y extends o.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=(0,u.vt)(),this.tileClipContexts_=null}prepareTile(t,e,i){let n;const s=t.getState();return s!==a.A.LOADED&&s!==a.A.ERROR||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState,o=r.resolution,a=r.projection,h=this.getLayer(),c=h.getSource().getTile(t,e,i,s,a),u=n.viewHints,d=!(u[l.A.ANIMATING]||u[l.A.INTERACTING]);return!d&&c.wantedResolution||(c.wantedResolution=o),this.prepareTile(c,s,a)&&(d||Date.now()-n.time<8)&&"vector"!==h.getRenderMode()&&this.renderTileImage_(c,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?(0,f.v6)(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),o=n.getRevision(),l=n.getRenderOrder()||null,h=t.wantedResolution,c=t.getReplayState(n);if(!c.dirty&&c.renderedResolution===h&&c.renderedRevision==o&&c.renderedRenderOrder==l)return;const u=n.getSource(),d=!!n.getDeclutter(),p=u.getTileGrid(),m=u.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),x=u.getSourceTiles(e,i,t),v=(0,f.v6)(n);delete t.hitDetectionImageData[v],t.executorGroups[v]=[],c.dirty=!1;for(let i=0,o=x.length;i{const s=x?e.declutter[x].all().map((t=>t.value)):null;for(let e=0,a=n.length;e{const n=this.getLayer(),s=(0,f.v6)(n),r=n.getSource(),o=this.renderedProjection,l=o.getExtent(),h=this.renderedResolution,d=r.getTileGridForProjection(o),_=(0,u.Bb)(this.renderedPixelToCoordinateTransform_,t.slice()),x=d.getTileCoordForCoordAndResolution(_,h);let v;for(let t=0,e=this.renderedTiles.length;t0)return void e([]);const y=d.getTileCoordExtent(v.wrappedTileCoord),E=(0,g.Py)(y),T=[(_[0]-E[0])/h,(E[1]-_[1])/h],A=v.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let C=v.hitDetectionImageData[s];if(!C){const t=(0,p.xq)(d.getTileSize(d.getZForResolution(h,r.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(d.getTileCoordCenter(v.wrappedTileCoord),h,0,c.tF,t[0]*c.tF,t[1]*c.tF,0)];C=(0,c._7)(t,i,A,n.getStyleFunction(),d.getTileCoordExtent(v.wrappedTileCoord),v.getReplayState(n).renderedResolution,e),v.hitDetectionImageData[s]=C}e((0,c.F8)(T,A,C))}))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t,e){const i=this.context,n=i.globalAlpha;i.globalAlpha=e.opacity;const s=t.viewHints,o=!(s[l.A.ANIMATING]||s[l.A.INTERACTING]),a=this.renderedTiles;for(let e=0,i=a.length;e=0;--e)n[e].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(i,t),t.viewState.rotation,o,r.$i,s?t.declutter[s]:void 0)}i.globalAlpha=n}renderDeferredInternal(t){const e=this.renderedTiles.reduce(((t,e,i)=>(e.executorGroups[(0,f.v6)(this.getLayer())].forEach((e=>t.push({executorGroup:e,index:i}))),t)),[]),i=e.map((({executorGroup:t})=>t.getDeferredZIndexContexts())),n={};for(let t=0,i=e.length;t{i.forEach(((i,n)=>{i[t]&&(i[t].forEach((t=>{const{executorGroup:i,index:s}=e[n],r=i.getRenderedContext(),o=r.globalAlpha;r.globalAlpha=this.renderedOpacity_;const a=this.tileClipContexts_[s];a&&a.draw(r),t.draw(r),a&&r.restore(),r.globalAlpha=o,t.clear()})),i[t].length=0)}))}))}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,s=n.center,r=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),d=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),_=c.getTileCoordExtent(d,this.tmpExtent)[0]-g[0];return(0,u.lw)((0,u.hs)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(s,r,o,i,l,h,_))}postRender(t,e){const i=e.viewHints,n=!(i[l.A.ANIMATING]||i[l.A.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation,this.renderedOpacity_=e.layerStatesArray[e.layerIndex].opacity;const s=this.getLayer(),o=s.getRenderMode(),a=t.globalAlpha;t.globalAlpha=this.renderedOpacity_;const c=s.getDeclutter(),u=c?v[o].filter((t=>!r.$i.includes(t))):v[o],d=e.viewState,_=d.rotation,p=s.getSource(),m=p.getTileGridForProjection(d.projection).getZForResolution(d.resolution,p.zDirection),x=this.renderedTiles,y=[],E=[],T=[];let A=!0;for(let i=x.length-1;i>=0;--i){const r=x[i];A=A&&!r.getReplayState(s).dirty;const o=r.executorGroups[(0,f.v6)(s)].filter((t=>t.hasExecutors(u)));if(0===o.length)continue;const a=this.getTileRenderTransform(r,e),l=r.tileCoord[0];let d=!1;const p=o[0].getClipCoords(a);let v,C=t;if(p){v=new h.A,C=v.getContext();for(let t=0,e=y.length;t{"use strict";i.d(e,{A:()=>u});var n=i(2808),s=i(5332),r=i(2323),o=i(9825),a=i(5516);function l(t,e,i){const n=(0,o.SR)();return n.style=t.style,(0,a.nR)(e,i,n,t)}function h(t,e){const i=`\n attribute vec2 ${r.eS.TEXTURE_COORD};\n uniform mat4 ${r.gF.TILE_TRANSFORM};\n uniform float ${r.gF.TEXTURE_PIXEL_WIDTH};\n uniform float ${r.gF.TEXTURE_PIXEL_HEIGHT};\n uniform float ${r.gF.TEXTURE_RESOLUTION};\n uniform float ${r.gF.TEXTURE_ORIGIN_X};\n uniform float ${r.gF.TEXTURE_ORIGIN_Y};\n uniform float ${r.gF.DEPTH};\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ${r.eS.TEXTURE_COORD};\n v_mapCoord = vec2(\n ${r.gF.TEXTURE_ORIGIN_X} + ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n ${r.gF.TEXTURE_ORIGIN_Y} - ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n );\n gl_Position = ${r.gF.TILE_TRANSFORM} * vec4(${r.eS.TEXTURE_COORD}, ${r.gF.DEPTH}, 1.0);\n }\n `,n={...(0,a.z0)(),inFragmentShader:!0,bandCount:e,style:t},s=[];if(void 0!==t.color){const e=l(n,t.color,o.mE);s.push(`color = ${e};`)}if(void 0!==t.contrast){const e=l(n,t.contrast,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=l(n,t.exposure,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=l(n,t.saturation,o.wl);s.push(`\n float saturation = ${e} + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n `)}if(void 0!==t.gamma){const e=l(n,t.gamma,o.wl);s.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=l(n,t.brightness,o.wl);s.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const h={},c=Object.keys(n.variables).length;if(c>1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e ${r.gF.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${r.gF.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${r.gF.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${s.join("\n")}\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${r.gF.TRANSITION_ALPHA};\n }`,uniforms:h,paletteTextures:n.paletteTextures}}class c extends n.A{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style;const i=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=i,this.styleVariables_=this.style_.variables||{},this.addChangeListener(s.A.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=h(this.style_,this.getSourceBandCount_());return new r.Ay(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let s=0,r=e.length;s{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}s=s&&"ready"==i}const r=this.renderSources(t,n);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=i.resolution,r;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return r}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=h(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}c.prototype.dispose;const u=c},1597:(t,e,i)=>{"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function s(t,e,i,n,s,o){const a=s-i,l=o-n;if(0!==a||0!==l){const r=((t-i)*a+(e-n)*l)/(a*a+l*l);r>1?(i=s,n=o):r>0&&(i+=a*r,n+=l*r)}return r(t,e,i,n)}function r(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function o(t){const e=t.length;for(let i=0;is&&(s=e,n=r)}if(0===s)return null;const r=t[n];t[n]=t[i],t[i]=r;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}function a(t){return 180*t/Math.PI}function l(t){return t*Math.PI/180}function h(t,e){const i=t%e;return i*e<0?i+e:i}function c(t,e,i){return t+i*(e-t)}function u(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function d(t,e){return Math.round(u(t,e))}function g(t,e){return Math.floor(u(t,e))}function _(t,e){return Math.ceil(u(t,e))}i.d(e,{Cc:()=>c,KU:()=>o,LI:()=>d,Mg:()=>u,Q1:()=>s,RI:()=>g,eh:()=>l,hG:()=>r,mk:()=>_,qE:()=>n,xP:()=>h,xW:()=>a})},3530:(t,e,i)=>{"use strict";function n(t){for(const e in t)delete t[e]}function s(t){let e;for(e in t)return!1;return!e}i.d(e,{I:()=>n,p:()=>s})},613:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3407:(t,e,i)=>{"use strict";i.d(e,{Ig:()=>f.I,MF:()=>n.A,hB:()=>D,O3:()=>L,bF:()=>w,Av:()=>P,wU:()=>H,RJ:()=>C,tI:()=>k,Rb:()=>F,Ad:()=>W,SD:()=>Y,Jt:()=>b,hO:()=>I,RG:()=>G,FO:()=>N,Tf:()=>U,R6:()=>R,WP:()=>O,te:()=>X,JR:()=>Z,vN:()=>V,pd:()=>z,DI:()=>j});var n=i(5286);const s=6378137,r=Math.PI*s,o=[-r,-r,r,r],a=[-180,-85,180,85],l=s*Math.log(Math.tan(Math.PI/2));class h extends n.A{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/s)}})}}const c=[new h("EPSG:3857"),new h("EPSG:102100"),new h("EPSG:102113"),new h("EPSG:900913"),new h("http://www.opengis.net/def/crs/EPSG/0/3857"),new h("http://www.opengis.net/gml/srs/epsg.xml#3857")];const u=[-180,-90,180,90],d=6378137*Math.PI/180;class g extends n.A{constructor(t,e){super({code:t,units:"degrees",extent:u,axisOrientation:e,global:!0,metersPerUnit:d,worldExtent:u})}}const _=[new g("CRS:84"),new g("EPSG:4326","neu"),new g("urn:ogc:def:crs:OGC:1.3:CRS84"),new g("urn:ogc:def:crs:OGC:2:84"),new g("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new g("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new g("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var f=i(8100);let p={};var m=i(3158),x=i(915),v=i(1597),y=i(6933),E=i(2490),T=i(4422);let A=!0;function C(t){A=!(void 0===t||t)}function S(t,e){if(void 0!==e)for(let i=0,n=t.length;i=o?e[r+t]:s[t]}return i}}function D(t,e,i,n){const s=b(t),r=b(e);(0,m.WQ)(s,r,M(i)),(0,m.WQ)(r,s,M(n))}function F(t,e){return C(),z(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function O(t,e){const i=z(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=(0,v.xP)(n+180,360)-180),i}function k(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||N(t,e)===S)&&i}function N(t,e){const i=t.getCode(),n=e.getCode();let s=(0,m.Jt)(i,n);return s||(s=R),s}function G(t,e){return N(b(t),b(e))}function z(t,e,i){return G(e,i)(t,void 0,t.length)}function j(t,e,i,n){const s=G(e,i);return(0,x.NW)(t,s,void 0,n)}let B=null;function U(){return B}function X(t,e){return B?z(t,e,B):t}function W(t,e){return B?z(t,B,e):(A&&!(0,y.aI)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(A=!1,(0,T.R8)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Z(t,e){return B?j(t,e,B):t}function Y(t,e){return B?j(t,B,e):t}function V(t,e){if(!B)return t;const i=b(e).getMetersPerUnit(),n=B.getMetersPerUnit();return i&&n?t*i/n:t}function H(t,e,i){return function(n){let s,r;if(t.canWrapX()){const e=t.getExtent(),o=(0,x.RG)(e);n=n.slice(0),r=(0,y.U$)(n,t,o),r&&(n[0]=n[0]-r*o),n[0]=(0,v.qE)(n[0],e[0],e[2]),n[1]=(0,v.qE)(n[1],e[1],e[3]),s=i(n)}else s=i(n);return r&&e.canWrapX()&&(s[0]+=r*(0,x.RG)(e.getExtent())),s}}var q,K,$;L(c),L(_),q=c,K=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;ol?i=l:i<-l&&(i=-l),e[o+1]=i}return e},$=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o{"use strict";i.d(e,{A:()=>s});var n=i(8100);const s=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.I[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}},8100:(t,e,i)=>{"use strict";i.d(e,{I:()=>r,q:()=>s});const n={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function s(t){return n[t]}const r={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},3158:(t,e,i)=>{"use strict";i.d(e,{Jt:()=>r,WQ:()=>s});let n={};function s(t,e,i){const s=t.getCode(),r=e.getCode();s in n||(n[s]={}),n[s][r]=i}function r(t,e){let i;return t in n&&e in n[t]&&(i=n[t][e]),i}},7331:(t,e,i)=>{"use strict";i.d(e,{r2:()=>a});var n=i(2236),s=i(9703),r=i(3608),o=i(3407);function a(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=t.inversePixelTransform[0],i=t.inversePixelTransform[1],a=Math.sqrt(e*e+i*i),l=t.frameState,h=(0,s.lw)(t.inversePixelTransform.slice(),l.coordinateToPixelTransform),c=(0,r.j)(l.viewState.resolution,a);let u;const d=(0,o.Tf)();return d&&(u=(0,o.FO)(d,l.viewState.projection)),new n.A(t.context,a,l.extent,h,l.viewState.rotation,c,u)}},9960:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const r=s},3984:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},4778:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>p});var n=i(9703),s=i(915),r=i(3671),o=i(6514),a=i(2616),l=i(3407),h=i(3402),c=i(9969),u=i(4049),d=i(4238),g=i(7622);const _=(0,n.vt)();class f{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,s.dP)(this.flatCoordinates_):(0,s.Vy)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,s.q1)(this.getExtent());this.flatInteriorPoints_=(0,a.J)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,h.yJ)(this.flatCoordinates_,this.ends_),e=(0,u.C)(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=(0,a.p)(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,c.SH)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=(0,r.P4)(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=(0,r.AL)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=(0,r.Hg)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n)}return n&&(this.simplifiedGeometry_=new f(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}f.prototype.getFlatCoordinates=f.prototype.getOrientedFlatCoordinates;const p=f},2826:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n=class{drawCustom(t,e,i,n,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}},8774:(t,e,i)=>{"use strict";i.d(e,{Jw:()=>L,M8:()=>m,MY:()=>p,NT:()=>f,Oq:()=>u,TA:()=>b,Tq:()=>x,ZV:()=>l,_K:()=>g,_m:()=>c,aq:()=>v,eL:()=>_,fZ:()=>C,jT:()=>I,qY:()=>h,vk:()=>d,yY:()=>y});var n=i(4120),s=i(7771),r=i(3530),o=i(8711),a=i(5176);const l="10px sans-serif",h="#000",c="round",u=[],d=0,g="round",_=10,f="#000",p="center",m="middle",x=[0,0,0,0],v=1,y=new n.A;let E,T=null;const A={},C=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,o;function l(s,r,a){let l=!0;for(let h=0;hMath.max(e,w(t,i))),0);return i[e]=n,n}function I(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=e[h+1]||t.font,g=w(d,u);i.push(g),o+=g;const _=S(d);n.push(_),l=Math.max(l,_)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}function L(t,e,i,n,s,r,o,a,l,h,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t{"use strict";i.d(e,{A:()=>d});var n=i(6429),s=i(1580),r=i(2826),o=i(7295),a=i(915),l=i(8774),h=i(6514),c=i(6361);class u extends r.A{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,l=t.length;ol&&(this.instructions.push([n.Ay.CUSTOM,l,u,t,i,c.n2,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,c.n2,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),u=this.coordinates.length,this.instructions.push([n.Ay.CUSTOM,l,u,t,i,void 0,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,void 0,r])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let s,r,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[n.Ay.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[n.Ay.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!(0,h.aI)(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[n.Ay.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.o8)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,a.r)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const d=u},136:(t,e,i)=>{"use strict";i.d(e,{A:()=>p});var n=i(8130),s=i(6429),r=i(915);class o extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!(0,r.Ym)(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,l=this.appendFlatPointCoordinates(n,o);this.instructions.push([s.Ay.DRAW_IMAGE,a,l,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,a,l,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=[];for(let e=0,i=n.length;e{"use strict";i.d(e,{y2:()=>R,$i:()=>w,x$:()=>b,Ay:()=>L});var n=i(6429),s=i(808),r=i(3624),o=i(9703),a=i(915),l=i(8774),h=i(1597),c=i(7622);function u(t,e,i,n,s,r,o,a,l,u,d,g){let _=t[e],f=t[e+1],p=0,m=0,x=0,v=0;function y(){p=_,m=f,_=t[e+=n],f=t[e+1],v+=x,x=Math.sqrt((_-p)*(_-p)+(f-m)*(f-m))}do{y()}while(et[2]}else I=T>w;const L=Math.PI,P=[],M=C+n===e;let D;if(x=0,v=S,_=t[e=C],f=t[e+1],M){y(),D=Math.atan2(f-m,_-p),I&&(D+=D>0?-L:L);const t=(w+T)/2,e=(b+A)/2;return P[0]=[t,e,(R-r)/2,D,s],P}for(let t=0,c=(s=s.replace(/\n/g," ")).length;t0?-L:L),void 0!==D){let t=g-D;if(t+=t>L?-2*L:t<-L?2*L:0,Math.abs(t)>o)return null}D=g;const T=t;let A=0;for(;t0&&t.push("\n",""),t.push(e,""),t}const A=class{constructor(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,o.vt)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new s.A:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,a=i?this.fillStates[i]:null,h=this.textStates[e],c=this.pixelRatio,u=[h.scale[0]*c,h.scale[1]*c],d=Array.isArray(t),g=h.justify?r.E[h.justify]:E(Array.isArray(t)?t[0]:t,h.textAlign||l.MY),_=n&&o.lineWidth?o.lineWidth:0,f=d?t:t.split("\n").reduce(T,[]),{width:p,height:m,widths:x,heights:v,lineWidths:y}=(0,l.jT)(h,f),A=p+_,C=[],S=(A+2)*u[0],R=(m+_)*u[1],w={width:S<0?Math.floor(S):Math.ceil(S),height:R<0?Math.floor(R):Math.ceil(R),contextInstructions:C};1==u[0]&&1==u[1]||C.push("scale",u),n&&(C.push("strokeStyle",o.strokeStyle),C.push("lineWidth",_),C.push("lineCap",o.lineCap),C.push("lineJoin",o.lineJoin),C.push("miterLimit",o.miterLimit),C.push("setLineDash",[o.lineDash]),C.push("lineDashOffset",o.lineDashOffset)),i&&C.push("fillStyle",a.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");const b=.5-g;let I=g*A+b*_;const L=[],P=[];let M,D=0,F=0,O=0,k=0;for(let t=0,e=f.length;tt?t-c:s,R=r+u>e?e-u:r,w=y[3]+S*g[0]+y[1],b=y[0]+R*g[1]+y[2],I=A-y[3],L=C-y[0];let P;return(E||0!==d)&&(f[0]=I,x[0]=I,f[1]=L,p[1]=L,p[0]=I+w,m[0]=p[0],m[1]=L+b,x[1]=m[1]),0!==d?(P=(0,o.Zz)((0,o.vt)(),i,n,1,1,d,-i,-n),(0,o.Bb)(P,f),(0,o.Bb)(P,p),(0,o.Bb)(P,m),(0,o.Bb)(P,x),(0,a.N)(Math.min(f[0],p[0],m[0],x[0]),Math.min(f[1],p[1],m[1],x[1]),Math.max(f[0],p[0],m[0],x[0]),Math.max(f[1],p[1],m[1],x[1]),_)):(0,a.N)(Math.min(I,I+w),Math.min(L,L+b),Math.max(I,I+w),Math.max(L,L+b),_),v&&(A=Math.round(A),C=Math.round(C)),{drawImageX:A,drawImageY:C,drawImageW:S,drawImageH:R,originX:c,originY:u,declutterBox:{minX:_[0],minY:_[1],maxX:_[2],maxY:_[3],value:T},canvasTransform:P,scale:g}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,c=o?o[2]*n.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(a&&this.replayTextBackground_(t,f,p,m,x,r,o),(0,l.Jw)(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=(0,o.Bb)(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),a=this.strokeStates[i],h=this.pixelRatio,c=E(Array.isArray(t)?t[0]:t,s.textAlign||l.MY),u=r.E[s.textBaseline||l.M8],d=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:c*(o.width/h-2*s.scale[0])+2*(.5-c)*d,anchorY:u*o.height/h+2*(.5-u)*d}}execute_(t,e,i,s,r,h,_,f){const p=this.zIndexContext_;let m;this.pixelCoordinates_&&(0,d.aI)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,c.Rc)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,o.k3)(this.renderedTransform_,i));let x=0;const y=s.length;let T,A,C,S,R,w,b,I,L,P,M,D,F,O=0,k=0,N=0,G=null,z=null;const j=this.coordinateCache_,B=this.viewRotation_,U=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,X={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:B},W=this.instructions!=s||this.overlaps?0:200;let Z,Y,V,H;for(;xW&&(this.fill_(t),k=0),N>W&&(t.stroke(),N=0),k||N||(t.beginPath(),R=NaN,w=NaN),++x;break;case n.Ay.CIRCLE:O=i[1];const s=m[O],o=m[O+1],c=m[O+2]-s,d=m[O+3]-o,y=Math.sqrt(c*c+d*d);t.moveTo(s+y,o),t.arc(s,o,y,0,2*Math.PI,!0),++x;break;case n.Ay.CLOSE_PATH:t.closePath(),++x;break;case n.Ay.CUSTOM:O=i[1],T=i[2];const q=i[3],K=i[4],$=i[5];X.geometry=q,X.feature=Z,x in j||(j[x]=[]);const J=j[x];$?$(m,O,T,2,J):(J[0]=m[O],J[1]=m[O+1],J.length=2),p&&(p.zIndex=i[6]),K(J,X),++x;break;case n.Ay.DRAW_IMAGE:O=i[1],T=i[2],L=i[3],A=i[4],C=i[5];let Q=i[6];const tt=i[7],et=i[8],it=i[9],nt=i[10];let st=i[11];const rt=i[12];let ot=i[13];S=i[14]||"declutter";const at=i[15];if(!L&&i.length>=20){P=i[19],M=i[20],D=i[21],F=i[22];const t=this.drawLabelWithPointPlacement_(P,M,D,F);L=t.label,i[3]=L;const e=i[23];A=(t.anchorX-e)*this.pixelRatio,i[4]=A;const n=i[24];C=(t.anchorY-n)*this.pixelRatio,i[5]=C,Q=L.height,i[6]=Q,ot=L.width,i[13]=ot}let lt,ht,ct,ut;i.length>25&&(lt=i[25]),i.length>17?(ht=i[16],ct=i[17],ut=i[18]):(ht=l.Tq,ct=!1,ut=!1),nt&&U?st+=B:nt||U||(st-=B);let dt=0;for(;O!w.includes(t))),I={},L=class{constructor(t,e,i,n,s,r,a){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,o.vt)(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,a)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const s=t[i];for(const t in s){const i=s[t];n[t]=new A(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;ei)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+s)*e+(t+r))+3),s>0&&a.push(4*((t-s)*e+(t+r))+3),r>0&&(a.push(4*((t+s)*e+(t-r))+3),s>0&&a.push(4*((t-s)*e+(t-r))+3))}const s=[];for(let t=0,e=n.length;t0){if(!r||"none"===i||"Image"!==f&&"Text"!==f||r.includes(t)){const i=(_[a]-3)/4,r=n-i%l,o=n-(i/l|0),h=s(t,e,r*r+o*o);if(h)return h}u.clearRect(0,0,l,l);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);let x,v,y,E,T;for(m.sort(d.V_),x=m.length-1;x>=0;--x){const t=m[x].toString();for(y=this.executorsByZIndex_[t],v=R.length-1;v>=0;--v)if(f=R[v],E=y[f],void 0!==E&&(T=E.executeHitDetection(u,h,i,p,g),T))return T}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return(0,c.Rc)(o,0,8,2,t,o),o}isEmpty(){return(0,S.p)(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(d.V_),r=r||R;const l=R.length;let h,c,u,g,_;for(o&&a.reverse(),h=0,c=a.length;hd.execute(t,e,i,n,s,o))):d.execute(g,e,i,n,s,o),_&&g.restore(),r){r.offset();const t=a[h]*l+u;this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(r)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(d.V_);for(let i=0,n=e.length;i{t.draw(this.renderedContext_),t.clear()})),t[e[i]].length=0}}},2236:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(2826),s=i(7295),r=i(9703),o=i(8774),a=i(6514),l=i(915),h=i(1597),c=i(7622),u=i(2096);class d extends n.A{constructor(t,e,i,n,s,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,h.Mg)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,r.vt)()}drawImages_(t,e,i,n){if(!this.image_)return;const s=(0,c.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;tt*this.pixelRatio_)),lineDashOffset:(r||o.vk)*this.pixelRatio_,lineJoin:void 0!==a?a:o._K,lineWidth:(void 0!==l?l:o.aq)*this.pixelRatio_,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,s.F)(t||o.qY)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),a=i.getLineJoin(),l=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:o._m,lineDash:n||o.Oq,lineDashOffset:r||o.vk,lineJoin:void 0!==a?a:o._K,lineWidth:void 0!==l?l:o.aq,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),l=t.getRotateWithView(),h=t.getRotation(),c=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),g=t.getTextBaseline();this.textState_={font:void 0!==n?n:o.ZV,textAlign:void 0!==d?d:o.MY,textBaseline:void 0!==g?g:o.M8},this.text_=void 0!==u?Array.isArray(u)?u.reduce(((t,e,i)=>t+(i%2?" ":e)),""):u:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==a?this.pixelRatio_*a:0,this.textRotateWithView_=void 0!==l&&l,this.textRotation_=void 0!==h?h:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}else this.text_=""}}const g=d},6429:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>l,I5:()=>s,VD:()=>r,kx:()=>a,th:()=>o});const n={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},s=[n.FILL],r=[n.STROKE],o=[n.BEGIN_PATH],a=[n.CLOSE_PATH],l=n},3624:(t,e,i)=>{"use strict";i.d(e,{E:()=>d,A:()=>_});var n=i(8130),s=i(6429),r=i(7295),o=i(8774),a=i(4087),l=i(915),h=i(1597);function c(t,e,i,n,s){const r=[];let o=i,a=0,l=e.slice(i,2);for(;a=t){const e=(t-a+d)/d,g=(0,h.Cc)(i,c,e),_=(0,h.Cc)(n,u,e);l.push(g,_),r.push(l),l=[g,_],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function u(t,e,i,n,s){let r,o,a,l,h,c,u,d,g,_,f=i,p=i,m=0,x=0,v=i;for(o=i;ot&&(x>m&&(m=x,f=v,p=o),x=0,v=o-s)),a=l,u=g,d=_),h=i,c=n}return x+=l,x>m?[v,o]:[f,p]}const d={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class g extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[o.qY]={fillStyle:o.qY},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(""===this.text_||!a||!n&&!r)return;const h=this.coordinates;let d=h.length;const g=t.getType();let _=null,f=t.getStride();if("line"!==a.placement||"LineString"!=g&&"MultiLineString"!=g&&"Polygon"!=g&&"MultiPolygon"!=g){let n=a.overflow?null:[];switch(g){case"Point":case"MultiPoint":_=t.getFlatCoordinates();break;case"LineString":_=t.getFlatMidpoint();break;case"Circle":_=t.getCenter();break;case"MultiLineString":_=t.getFlatMidpoints(),f=2;break;case"Polygon":_=t.getFlatInteriorPoint(),a.overflow||n.push(_[2]/this.resolution),f=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();_=[];for(let t=0,i=e.length;t{const n=h[2*(t+i)]===_[i*f]&&h[2*(t+i)+1]===_[i*f+1];return n||--t,n}))}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let l=a.padding;if(l!=o.Tq&&(a.scale[0]<0||a.scale[1]<0)){let t=a.padding[0],e=a.padding[1],i=a.padding[2],n=a.padding[3];a.scale[0]<0&&(e=-e,n=-n),a.scale[1]<0&&(t=-t,i=-i),l=[t,e,i,n]}const c=this.pixelRatio;this.instructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,l==o.Tq?o.Tq:l.map((function(t){return t*c})),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const u=1/c,p=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=o.qY,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[u,u],NaN,this.declutterMode_,this.declutterImageWithText_,l,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?o.qY:this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),a.backgroundFill&&(this.state.fillStyle=p,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,l.HY)(this.maxExtent,t.getExtent()))return;let n;if(_=t.getFlatCoordinates(),"LineString"==g)n=[_.length];else if("MultiLineString"==g)n=t.getEnds();else if("Polygon"==g)n=t.getEnds().slice(0,1);else if("MultiPolygon"==g){const e=t.getEndss();n=[];for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>s});var n=i(8711);const s=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy((0,n.lr)(),{get:(t,e)=>{if("function"==typeof(0,n.lr)()[e])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i{"use strict";i.d(e,{F8:()=>d,_7:()=>u,tF:()=>c});var n=i(2236),s=i(9700),r=i(6514),o=i(1597),a=i(8711),l=i(3407),h=i(915);const c=.5;function u(t,e,i,o,u,d,g,_,f){const p=f?(0,l.JR)(u,f):u,m=t[0]*c,x=t[1]*c,v=(0,a.Y)(m,x);v.imageSmoothingEnabled=!1;const y=v.canvas,E=new n.A(v,c,u,null,g,_,f?(0,l.FO)((0,l.Tf)(),f):null),T=i.length,A=Math.floor(16777215/T),C={};for(let t=1;t<=T;++t){const e=i[t-1],n=e.getStyleFunction()||o;if(!n)continue;let r=n(e,d);if(!r)continue;Array.isArray(r)||(r=[r]);const l=(t*A).toString(16).padStart(7,"#00000");for(let t=0,i=r.length;t{"use strict";i.d(e,{A:()=>l});var n=i(6837),s=i(6141),r=i(1854),o=i(4087);class a extends r.A{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t}getFeatures(t){return(0,o.b0)()}getData(t){return null}prepareFrame(t){return(0,o.b0)()}renderFrame(t,e){return(0,o.b0)()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>{const r=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,r)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==s.A.LOADED&&e.getState()!==s.A.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=s.A.LOADED&&e!=s.A.ERROR&&t.addEventListener(n.A.CHANGE,this.boundHandleImageChange_),e==s.A.IDLE&&(t.load(),e=t.getState()),e==s.A.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const l=a},6769:(t,e,i)=>{"use strict";i.d(e,{A:()=>f,B:()=>d});var n=i(5986),s=i(9960),r=i(3984),o=i(808),a=i(9703),l=i(3730),h=i(8711),c=i(6514),u=i(915);const d=[];let g=null;class _ extends n.A{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,a.vt)(),this.pixelTransform=(0,a.vt)(),this.inversePixelTransform=(0,a.vt)(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;g||(g=(0,h.Y)(1,1,void 0,{willReadFrequently:!0})),g.clearRect(0,0,1,1);try{g.drawImage(t,e,i,1,1,0,0,1,1),n=g.getImageData(0,0,1,1).data}catch(t){return g=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,c.aI)((0,l._j)(t.style.backgroundColor),(0,l._j)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.getContext("2d"))}if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=(0,h.Y)();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,u.Py)(i),s=(0,u.WU)(i),r=(0,u.k_)(i),o=(0,u.R)(i);(0,a.Bb)(e.coordinateToPixelTransform,n),(0,a.Bb)(e.coordinateToPixelTransform,s),(0,a.Bb)(e.coordinateToPixelTransform,r),(0,a.Bb)(e.coordinateToPixelTransform,o);const l=this.inversePixelTransform;(0,a.Bb)(l,n),(0,a.Bb)(l,s),(0,a.Bb)(l,r),(0,a.Bb)(l,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,s=t.viewState.rotation,r=t.pixelRatio,o=Math.round((0,u.RG)(i)/n*r),l=Math.round((0,u.Oq)(i)/n*r);(0,a.Zz)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/r,1/r,s,-o/2,-l/2),(0,a.T9)(this.inversePixelTransform,this.pixelTransform);const h=(0,a.dI)(this.pixelTransform);if(this.useContainer(e,h,this.getBackground(t)),!this.containerReused){const t=this.context.canvas;t.width!=o||t.height!=l?(t.width=o,t.height=l):this.context.clearRect(0,0,o,l),h!==t.style.transform&&(t.style.transform=h)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new s.A(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(r.A.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(r.A.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new o.A),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(r.A.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(r.A.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const l=s/2,h=r/2,c=n/e,u=-c,d=-t[0]+o,g=-t[1];return(0,a.Zz)(this.tempTransform,l,h,c,u,-i,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const f=_},4029:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(6769),s=i(190),r=i(7404),o=i(1110),a=i(1078),l=i(9703),h=i(6514),c=i(915),u=i(3407),d=i(4087),g=i(4401);class _ extends n.A{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,c.S5)(),this.tmpTileRange_=new o.A(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==a.A.LOADED||i==a.A.EMPTY||i==a.A.ERROR&&!n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,i,s,r);return l.getState()==a.A.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,l.Bb)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,c.Ym)(o,n))return null;const h=e.pixelRatio,u=e.viewState.projection,d=e.viewState,_=i.getRenderSource(),f=_.getTileGridForProjection(d.projection),p=_.getTilePixelRatio(e.pixelRatio);for(let t=f.getZForResolution(d.resolution);t>=f.getMinZoom();--t){const e=f.getTileCoordForCoordAndZ(n,t),i=_.getTile(t,e[1],e[2],h,u);if(!(i instanceof s.A||i instanceof r.A)||i instanceof r.A&&i.getState()===a.A.EMPTY)return null;if(i.getState()!==a.A.LOADED)continue;const o=f.getOrigin(t),l=(0,g.xq)(f.getTileSize(t)),c=f.getResolution(t),m=Math.floor(p*((n[0]-o[0])/c-e[1]*l[0])),x=Math.floor(p*((o[1]-n[1])/c-e[2]*l[1])),v=Math.round(p*_.getGutterForProjection(d.projection));return this.getImageData(i.getImage(),m+v,x+v)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,s=n.projection,r=n.resolution,o=n.center,g=n.rotation,_=t.pixelRatio,f=this.getLayer(),p=f.getSource(),m=p.getRevision(),x=p.getTileGridForProjection(s),v=x.getZForResolution(r,p.zDirection),y=x.getResolution(v);let E=t.extent;const T=t.viewState.resolution,A=p.getTilePixelRatio(_);this.prepareContainer(t,e);const C=this.context.canvas.width,S=this.context.canvas.height,R=i.extent&&(0,u.SD)(i.extent,s);R&&(E=(0,c._N)(E,(0,u.SD)(i.extent,s)));const w=y*C/2/A,b=y*S/2/A,I=[o[0]-w,o[1]-b,o[0]+w,o[1]+b],L=x.getTileRangeForExtentAndZ(E,v),P={};P[v]={};const M=this.createLoadedTileFinder(p,s,P),D=this.tmpExtent,F=this.tmpTileRange_;this.newTiles_=!1;const O=g?(0,c.Yw)(n.center,T,g,t.size):void 0;for(let e=L.minX;e<=L.maxX;++e)for(let n=L.minY;n<=L.maxY;++n){if(g&&!x.tileCoordIntersectsViewport([v,e,n],O))continue;const s=this.getTile(v,e,n,t);if(this.isDrawableTile(s)){const e=(0,d.v6)(this);if(s.getState()==a.A.LOADED){P[v][s.tileCoord.toString()]=s;let t=s.inTransition(e);t&&1!==i.opacity&&(s.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(s)||(this.newTiles_=!0)}if(1===s.getAlpha(e,t.time))continue}const r=x.getTileCoordChildTileRange(s.tileCoord,F,D);let o=!1;r&&(o=M(v+1,r)),o||x.forEachTileCoordParentTileRange(s.tileCoord,M,F,D)}const k=y/r*_/A,N=this.getRenderContext(t);(0,l.Zz)(this.tempTransform,C/2,S/2,k,k,0,-C/2,-S/2),R&&this.clipUnrotated(N,t,R),p.getInterpolate()||(N.imageSmoothingEnabled=!1),this.preRender(N,t),this.renderedTiles.length=0;let G,z,j,B=Object.keys(P).map(Number);B.sort(h.V_),1!==i.opacity||this.containerReused&&!p.getOpaque(t.viewState.projection)?(G=[],z=[]):B=B.reverse();for(let e=B.length-1;e>=0;--e){const i=B[e],n=p.getTilePixelSize(i,_,s),r=x.getResolution(i)/y,o=n[0]*r*k,a=n[1]*r*k,h=x.getTileCoordForCoordAndZ((0,c.Py)(I),i),u=x.getTileCoordExtent(h),g=(0,l.Bb)(this.tempTransform,[A*(u[0]-I[0])/y,A*(I[3]-u[3])/y]),f=A*p.getGutterForProjection(s),m=P[i];for(const e in m){const n=m[e],s=n.tileCoord,r=h[1]-s[1],l=Math.round(g[0]-(r-1)*o),u=h[2]-s[2],_=Math.round(g[1]-(u-1)*a),x=Math.round(g[0]-r*o),y=Math.round(g[1]-u*a),E=l-x,T=_-y,A=v===i,C=A&&1!==n.getAlpha((0,d.v6)(this),t.time);let S=!1;if(!C)if(G){j=[x,y,x+E,y,x+E,y+T,x,y+T];for(let t=0,e=G.length;t{"use strict";i.d(e,{Eo:()=>a,gY:()=>h,j:()=>l,nl:()=>c});var n=i(6141),s=i(4087);const r=.5,o={Point:function(t,e,i,s,r,o){const a=i.getImage(),l=i.getText(),h=l&&l.getText(),c=o&&a&&h?{}:void 0;if(a){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,c),o.drawPoint(e,s,r)}if(h){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(l,c),n.drawText(e,s,r)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},MultiPoint:function(t,e,i,s,r,o){const a=i.getImage(),l=a&&0!==a.getOpacity(),h=i.getText(),c=h&&h.getText(),u=o&&l&&c?{}:void 0;if(l){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,u),o.drawMultiPoint(e,s,r)}if(c){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(h,u),n.drawText(e,s,r)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},GeometryCollection:function(t,e,i,n,s,r){const a=e.getGeometriesArray();let l,h;for(l=0,h=a.length;l0;return _&&Promise.all(c).then((()=>r(null))),function(t,e,i,n,s,r,a){const l=i.getGeometryFunction()(e);if(!l)return;const h=l.simplifyTransformed(n,s);i.getRenderer()?u(t,h,i,e,a):(0,o[h.getType()])(t,h,i,e,a,r)}(t,e,i,s,a,l,h),_}function u(t,e,i,n,s){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),s);else{const r=e.getGeometries();for(let e=0,o=r.length;e{"use strict";i.d(e,{A:()=>c});var n=i(5332),s=i(5986),r=i(9960),o=i(3984),a=i(9777),l=i(9703);class h extends s.A{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=(0,l.vt)(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(n.A.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.PRECOMPOSE)){const n=new r.A(o.A.PRECOMPOSE,void 0,e,t);i.dispatchEvent(n)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.POSTCOMPOSE)){const n=new r.A(o.A.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(n)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e,i=!0,n=-1;for(let s=0,r=t.layerStatesArray.length;s{"use strict";i.d(e,{eS:()=>j,gF:()=>z,Ay:()=>U});var n=i(8596),s=i(7404),r=i(1078),o=i(9332),a=i(6837),l=i(190),h=i(4087);class c extends o.A{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter_=t.gutter||0,this.helper_=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===r.A.LOADED,this.loaded)this.uploadTile();else{if(t instanceof l.A){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(a.A.CHANGE,this.handleTileChange_)}}uploadTile(){(0,h.b0)()}setReady(){this.ready=!0,this.dispatchEvent(a.A.CHANGE)}handleTileChange_(){this.tile.getState()===r.A.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_)}}const u=c;var d=i(7607),g=i(259),_=i(130),f=i(8711),p=i(4401);function m(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function x(t,e,i,n,s,r){const o=t.getGL();let a,l;i instanceof Float32Array?(a=o.FLOAT,t.getExtension("OES_texture_float"),l=null!==t.getExtension("OES_texture_float_linear")):(a=o.UNSIGNED_BYTE,l=!0),m(o,e,r&&l);const h=i.byteLength/n[1];let c,u=1;switch(h%8==0?u=8:h%4==0?u=4:h%2==0&&(u=2),s){case 1:c=o.LUMINANCE;break;case 2:c=o.LUMINANCE_ALPHA;break;case 3:c=o.RGB;break;case 4:c=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${s}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,u),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let v=null;const y=class extends u{constructor(t){super(t),this.textures=[],this.renderSize_=(0,p.xq)(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new g.Ay(_.H7,_.Ek);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper_,e=t.getGL(),i=this.tile;let n;this.textures.length=0,n=i instanceof l.A||i instanceof s.A?i.getImage():i.getData();const r=(0,d.xo)(n);if(r){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,function(t,e,i,n){m(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,r,i.interpolate),void this.setReady()}n=(0,d.bL)(n);const o=i.getSize(),a=[o[0]+2*this.gutter_,o[1]+2*this.gutter_],h=n instanceof Float32Array,c=a[0]*a[1],u=h?Float32Array:Uint8Array,g=u.BYTES_PER_ELEMENT,_=n.byteLength/a[1];this.bandCount=Math.floor(_/g/a[0]);const f=Math.ceil(this.bandCount/4);if(1===f){const s=e.createTexture();return this.textures.push(s),x(t,s,n,a,this.bandCount,i.interpolate),void this.setReady()}const p=new Array(f);for(let t=0;t=p;--s){const i=c.getTileRangeForExtentAndZ(e,s,this.tempTileRange_),a=c.getResolution(s);for(let e=i.minX;e<=i.maxX;++e)for(let h=i.minY;h<=i.maxY;++h){const i=(0,S.N)(s,e,h,this.tempTileCoord_),f=O(l,i);let p,m;if(_.containsKey(f)&&(p=_.get(f),m=p.tile),p&&p.tile.key===l.getKey()||(m=l.getTile(s,e,h,t.pixelRatio,o.projection)),M(n,m))continue;if(p)if(this.isDrawableTile_(m))p.setTile(m);else{const t=m.getInterimTile();p.setTile(t)}else p=this.createTileRepresentation({tile:m,grid:c,helper:this.helper,gutter:u}),_.set(f,p);D(n,p,s);const x=m.getKey();g[x]=!0,m.getState()===r.A.IDLE&&(t.tileQueue.isKeyQueued(x)||t.tileQueue.enqueue([m,d,c.getTileCoordCenter(i),a]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}beforeTilesMaskRender(t){return!1}renderTile(t,e,i,n,s,r,o,a,l,h,c){}renderTileMask(t,e,i,n){}drawTile_(t,e,i,n,s,r,o){if(!e.ready)return;const a=e.tile.tileCoord,l=(0,S.i7)(a),h=l in r?r[l]:1,c=o.getResolution(i),u=(0,p.xq)(o.getTileSize(i),this.tempSize_),d=o.getOrigin(i),g=o.getTileCoordExtent(a),_=h<1?-1:P(i);h<1&&(t.animate=!0);const f=t.viewState,m=f.center[0],x=f.center[1],v=u[0]+2*n,y=u[1]+2*n,E=v/y,T=(m-d[0])/(u[0]*c),A=(d[1]-x)/(u[1]*c),C=f.resolution/c,w=a[1],b=a[2];(0,R.cL)(this.tileTransform_),(0,R.hs)(this.tileTransform_,2/(t.size[0]*C/v),-2/(t.size[1]*C/v)),(0,R.e$)(this.tileTransform_,f.rotation),(0,R.hs)(this.tileTransform_,1,1/E),(0,R.Tl)(this.tileTransform_,(u[0]*(w-T)-n)/v,(u[1]*(b-A)-n)/y),this.renderTile(e,this.tileTransform_,t,s,c,u,d,g,_,n,h)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,o=this.getLayer(),a=o.getRenderSource(),l=a.getTileGridForProjection(i.projection),c=a.getGutterForProjection(i.projection),u=F(t,t.extent),d=l.getZForResolution(i.resolution,a.zDirection),g={tileIds:new Set,representationsByZ:{}},_=o.getPreload();if(t.nextExtent){const e=l.getZForResolution(i.nextResolution,a.zDirection),n=F(t,t.nextExtent);this.enqueueTiles(t,n,e,g,_)}this.enqueueTiles(t,u,d,g,0),_>0&&setTimeout((()=>{this.enqueueTiles(t,u,d-1,g,_-1)}),0);const f={},p=(0,h.v6)(this),m=t.time;let x=!1;for(const t of g.representationsByZ[d]){const e=t.tile;if((e instanceof s.A||e instanceof n.A)&&e.getState()===r.A.EMPTY)continue;const i=e.tileCoord;if(t.ready){const t=e.getAlpha(p,m);if(1===t){e.endTransition(p);continue}x=!0,f[(0,S.i7)(i)]=t}if(this.renderComplete=!1,this.findAltTiles_(l,i,d+1,g))continue;const o=l.getMinZoom();for(let t=d-1;t>=o&&!this.findAltTiles_(l,i,t,g);--t);}const v=g.representationsByZ,y=Object.keys(v).map(Number).sort(w.rG);if(this.beforeTilesMaskRender(t))for(let t=0,e=y.length;tt.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}}const N=k;var G=i(9777);const z={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},j={TEXTURE_COORD:"a_textureCoord"},B=[{name:j.TEXTURE_COORD,size:2,type:G.jQ.FLOAT}],U=class extends N{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new g.Ay(_.IP,_.Ek),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){if(super.reset(t),this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}removeHelper(){if(this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}super.removeHelper()}createTileRepresentation(t){return new y(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,i,n,s,r,o,a,l,h,c){const u=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(B);let d=0;for(;d0&&(v=a,(0,I._N)(v,n,v)),this.helper.setUniformFloatVec4(z.RENDER_EXTENT,v),this.helper.setUniformFloatValue(z.RESOLUTION,g.resolution),this.helper.setUniformFloatValue(z.ZOOM,g.zoom),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_WIDTH,_),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_HEIGHT,f),this.helper.setUniformFloatValue(z.TEXTURE_RESOLUTION,s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_X,o[0]+m*r[0]*s-h*s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_Y,o[1]-x*r[1]*s+h*s),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const e=this.frameState;if(!e)return null;const i=this.getLayer(),o=(0,R.Bb)(e.pixelToCoordinateTransform,t.slice()),a=e.viewState,l=i.getExtent();if(l&&!(0,I.Ym)((0,b.SD)(l,a.projection),o))return null;const h=i.getSources((0,I.Tr)([o]),a.resolution);let c,u,d;for(c=h.length-1;c>=0;--c)if(u=h[c],"ready"===u.getState()){if(d=u.getTileGridForProjection(a.projection),u.getWrapX())break;const t=d.getExtent();if(!t||(0,I.Ym)(t,o))break}if(c<0)return null;const g=this.tileRepresentationCache;for(let t=d.getZForResolution(a.resolution);t>=d.getMinZoom();--t){const e=d.getTileCoordForCoordAndZ(o,t),i=O(u,e);if(!g.containsKey(i))continue;const a=g.get(i),l=a.tile;if((l instanceof s.A||l instanceof n.A)&&l.getState()===r.A.EMPTY)return null;if(!a.loaded)continue;const h=d.getOrigin(t),c=(0,p.xq)(d.getTileSize(t)),_=d.getResolution(t),f=(o[0]-h[0])/_-e[1]*c[0],m=(h[1]-o[1])/_-e[2]*c[1];return a.getPixelData(f,m)}return null}disposeInternal(){const t=this.helper;if(t){const e=t.getGL();for(const t of this.paletteTextures_)t.delete(e);this.paletteTextures_.length=0,e.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_}}},3513:(t,e,i)=>{"use strict";i.d(e,{BV:()=>l,KQ:()=>u,XX:()=>g,aY:()=>d});var n=i(915),s=i(8711),r=i(3407),o=i(1597);let a;const l=[];function h(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function c(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function u(t,e,i,s){const o=(0,r.pd)(i,e,t);let a=(0,r.hO)(e,s,i);const l=e.getMetersPerUnit();void 0!==l&&(a*=l);const h=t.getMetersPerUnit();void 0!==h&&(a/=h);const c=t.getExtent();if(!c||(0,n.Ym)(c,o)){const e=(0,r.hO)(t,a,o)/a;isFinite(e)&&e>0&&(a/=e)}return a}function d(t,e,i,s){const r=(0,n.q1)(i);let o=u(t,e,r,s);return(!isFinite(o)||o<=0)&&(0,n.sB)(i,(function(i){return o=u(t,e,i,s),isFinite(o)&&o>0})),o}function g(t,e,i,r,u,d,g,_,f,p,m,x,v,y){const E=(0,s.Y)(Math.round(i*t),Math.round(i*e),l);if(x||(E.imageSmoothingEnabled=!1),0===f.length)return E.canvas;function T(t){return Math.round(t*i)/i}E.scale(i,i),E.globalCompositeOperation="lighter";const A=(0,n.S5)();let C;f.forEach((function(t,e,i){(0,n.X$)(A,t.extent)}));const S=i/r,R=(x?1:1+Math.pow(2,-24))/S;if(!v||1!==f.length||0!==p){if(C=(0,s.Y)(Math.round((0,n.RG)(A)*S),Math.round((0,n.Oq)(A)*S),l),x||(C.imageSmoothingEnabled=!1),u&&y){const t=(u[0]-A[0])*S,e=-(u[3]-A[3])*S,i=(0,n.RG)(u)*S,s=(0,n.Oq)(u)*S;C.rect(t,e,i,s),C.clip()}f.forEach((function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){C.save();const e=(t.clipExtent[0]-A[0])*S,i=-(t.clipExtent[3]-A[3])*S,s=(0,n.RG)(t.clipExtent)*S,r=(0,n.Oq)(t.clipExtent)*S;C.rect(x?e:Math.round(e),x?i:Math.round(i),x?s:Math.round(e+s)-Math.round(e),x?r:Math.round(i+r)-Math.round(i)),C.clip()}const e=(t.extent[0]-A[0])*S,i=-(t.extent[3]-A[3])*S,s=(0,n.RG)(t.extent)*S,r=(0,n.Oq)(t.extent)*S;C.drawImage(t.image,p,p,t.image.width-2*p,t.image.height-2*p,x?e:Math.round(e),x?i:Math.round(i),x?s:Math.round(e+s)-Math.round(e),x?r:Math.round(i+r)-Math.round(i)),t.clipExtent&&C.restore()}}))}const w=(0,n.Py)(g);return _.getTriangles().forEach((function(t,e,i){const r=t.source,u=t.target;let g=r[0][0],_=r[0][1],p=r[1][0],m=r[1][1],v=r[2][0],y=r[2][1];const S=T((u[0][0]-w[0])/d),b=T(-(u[0][1]-w[1])/d),I=T((u[1][0]-w[0])/d),L=T(-(u[1][1]-w[1])/d),P=T((u[2][0]-w[0])/d),M=T(-(u[2][1]-w[1])/d),D=g,F=_;g=0,_=0,p-=D,m-=F,v-=D,y-=F;const O=[[p,m,0,0,I-S],[v,y,0,0,P-S],[0,0,p,m,L-b],[0,0,v,y,M-b]],k=(0,o.KU)(O);if(!k)return;if(E.save(),E.beginPath(),function(){if(void 0===a){const t=(0,s.Y)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",h(t,4,5,4,0),h(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;a=c(e,0)||c(e,4)||c(e,8),(0,s.Yg)(t),l.push(t.canvas)}return a}()||!x){E.moveTo(I,L);const t=4,e=S-I,i=b-L;for(let n=0;n{"use strict";i.d(e,{A:()=>_});var n=i(3101),s=i(7607),r=i(6837),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(8711),u=i(915),d=i(9438);class g extends s.Ay{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8Array(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,i=e.getExtent(),s=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?s?(0,u._N)(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),c=this.targetTileGrid_.getExtent();let d=this.sourceTileGrid_.getExtent();const g=c?(0,u._N)(r,c):r;if(0===(0,u.UG)(g))return void(this.state=o.A.EMPTY);i&&(d=d?(0,u._N)(d,i):i);const _=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),f=t.targetProj,p=(0,l.aY)(e,f,g,_);if(!isFinite(p)||p<=0)return void(this.state=o.A.EMPTY);const m=void 0!==t.errorThreshold?t.errorThreshold:n.l;if(this.triangulation_=new a.A(e,f,g,d,p*m,_),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=this.sourceTileGrid_.getZForResolution(p);let x=this.triangulation_.calculateSourceExtent();if(d&&(e.canWrapX()?(x[1]=(0,h.qE)(x[1],d[1],d[3]),x[3]=(0,h.qE)(x[3],d[1],d[3])):x=(0,u._N)(x,d)),(0,u.UG)(x)){let n=0,s=0;e.canWrapX()&&(n=(0,u.RG)(i),s=Math.floor((x[0]-i[0])/n)),(0,u.QJ)(x.slice(),e,!0).forEach((e=>{const i=this.sourceTileGrid_.getTileRangeForExtentAndZ(e,this.sourceZ_),r=t.getTileFunction;for(let t=i.minX;t<=i.maxX;t++)for(let e=i.minY;e<=i.maxY;e++){const i=r(this.sourceZ_,t,e,this.pixelRatio_);if(i){const t=s*n;this.sourceTiles_.push({tile:i,offset:t})}}++s})),0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{const i=e.tile;if(!i||i.getState()!==o.A.LOADED)return;const n=i.getSize(),r=this.gutter_;let a;a=(0,s.bL)(i.getData())||(0,s.$r)((0,s.xo)(i.getData()));const l=[n[0]+2*r,n[1]+2*r],h=a instanceof Float32Array,c=l[0]*l[1],u=h?Float32Array:Uint8Array,d=new u(a.buffer),g=u.BYTES_PER_ELEMENT,_=g*d.length/c,f=d.byteLength/l[1],p=Math.floor(f/g/l[0]),m=c*p;let x=d;if(d.length!==m){x=new u(m);let t=0,e=0;const i=l[0]*p;for(let n=0;n=0;--e){const i=[];for(let n=0,s=t.length;n{const i=e.getState();if(i!==o.A.IDLE&&i!==o.A.LOADING)return;t++;const n=(0,d.KT)(e,r.A.CHANGE,(function(){const i=e.getState();i!=o.A.LOADED&&i!=o.A.ERROR&&i!=o.A.EMPTY||((0,d.JH)(n),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t}){t.getState()==o.A.IDLE&&t.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(d.JH),this.sourcesListenerKeys_=null}}const _=g},7404:(t,e,i)=>{"use strict";i.d(e,{A:()=>_});var n=i(3101),s=i(6837),r=i(8143),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(915),u=i(9438),d=i(8711);class g extends r.A{constructor(t,e,i,s,r,u,d,g,_,f,p,m){super(r,o.A.IDLE,m),this.renderEdges_=void 0!==p&&p,this.pixelRatio_=d,this.gutter_=g,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=u||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const x=s.getTileCoordExtent(this.wrappedTileCoord_),v=this.targetTileGrid_.getExtent();let y=this.sourceTileGrid_.getExtent();const E=v?(0,c._N)(x,v):x;if(0===(0,c.UG)(E))return void(this.state=o.A.EMPTY);const T=t.getExtent();T&&(y=y?(0,c._N)(y,T):T);const A=s.getResolution(this.wrappedTileCoord_[0]),C=(0,l.aY)(t,i,E,A);if(!isFinite(C)||C<=0)return void(this.state=o.A.EMPTY);const S=void 0!==f?f:n.l;if(this.triangulation_=new a.A(t,i,E,y,C*S,A),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=e.getZForResolution(C);let R=this.triangulation_.calculateSourceExtent();if(y&&(t.canWrapX()?(R[1]=(0,h.qE)(R[1],y[1],y[3]),R[3]=(0,h.qE)(R[3],y[1],y[3])):R=(0,c._N)(R,y)),(0,c.UG)(R)){let i=0,n=0;t.canWrapX()&&(i=(0,c.RG)(T),n=Math.floor((R[0]-T[0])/i)),(0,c.QJ)(R.slice(),t,!0).forEach((t=>{const s=e.getTileRangeForExtentAndZ(t,this.sourceZ_);for(let t=s.minX;t<=s.maxX;t++)for(let e=s.minY;e<=s.maxY;e++){const s=_(this.sourceZ_,t,e,d);if(s){const t=n*i;this.sourceTiles_.push({tile:s,offset:t})}}++n})),0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{const i=e.tile;if(i&&i.getState()==o.A.LOADED){const n=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);n[0]+=e.offset,n[2]+=e.offset;const s=this.clipExtent_?.slice();s&&(s[0]+=e.offset,s[2]+=e.offset),t.push({extent:n,clipExtent:s,image:i.getImage()})}})),this.sourceTiles_.length=0,0===t.length)this.state=o.A.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.XX)(n,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),r,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=o.A.LOADED}this.changed()}load(){if(this.state==o.A.IDLE){this.state=o.A.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:e})=>{const i=e.getState();if(i==o.A.IDLE||i==o.A.LOADING){t++;const i=(0,u.KT)(e,s.A.CHANGE,(function(n){const s=e.getState();s!=o.A.LOADED&&s!=o.A.ERROR&&s!=o.A.EMPTY||((0,u.JH)(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t},e,i){t.getState()==o.A.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(u.JH),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,d.Yg)(this.canvas_.getContext("2d")),l.BV.push(this.canvas_),this.canvas_=null),super.release()}}const _=g},2913:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(915),s=i(3407),r=i(1597);const o=class{constructor(t,e,i,r,o,a){this.sourceProj_=t,this.targetProj_=e;let l={};const h=(0,s.RG)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return l[e]||(l[e]=h(t)),l[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&(0,n.RG)(r)>=(0,n.RG)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,n.RG)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,n.RG)(this.targetProj_.getExtent()):null;const c=(0,n.Py)(i),u=(0,n.WU)(i),d=(0,n.k_)(i),g=(0,n.R)(i),_=this.transformInv_(c),f=this.transformInv_(u),p=this.transformInv_(d),m=this.transformInv_(g),x=10+(a?Math.max(0,Math.ceil(Math.log2((0,n.UG)(i)/(a*a*256*256)))):0);if(this.addQuad_(c,u,d,g,_,f,p,m,x),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&d<1;let f=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const r=(0,n.Tr)([t,e,i,s]);f=(0,n.RG)(r)/this.targetWorldWidth_>.25||f}!_&&this.sourceProj_.isGlobal()&&d&&(f=d>.25||f)}if(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!(0,n.HY)(u,this.maxSourceExtent_))return;let p=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(h[0])&&isFinite(h[1])))if(c>0)f=!0;else if(p=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1),1!=p&&2!=p&&4!=p&&8!=p)return;if(c>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let s;s=_?((0,r.xP)(o[0],g)+(0,r.xP)(l[0],g))/2-(0,r.xP)(n[0],g):(o[0]+l[0])/2-n[0];const a=(o[1]+l[1])/2-n[1];f=s*s+a*a>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const n=[(e[0]+i[0])/2,(e[1]+i[1])/2],r=this.transformInv_(n),u=[(s[0]+t[0])/2,(s[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,n,u,o,a,r,d,c-1),this.addQuad_(u,n,i,s,d,r,l,h,c-1)}else{const n=[(t[0]+e[0])/2,(t[1]+e[1])/2],r=this.transformInv_(n),u=[(i[0]+s[0])/2,(i[1]+s[1])/2],d=this.transformInv_(u);this.addQuad_(t,n,u,s,o,r,d,h,c-1),this.addQuad_(n,e,i,u,r,a,l,d,c-1)}return}}if(_){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&p||this.addTriangle_(t,i,s,o,l,h),14&p||this.addTriangle_(t,i,e,o,l,a),p&&(13&p||this.addTriangle_(e,s,t,a,h,o),7&p||this.addTriangle_(e,s,i,a,h,l))}calculateSourceExtent(){const t=(0,n.S5)();return this.triangles_.forEach((function(e,i,s){const r=e.source;(0,n.$C)(t,r[0]),(0,n.$C)(t,r[1]),(0,n.$C)(t,r[2])})),t}getTriangles(){return this.triangles_}}},3101:(t,e,i)=>{"use strict";i.d(e,{l:()=>n});const n=.5},4498:(t,e,i)=>{"use strict";i.d(e,{a$:()=>o,b8:()=>s,cq:()=>a,dv:()=>r});var n=i(1597);function s(t){if(void 0!==t)return 0}function r(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function a(t){const e=void 0===t?(0,n.eh)(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}},4401:(t,e,i)=>{"use strict";function n(t){return t[0]>0&&t[1]>0}function s(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function r(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Ie:()=>n,hs:()=>s,xq:()=>r})},6203:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(6837),s=i(6717),r=i(4294),o=i(731),a=i(6933),l=i(588),h=i(915),c=i(4087);class u extends o.A{constructor(t){super({attributions:(t=t||{}).attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return(0,l.v)(!e||"Point"===e.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source?.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(n.A.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(n.A.CHANGE,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=(0,h.S5)(),e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let s=0,r=i.length;s=0;--e){const n=this.geometryFunction(t[e]);n?(0,a.WQ)(i,n.getCoordinates()):t.splice(e,1)}(0,a.hs)(i,1/t.length);const n=(0,h.q1)(e),o=this.interpolationRatio,l=new r.A([i[0]*(1-o)+n[0]*o,i[1]*(1-o)+n[1]*o]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new s.A({geometry:l,features:t})}}const d=u},9925:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>C,VV:()=>T,QD:()=>A});var n=i(1685),s=i(6837),r=i(6141),o=i(3938),a=i(3101),l=i(2913),h=i(3513);function c(t){return Array.isArray(t)?Math.min(...t):t}var u=i(915),d=i(9438);class g extends o.Ay{constructor(t,e,i,n,s,o,c){let d=t.getExtent();d&&t.canWrapX()&&(d=d.slice(),d[0]=-1/0,d[2]=1/0);let g=e.getExtent();g&&e.canWrapX()&&(g=g.slice(),g[0]=-1/0,g[2]=1/0);const _=g?(0,u._N)(i,g):i,f=(0,u.q1)(_),p=(0,h.KQ)(t,e,f,n),m=a.l,x=new l.A(t,e,_,d,p*m,n),v=x.calculateSourceExtent(),y=(0,u.Im)(v)?null:o(v,p,s),E=y?r.A.IDLE:r.A.EMPTY,T=y?y.getPixelRatio():1;super(i,n,T,E),this.targetProj_=e,this.maxSourceExtent_=d,this.triangulation_=x,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=y,this.sourcePixelRatio_=T,this.interpolate_=c,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==r.A.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==r.A.LOADED){const t=(0,u.RG)(this.targetExtent_)/this.targetResolution_,e=(0,u.Oq)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,h.XX)(t,e,this.sourcePixelRatio_,c(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=t,this.changed()}load(){if(this.state==r.A.IDLE){this.state=r.A.LOADING,this.changed();const t=this.sourceImage_.getState();t==r.A.LOADED||t==r.A.ERROR?this.reproject_():(this.sourceListenerKey_=(0,d.KT)(this.sourceImage_,s.A.CHANGE,(function(t){const e=this.sourceImage_.getState();e!=r.A.LOADED&&e!=r.A.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){(0,d.JH)(this.sourceListenerKey_),this.sourceListenerKey_=null}}const _=g;var f=i(6444),p=i(2192),m=i(1597),x=i(3407),v=i(6514);class y extends n.Ay{constructor(t,e){super(t),this.image=e}}class E extends f.A{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.loader=t.loader||null,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!t.loader&&0===t.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();return e&&(t=e[(0,v.FT)(e,t,0)]),t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||(0,x.tI)(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,x.tI)(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&(0,u.aI)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new _(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){if(this.loader){const r=A(t,e,i,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===n&&(this.wantedExtent_&&(0,u.ms)(this.wantedExtent_,r)||(0,u.ms)(this.image.getExtent(),r))&&(this.wantedResolution_&&c(this.wantedResolution_)===a||c(this.image.getResolution())===a)))return this.image;this.wantedProjection_=n,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new o.Ay(r,a,i,this.loader),this.image.addEventListener(s.A.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case r.A.LOADING:this.loading=!0,i="imageloadstart";break;case r.A.LOADED:this.loading=!1,i="imageloadend";break;case r.A.ERROR:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new y(i,e))}}function T(t,e){t.getImage().src=e}function A(t,e,i,n){const s=e/i,r=(0,u.q1)(t),o=(0,m.mk)((0,u.RG)(t)/s,p.B),a=(0,m.mk)((0,u.Oq)(t)/s,p.B),l=o+2*(0,m.mk)((n-1)*o/2,p.B),h=a+2*(0,m.mk)((n-1)*a/2,p.B);return(0,u.Bg)(r,s,0,[l,h])}const C=E},8270:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(6837),s=i(9925),r=i(3938),o=i(915),a=i(3407);class l extends s.Ay{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:s.VV;super({attributions:t.attributions,interpolate:t.interpolate,projection:(0,a.Jt)(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new r.Ay(this.imageExtent_,void 0,1,function(t){const e=t.load||r.D4,i=t.imageExtent,n=new Image;return null!==t.crossOrigin&&(n.crossOrigin=t.crossOrigin),()=>e(n,t.url).then((t=>{const e=(0,o.RG)(i)/t.width,n=(0,o.Oq)(i)/t.height;return{image:t,extent:i,resolution:e!==n?[e,n]:n,pixelRatio:1}}))}({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,load:(t,e)=>(this.image.setImage(t),i(this.image,e),(0,r.D4)(t))})),this.image.addEventListener(n.A.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return(0,o.HY)(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}const h=l},1011:(t,e,i)=>{"use strict";i.d(e,{A:()=>h});var n=i(9925),s=i(3513),r=i(7500),o=i(3938),a=i(3407);class l extends n.Ay{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:n.VV,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,i,n){const o=(0,a.Jt)(i),l=this.getProjection();l&&l!==o&&(e=(0,s.KQ)(l,o,t,e),t=(0,a.pd)(t,o,l));const h={url:this.url_,params:{...this.params_,...n},projection:l||o};return(0,r.y4)(h,t,e)}getLegendUrl(t,e){return(0,r.$q)({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,i,n){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===n||(this.loaderProjection_=n,this.loader=(0,r.Eq)({crossOrigin:this.crossOrigin_,params:this.params_,projection:n,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(t,e)=>(this.image.setImage(t),this.imageLoadFunction_(this.image,e),(0,o.D4)(t))})),super.getImageInternal(t,e,i,n))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}const h=l},7896:(t,e,i)=>{"use strict";i.d(e,{A:()=>o,o:()=>s});var n=i(702);const s='© OpenStreetMap contributors.';class r extends n.A{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[s];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}}const o=r},6444:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(4120),s=i(3407);class r extends n.A{constructor(t){super(),this.projection=(0,s.Jt)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const a=r},6017:(t,e,i)=>{"use strict";i.d(e,{A:()=>f,c:()=>_});var n=i(1685),s=i(6444),r=i(61),o=i(1078),a=i(4087),l=i(588),h=i(3407),c=i(186),u=i(4863),d=i(4401);class g extends s.A{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&(0,d.xq)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new r.A(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const s=this.getTileCacheForProjection(t);if(!s)return!1;let r,a,l,h=!0;for(let t=i.minX;t<=i.maxX;++t)for(let u=i.minY;u<=i.maxY;++u)a=(0,c.dp)(e,t,u),l=!1,s.containsKey(a)&&(r=s.get(a),l=r.getState()===o.A.LOADED,l&&(l=!1!==n(r))),l||(h=!1);return h}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s){return(0,a.b0)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:(0,u.pr)(t)}getTileCacheForProjection(t){const e=this.getProjection();return(0,l.v)(null===e||(0,h.tI)(e,t),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),r=(0,d.xq)(n.getTileSize(t),this.tmpSize);return 1==s?r:(0,d.hs)(r,s,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=(0,u.Li)(i,t,e)),(0,c.N5)(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class _ extends n.Ay{constructor(t,e){super(t),this.tile=e}}const f=g},8469:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},8512:(t,e,i)=>{"use strict";i.d(e,{A:()=>f});var n=i(6837),s=i(190),r=i(7404),o=i(61),a=i(1078),l=i(6164),h=i(3407),c=i(186),u=i(4863),d=i(4087);class g extends l.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:_,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:s.A,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,h.tI)(e,t)))return this.tileGrid;const i=(0,d.v6)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,u.pr)(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,h.tI)(e,t))return this.tileCache;const i=(0,d.v6)(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new o.A(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,s,r,o){const l=[t,e,i],h=this.getTileCoordForTileUrlFunction(l,r),c=h?this.tileUrlFunction(h,s,r):void 0,u=new this.tileClass(l,void 0!==c?a.A.IDLE:a.A.EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(n.A.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,i,n,s){const o=this.getProjection();if(!o||!s||(0,h.tI)(o,s))return this.getTileInternal(t,e,i,n,o||s);const a=this.getTileCacheForProjection(s),l=[t,e,i];let u;const d=(0,c.i7)(l);a.containsKey(d)&&(u=a.get(d));const g=this.getKey();if(u&&u.key==g)return u;const _=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),p=this.getTileCoordForTileUrlFunction(l,s),m=new r.A(o,_,s,f,l,p,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return m.key=g,u?(m.interimTile=u,m.refreshInterimChain(),a.replace(d,m)):a.set(d,m),m}getTileInternal(t,e,i,n,s){let r=null;const o=(0,c.dp)(t,e,i),l=this.getKey();if(this.tileCache.containsKey(o)){if(r=this.tileCache.get(o),r.key!=l){const h=r;r=this.createTile_(t,e,i,n,s,l),h.getState()==a.A.IDLE?r.interimTile=h.interimTile:r.interimTile=h,r.refreshInterimChain(),this.tileCache.replace(o,r)}}else r=this.createTile_(t,e,i,n,s,l),this.tileCache.set(o,r);return r}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=(0,h.Jt)(t);if(i){const t=(0,d.v6)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function _(t,e){t.getImage().src=e}const f=g},4218:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(8512),s=i(915),r=i(2654),o=i(4863),a=i(3407),l=i(4087);Error,Error;class h extends n.A{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:(0,a.Jt)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)!function(t,e,i,n){const s=document.createElement("script"),r="olc_"+(0,l.v6)(e);function o(){delete window[r],s.parentNode.removeChild(s)}s.async=!0,s.src=t+(t.includes("?")?"&":"?")+"callback="+r;const a=setTimeout((function(){o(),i&&i()}),1e4);window[r]=function(t){clearTimeout(a),o(),e(t)},document.head.appendChild(s)}(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else{if(!t.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(t.tileJSON)}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=(0,a.Jt)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=(0,a.FO)(e,i);n=(0,s.NW)(t.bounds,r)}const l=(0,o.kZ)(i),h=t.minzoom||0,c=t.maxzoom||22,u=(0,o.EN)({extent:l,maxZoom:c,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=u,this.tileUrlFunction=(0,r.Qz)(t.tiles,u),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:l;this.setAttributions((function(i){return(0,s.HY)(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const c=h},2728:(t,e,i)=>{"use strict";i.d(e,{A:()=>g});var n=i(8512),s=i(7500),r=i(4465),o=i(915),a=i(3513),l=i(2806),h=i(3407),c=i(1597),u=i(186);class d extends n.A{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=(0,o.S5)(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const r=(0,h.Jt)(i),l=this.getProjection()||r;let c=this.getTileGrid();c||(c=this.getTileGridForProjection(l));const u=(0,h.pd)(t,r,l),d=(0,a.KQ)(l,r,t,e),g=c.getZForResolution(d,this.zDirection),_=c.getResolution(g),f=c.getTileCoordForCoordAndZ(u,g);if(c.getResolutions().length<=f[0])return;let p=c.getTileCoordExtent(f,this.tmpExtent_);const m=this.gutter_;0!==m&&(p=(0,o.r)(p,_*m,p));const x={QUERY_LAYERS:this.params_.LAYERS};Object.assign(x,(0,s.W3)(this.params_,"GetFeatureInfo"),n);const v=Math.floor((u[0]-p[0])/_),y=Math.floor((p[3]-u[1])/_);return x[this.v13_?"I":"X"]=v,x[this.v13_?"J":"Y"]=y,this.getRequestUrl_(f,p,1,l||r,x)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:s.jD,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),(0,r.L)(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r){const o=this.urls;if(!o)return;let a;return a=1==o.length?o[0]:o[(0,c.xP)((0,u.tW)(t),o.length)],(0,s.AE)(e,(this.tileGrid||this.getTileGridForProjection(n)).getResolution(t[0]),i,n,a,r,this.serverType_)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||s.jD;this.v13_=(0,l.Z)(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const r=n.getResolution(t[0]);let a=n.getTileCoordExtent(t,this.tmpExtent_);const l=this.gutter_;0!==l&&(a=(0,o.r)(a,r*l,a));const h=Object.assign({},(0,s.W3)(this.params_,"GetMap"));return this.getRequestUrl_(t,a,e,i,h)}}const g=d},6164:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(8469),s=i(6017),r=i(1078),o=i(2654),a=i(186),l=i(4087);class h extends s.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===h.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=(0,l.v6)(e),o=e.getState();let a;o==r.A.LOADING?(this.tileLoadingKeys_[i]=!0,a=n.A.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],a=o==r.A.ERROR?n.A.TILELOADERROR:o==r.A.LOADED?n.A.TILELOADEND:void 0),null!=a&&this.dispatchEvent(new s.c(a,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=(0,o.Uu)(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,o.Qz)(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=(0,a.dp)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const c=h},731:(t,e,i)=>{"use strict";i.d(e,{A:()=>A});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(8450),l=i(5902),h=i(4778),c=i(6444),u=i(8280),d=i(4238);function g(t,e){return[[-1/0,-1/0,1/0,1/0]]}i(3407);var _=i(588),f=i(915),p=i(6514),m=i(4087),x=i(3530),v=i(9438),y=i(1142);class E extends r.Ay{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class T extends c.A{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=d.tV,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,_.v)(this.format_,"`format` must be set when `url` is set"),this.loader_=(0,y.nF)(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:g;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,s;this.featuresRtree_=e?new l.A:null,this.loadedExtentsRtree_=new l.A,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),e||void 0!==i||(i=new n.A(s)),void 0!==s&&this.addFeaturesInternal(s),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=(0,m.v6)(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new E(u.A.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof h.Ay||(this.featureChangeKeys_[t]=[(0,v.KT)(e,o.A.CHANGE,this.handleFeatureChange_,this),(0,v.KT)(e,a.A.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof h.Ay){const n=this.idIndex_[t];n instanceof h.Ay?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&((0,_.v)(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(s.A.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(v.JH);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new E(u.A.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,x.p)(this.nullGeometryFeatures_)||(0,p.X$)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=(0,f.QJ)(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||d.rT,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e instanceof h.Ay?0:e.closestPointXY(i,n,r,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADERROR))})),n.insert(r,{extent:r.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,f.aI)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeatures(t){const e=[];for(let i=0,n=t.length;i0&&this.changed()}removeFeature(t){t&&this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=(0,m.v6)(t);if(!(e in this.uidIndex_))return;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];i?.forEach(v.JH),delete this.featureChangeKeys_[e];const n=t.getId();if(void 0!==n){const e=n.toString(),i=this.idIndex_[e];i===t?delete this.idIndex_[e]:Array.isArray(i)&&(i.splice(i.indexOf(t),1),1===i.length&&(this.idIndex_[e]=i[0]))}return delete this.uidIndex_[e],this.hasListener(u.A.REMOVEFEATURE)&&this.dispatchEvent(new E(u.A.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_){const n=this.idIndex_[i];if(t instanceof h.Ay&&Array.isArray(n)&&n.includes(t))n.splice(n.indexOf(t),1);else if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){(0,_.v)(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader((0,y.nF)(t,this.format_))}}const A=T},8280:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});const n={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},5620:(t,e,i)=>{"use strict";i.d(e,{A:()=>C});var n=i(6837),s=i(8143),r=i(1078);class o extends s.A{constructor(t,e,i,n,s,r){super(t,e,r),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==r.A.IDLE&&(this.setState(r.A.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(r.A.ERROR)}setFeatures(t){this.features_=t,this.setState(r.A.LOADED)}setLoader(t){this.loader_=t}}const a=o;var l=i(61),h=i(6758),c=i(6164),u=i(8711),d=i(4087);const g=[];class _ extends s.A{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=(0,d.v6)(t);return e in this.context_||(this.context_[e]=(0,u.Y)(1,1,g)),this.context_[e]}hasContext(t){return(0,d.v6)(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=(0,d.v6)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];(0,u.Yg)(e),g.push(e.canvas),delete this.context_[t]}super.release()}}const f=_;var p=i(9496),m=i(915),x=i(4863),v=i(186),y=i(3530),E=i(1142),T=i(4401);class A extends c.A{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||(0,x.kZ)(e),n=t.tileGrid||(0,x.EN)({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:S,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new l.A(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:a,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=(0,v.K)(i.peekFirstKey())[0],s=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==r.A.LOADED)return;const o=i.getSourceTiles();for(let i=0,n=o.length;i{const n=(0,v.gr)(e),s=i.peek(n);if(s){const e=s.sourceTiles;for(let i=0,n=e.length;i{const o=this.tileUrlFunction(s,t,e),a=this.sourceTileCache.containsKey(o)?this.sourceTileCache.get(o):new this.tileClass(s,o?r.A.IDLE:r.A.EMPTY,o,this.format_,this.tileLoadFunction);i.sourceTiles.push(a);const l=a.getState();if(l{this.handleTileChange(e);const s=a.getState();if(s===r.A.LOADED||s===r.A.ERROR){const e=a.getKey();e in i.errorTileKeys?a.getState()===r.A.LOADED&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,s===r.A.ERROR?i.errorTileKeys[e]=!0:a.removeEventListener(n.A.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,y.p)(i.errorTileKeys)?r.A.LOADED:r.A.ERROR)}};a.addEventListener(n.A.CHANGE,t),i.loadingSourceTiles++}l===r.A.IDLE&&(a.extent=c.getTileCoordExtent(s),a.projection=e,a.resolution=c.getResolution(s[0]),this.sourceTileCache.set(o,a),a.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===r.A.ERROR))?r.A.ERROR:r.A.LOADED)}return i.sourceTiles}getTile(t,e,i,n,s){const o=(0,v.dp)(t,e,i),a=this.getKey();let l;if(this.tileCache.containsKey(o)&&(l=this.tileCache.get(o),l.key===a))return l;const h=[t,e,i];let c=this.getTileCoordForTileUrlFunction(h,s);const u=this.getTileGrid().getExtent(),d=this.getTileGridForProjection(s);if(c&&u){const e=d.getTileCoordExtent(c);(0,m.r)(e,-d.getResolution(t),e),(0,m.HY)(u,e)||(c=null)}let g=!0;if(null!==c){const e=this.tileGrid,i=d.getResolution(t),r=e.getZForResolution(i,1),o=d.getTileCoordExtent(c);(0,m.r)(o,-i,o),e.forEachTileCoord(o,r,(t=>{g=g&&!this.tileUrlFunction(t,n,s)}))}const _=new f(h,g?r.A.EMPTY:r.A.IDLE,c,this.getSourceTiles.bind(this,n,s));return _.key=a,l?(_.interimTile=l,_.refreshInterimChain(),this.tileCache.replace(o,_)):this.tileCache.set(o,_),_}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),s=n.map((function(e,i){return t.getOrigin(i)})),r=n.map((function(e,i){return t.getTileSize(i)})),o=p.L+1;for(let t=n.length;t{"use strict";i.d(e,{A:()=>u,t:()=>d});var n=i(8512),s=i(4465),r=i(915),o=i(6758),a=i(3407);class l extends o.A{constructor(t){super({extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes}),this.matrixIds_=t.matrixIds}getMatrixId(t){return this.matrixIds_[t]}getMatrixIds(){return this.matrixIds_}}var h=i(2654);class c extends n.A{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=(0,h.Uu)(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=(0,h.FD)(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction((0,h.FD)(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?(0,s.L)(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,o,a){if(!i)return;const l={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(l,r);let h=t;return h="KVP"==e?(0,s.L)(h,l):h.replace(/\{(\w+?)\}/g,(function(t,e){return l[e]})),h}}}const u=c;function d(t,e){const i=t.Contents.Layer,n=i?.find((function(t){return t.Identifier==e.layer}));if(!n)return null;const s=t.Contents.TileMatrixSet;let o;o=n.TileMatrixSetLink.length>1?"projection"in e?n.TileMatrixSetLink.findIndex((function(t){const i=s.find((function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,n=(0,a.Jt)(i),r=(0,a.Jt)(e.projection);return n&&r?(0,a.tI)(n,r):i==e.projection})):n.TileMatrixSetLink.findIndex((function(t){return t.TileMatrixSet==e.matrixSet})):0,o<0&&(o=0);const h=n.TileMatrixSetLink[o].TileMatrixSet,c=n.TileMatrixSetLink[o].TileMatrixSetLimits;let u=n.Format[0];"format"in e&&(u=e.format),o=n.Style.findIndex((function(t){return"style"in e?t.Title==e.style:t.isDefault})),o<0&&(o=0);const d=n.Style[o].Identifier,g={};"Dimension"in n&&n.Dimension.forEach((function(t,e,i){const n=t.Identifier;let s=t.Default;void 0===s&&(s=t.Value[0]),g[n]=s}));const _=t.Contents.TileMatrixSet.find((function(t){return t.Identifier==h}));let f;const p=_.SupportedCRS;if(p&&(f=(0,a.Jt)(p)),"projection"in e){const t=(0,a.Jt)(e.projection);t&&(f&&!(0,a.tI)(t,f)||(f=t))}let m=!1;const x="ne"==f.getAxisOrientation().substr(0,2);let v=_.TileMatrix[0],y={MinTileCol:0,MinTileRow:0,MaxTileCol:v.MatrixWidth-1,MaxTileRow:v.MatrixHeight-1};if(c){y=c[c.length-1];const t=_.TileMatrix.find((t=>t.Identifier===y.TileMatrix||_.Identifier+":"+t.Identifier===y.TileMatrix));t&&(v=t)}const E=28e-5*v.ScaleDenominator/f.getMetersPerUnit(),T=x?[v.TopLeftCorner[1],v.TopLeftCorner[0]]:v.TopLeftCorner,A=v.TileWidth*E,C=v.TileHeight*E;let S=_.BoundingBox;S&&x&&(S=[S[1],S[0],S[3],S[2]]);let R=[T[0]+A*y.MinTileCol,T[1]-C*(1+y.MaxTileRow),T[0]+A*(1+y.MaxTileCol),T[1]-C*y.MinTileRow];if(void 0!==S&&!(0,r.ms)(S,R)){const t=n.WGS84BoundingBox,e=(0,a.Jt)("EPSG:4326").getExtent();if(R=S,t)m=t[0]===e[0]&&t[2]===e[2];else{const t=(0,a.DI)(S,_.SupportedCRS,"EPSG:4326");m=t[0]-1e-10<=e[0]&&t[2]+1e-10>=e[2]}}const w=function(t,e,i){const n=[],s=[],r=[],o=[],h=[];i=void 0!==i?i:[];const c="TileMatrix",u="Identifier",d="ScaleDenominator",g="TopLeftCorner",_=t.SupportedCRS,f=(0,a.Jt)(_),p=f.getMetersPerUnit(),m="ne"==f.getAxisOrientation().substr(0,2);return t[c].sort((function(t,e){return e[d]-t[d]})),t[c].forEach((function(e){let a;if(a=!(i.length>0)||i.find((function(i){return e[u]==i[c]||!e[u].includes(":")&&t[u]+":"+e[u]===i[c]})),a){s.push(e[u]);const t=28e-5*e[d]/p,i=e.TileWidth,a=e.TileHeight;m?r.push([e[g][1],e[g][0]]):r.push(e[g]),n.push(t),o.push(i==a?i:[i,a]),h.push([e.MatrixWidth,e.MatrixHeight])}})),new l({extent:e,origins:r,resolutions:n,matrixIds:s,tileSizes:o,sizes:h})}(_,R,c),b=[];let I=e.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata){const e=t.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let t=0,i=e.length;t{"use strict";i.d(e,{A:()=>o});var n=i(8512),s=i(4863);class r extends n.A{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:(0,s.EN)({extent:(0,s.kZ)(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:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}const o=r},2192:(t,e,i)=>{"use strict";i.d(e,{B:()=>n});const n=4},7500:(t,e,i)=>{"use strict";i.d(e,{$q:()=>x,AE:()=>_,Eq:()=>p,W3:()=>f,jD:()=>u,y4:()=>m});var n=i(2192),s=i(4465),r=i(2806),o=i(3938),a=i(1597),l=i(915),h=i(3407),c=i(9925);const u="1.3.0",d=[101,101];function g(t,e,i,n,o){o.WIDTH=i[0],o.HEIGHT=i[1];const a=n.getAxisOrientation();let l;const h=(0,r.Z)(o.VERSION,"1.3")>=0;return o[h?"CRS":"SRS"]=n.getCode(),l=h&&"ne"==a.substr(0,2)?[e[1],e[0],e[3],e[2]]:e,o.BBOX=l.join(","),(0,s.L)(t,o)}function _(t,e,i,s,r,o,h){o=Object.assign({REQUEST:"GetMap"},o);const c=e/i,u=[(0,a.LI)((0,l.RG)(t)/c,n.B),(0,a.LI)((0,l.Oq)(t)/c,n.B)];if(1!=i)switch(h){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+t:o.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:throw new Error("Unknown `serverType` configured")}return g(r,t,u,s,o)}function f(t,e){return Object.assign({REQUEST:e,SERVICE:"WMS",VERSION:u,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},t)}function p(t){const e=void 0===t.hidpi||t.hidpi,i=(0,h.Jt)(t.projection||"EPSG:3857"),n=t.ratio||1.5,s=t.load||o.D4;return(r,o,a)=>{r=(0,c.QD)(r,o,a,n),1==a||e&&void 0!==t.serverType||(a=1);const l=_(r,o,a,i,t.url,f(t.params,"GetMap"),t.serverType),h=new Image;return null!==t.crossOrigin&&(h.crossOrigin=t.crossOrigin),s(h,l).then((t=>({image:t,extent:r,pixelRatio:a})))}}function m(t,e,i){if(void 0===t.url)return;const s=(0,h.Jt)(t.projection||"EPSG:3857"),o=(0,l.Bg)(e,i,0,d),c={QUERY_LAYERS:t.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(c,f(t.params,"GetFeatureInfo"),t.params);const u=(0,a.RI)((e[0]-o[0])/i,n.B),_=(0,a.RI)((o[3]-e[1])/i,n.B),p=(0,r.Z)(c.VERSION,"1.3")>=0;return c[p?"I":"X"]=u,c[p?"J":"Y"]=_,g(t.url,o,d,s,c)}function x(t,e){if(void 0===t.url)return;const i={SERVICE:"WMS",VERSION:u,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===t.params||void 0===t.params.LAYER){const e=t.params.LAYERS;if(Array.isArray(e)&&1!==e.length)return;i.LAYER=e}if(void 0!==e){const n=(0,h.Jt)(t.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;i.SCALE=e*n/s}return Object.assign(i,t.params),(0,s.L)(t.url,i)}},2490:(t,e,i)=>{"use strict";i.d(e,{Yf:()=>r,cY:()=>o});var n=i(1597);const s=6371008.8;function r(t,e,i){i=i||s;const r=(0,n.eh)(t[1]),o=(0,n.eh)(e[1]),a=(o-r)/2,l=(0,n.eh)(e[0]-t[0])/2,h=Math.sin(a)*Math.sin(a)+Math.sin(l)*Math.sin(l)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function o(t,e,i,r){r=r||s;const o=(0,n.eh)(t[1]),a=(0,n.eh)(t[0]),l=e/r,h=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(i)),c=a+Math.atan2(Math.sin(i)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(h));return[(0,n.xW)(c),(0,n.xW)(h)]}},2806:(t,e,i)=>{"use strict";function n(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let s=n.indexOf(".");return s=-1===s?n.length:s,s>e?n:new Array(1+e-s).join("0")+n}function s(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;ts)return 1;if(s>e)return-1}return 0}i.d(e,{H:()=>n,Z:()=>s})},4969:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(588);const s=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return(0,n.v)(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return(0,n.v)(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,n.v)(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}},5902:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(5341),s=i(915),r=i(4087),o=i(3530);const a=class{constructor(t){this.rbush_=new n(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.v6)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n{"use strict";i.d(e,{A:()=>r});var n=i(6936);class s extends n.A{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new s({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const r=s},3628:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(6141),s=i(7907);class r{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){const e=(0,s.J)(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then((()=>{this.patternImage_=null})),e.getImageState()===n.A.IDLE&&e.load(),e.getImageState()===n.A.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const o=r},9700:(t,e,i)=>{"use strict";i.d(e,{A:()=>d});var n=i(6837),s=i(6141),r=i(940),o=i(3730),a=i(588),l=i(7907),h=i(4087);function c(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class u extends r.A{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,r=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const u=void 0!==t.img?t.img:null;let d,g=t.src;if((0,a.v)(!(void 0!==g&&u),"`image` and `src` cannot be provided at the same time"),void 0!==g&&0!==g.length||!u||(g=u.src||(0,h.v6)(u)),(0,a.v)(void 0!==g&&g.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,a.v)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?d=s.A.IDLE:void 0!==u&&(d="complete"in u?u.complete?u.src?s.A.LOADED:s.A.IDLE:s.A.LOADING:s.A.LOADED),this.color_=void 0!==t.color?(0,o._j)(t.color):null,this.iconImage_=(0,l.J)(u,g,this.crossOrigin_,d,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(c(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(c(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new u({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(n.A.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(n.A.CHANGE,t)}ready(){return this.iconImage_.ready()}}const d=u},7907:(t,e,i)=>{"use strict";i.d(e,{J:()=>d});var n=i(9332),s=i(6837),r=i(6141),o=i(3730),a=i(8711),l=i(3938),h=i(2241);let c=null;class u extends n.A{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?r.A.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===r.A.LOADED){c||(c=(0,a.Y)(1,1,void 0,{willReadFrequently:!0})),c.drawImage(this.image_,0,0);try{c.getImageData(0,0,1,1),this.tainted_=!1}catch(t){c=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(s.A.CHANGE)}handleImageError_(){this.imageState_=r.A.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=r.A.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,a.Y)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===r.A.IDLE){this.image_||this.initializeImage_(),this.imageState_=r.A.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(0,l.RA)(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==r.A.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,o.oJ)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}ready(){return this.ready_||(this.ready_=new Promise((t=>{this.imageState_===r.A.LOADED||this.imageState_===r.A.ERROR?t():this.addEventListener(s.A.CHANGE,(function e(){this.imageState_!==r.A.LOADED&&this.imageState_!==r.A.ERROR||(this.removeEventListener(s.A.CHANGE,e),t())}))}))),this.ready_}}function d(t,e,i,n,s,r){let o=void 0===e?void 0:h.ue.get(e,i,s);return o||(o=new u(t,t&&"src"in t?t.src||void 0:e,i,n,s),h.ue.set(e,i,s,o,r)),r&&o&&!h.ue.getPattern(e,i,s)&&h.ue.set(e,i,s,o,r),o}},2241:(t,e,i)=>{"use strict";i.d(e,{ue:()=>a});var n=i(6141),s=i(3730),r=i(8711);function o(t,e,i){return e+":"+t+":"+(i?(0,s._j)(i):"null")}const a=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const n=o(t,e,i);return n in this.cache_?this.cache_[n]:null}getPattern(t,e,i){const n=o(t,e,i);return n in this.patternCache_?this.patternCache_[n]:null}set(t,e,i,s,a){const l=o(t,e,i),h=l in this.cache_;this.cache_[l]=s,a&&(s.getImageState()===n.A.IDLE&&s.load(),s.getImageState()===n.A.LOADING?s.ready().then((()=>{this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")})):this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")),h||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}},940:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(4087),s=i(4401);class r{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.b0)()}getImage(t){return(0,n.b0)()}getHitDetectionImage(){return(0,n.b0)()}getPixelRatio(t){return 1}getImageState(){return(0,n.b0)()}getImageSize(){return(0,n.b0)()}getOrigin(){return(0,n.b0)()}getSize(){return(0,n.b0)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(t)}listenImageChange(t){(0,n.b0)()}load(){(0,n.b0)()}unlistenImageChange(t){(0,n.b0)()}ready(){return Promise.resolve()}}const o=r},6936:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var n=i(6141),s=i(940),r=i(3730),o=i(7295),a=i(8711),l=i(8774);class h extends s.A{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?n.A.LOADING:n.A.LOADED,this.imageState_===n.A.LOADING&&this.ready().then((()=>this.imageState_=n.A.LOADED)),this.render()}clone(){const t=this.getScale(),e=new h({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,n=(0,a.Y)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n{"use strict";i.d(e,{A:()=>s});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const s=n},9276:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>g,d1:()=>c,mC:()=>l,mY:()=>u});var n=i(7733),s=i(3628),r=i(953),o=i(588);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=d,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new a({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=d,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,o.v)("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}let h=null;function c(t,e){if(!h){const t=new s.A({color:"rgba(255,255,255,0.4)"}),e=new r.A({color:"#3399CC",width:1.25});h=[new a({image:new n.A({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return h}function u(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new a({fill:new s.A({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new a({stroke:new r.A({color:e,width:5})}),new a({stroke:new r.A({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new a({image:new n.A({radius:6,fill:new s.A({color:i}),stroke:new r.A({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function d(t){return t.getGeometry()}const g=a},1426:(t,e,i)=>{"use strict";i.d(e,{A:()=>o});var n=i(3628),s=i(4401);class r{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new n.A({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const o=r},186:(t,e,i)=>{"use strict";function n(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function s(t,e,i){return t+"/"+e+"/"+i}function r(t){return s(t[0],t[1],t[2])}function o(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return s(e,i,n)}function a(t){return t.split("/").map(Number)}function l(t){return(t[1]<i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}i.d(e,{K:()=>a,N:()=>n,N5:()=>h,dp:()=>s,gr:()=>o,i7:()=>r,tW:()=>l})},4863:(t,e,i)=>{"use strict";i.d(e,{EN:()=>c,Li:()=>h,kZ:()=>d,pr:()=>l});var n=i(6758),s=i(9496),r=i(3407),o=i(915),a=i(4401);function l(t){let e=t.getDefaultTileGrid();return e||(e=function(t,e,i,s){return function(t,e,i,s){s=void 0!==s?s:"top-left";const r=u(t,e,i);return new n.A({extent:t,origin:(0,o.qF)(t,s),resolutions:r,tileSize:i})}(d(t),void 0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function h(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),r=d(i);if(!(0,o.Ym)(r,s)){const e=(0,o.RG)(r),i=Math.ceil((r[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}function c(t){const e=t||{},i=e.extent||(0,r.Jt)("EPSG:3857").getExtent(),s={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:u(i,e.maxZoom,e.tileSize,e.maxResolution)};return new n.A(s)}function u(t,e,i,n){e=void 0!==e?e:s.L,i=(0,a.xq)(void 0!==i?i:s.R);const r=(0,o.Oq)(t),l=(0,o.RG)(t);n=n>0?n:Math.max(l/i[0],r/i[1]);const h=e+1,c=new Array(h);for(let t=0;t{"use strict";i.d(e,{A:()=>g});var n=i(1110),s=i(9496),r=i(588),o=i(1597),a=i(915),l=i(186),h=i(4350),c=i(6514),u=i(4401);const d=[0,0,0],g=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,r.v)((0,c.WC)(this.resolutions_,((t,e)=>e-t),!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,i=this.resolutions_.length-1;t{const s=new n.A(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);s.minX=Math.max(t.minX,s.minX),s.maxX=Math.min(t.maxX,s.maxX),s.minY=Math.max(t.minY,s.minY),s.maxY=Math.min(t.maxY,s.maxY)}return s})):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,r=n.maxY;s<=r;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,h=t[0]-1;for(2===this.zoomFactor_?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(void 0!==o&&void 0!==a?(o=Math.floor(o/2),a=Math.floor(a/2),r=(0,n.N)(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,h,i),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e{"use strict";i.d(e,{L:()=>n,R:()=>s});const n=42,s=256},2654:(t,e,i)=>{"use strict";i.d(e,{FD:()=>a,Qz:()=>o,Uu:()=>l});var n=i(1597),s=i(186);function r(t,e){const i=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(o,a,l){if(o)return t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(s,o[2].toString()).replace(r,(function(){const t=o[0],i=e.getFullTileRange(t);if(!i)throw new Error("The {-y} placeholder requires a tile grid with extent");return(i.getHeight()-o[2]-1).toString()}))}}function o(t,e){const i=t.length,n=new Array(i);for(let s=0;s{"use strict";i.d(e,{Bb:()=>c,T9:()=>f,Tl:()=>g,Zz:()=>_,cL:()=>o,dI:()=>m,e$:()=>u,hs:()=>d,k3:()=>h,lw:()=>a,vt:()=>r});var n=i(588);const s=new Array(6);function r(){return[1,0,0,1,0,0]}function o(t){return l(t,1,0,0,1,0,0)}function a(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],g=e[5];return t[0]=i*l+s*h,t[1]=n*l+r*h,t[2]=i*c+s*u,t[3]=n*c+r*u,t[4]=i*d+s*g+o,t[5]=n*d+r*g+a,t}function l(t,e,i,n,s,r,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=r,t[5]=o,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function c(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function u(t,e){const i=Math.cos(e),n=Math.sin(e);return a(t,l(s,i,n,-n,i,0,0))}function d(t,e,i){return a(t,l(s,e,0,0,i,0,0))}function g(t,e,i){return a(t,l(s,1,0,0,1,e,i))}function _(t,e,i,n,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=o*n*h-a*n*l+e,t[5]=o*s*l+a*s*h+i,t}function f(t,e){const i=(s=e)[0]*s[3]-s[1]*s[2];var s;(0,n.v)(0!==i,"Transformation matrix cannot be inverted");const r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5];return t[0]=l/i,t[1]=-o/i,t[2]=-a/i,t[3]=r/i,t[4]=(a*c-l*h)/i,t[5]=-(r*c-o*h)/i,t}const p=[1e6,1e6,1e6,1e6,2,2];function m(t){return"matrix("+t.map(((t,e)=>Math.round(t*p[e])/p[e])).join(", ")+")"}},4465:(t,e,i)=>{"use strict";function n(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}i.d(e,{L:()=>n})},3954:(t,e,i)=>{"use strict";function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}i.d(e,{Z:()=>s,v:()=>n})},130:(t,e,i)=>{"use strict";i.d(e,{Be:()=>l,Ek:()=>a,H7:()=>s,IP:()=>r,JL:()=>c,SD:()=>_,Ss:()=>o,UD:()=>u,l4:()=>h,zH:()=>d});var n=i(7771);const s=34962,r=34963,o=35040,a=35044,l=35048,h=5121,c=5123,u=5125,d=5126,g=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function _(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!n.oF},e);const i=g.length;for(let n=0;n{"use strict";i.d(e,{Ay:()=>a});var n=i(130),s=i(588);const r={STATIC_DRAW:n.Ek,STREAM_DRAW:n.Ss,DYNAMIC_DRAW:n.Be};function o(t){switch(t){case n.H7:return Float32Array;case n.IP:return Uint32Array;default:return Float32Array}}const a=class{constructor(t,e){this.array_=null,this.type_=t,(0,s.v)(t===n.H7||t===n.IP,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==e?e:r.STATIC_DRAW}ofSize(t){return this.array_=new(o(this.type_))(t),this}fromArray(t){return this.array_=o(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(o(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}},9777:(t,e,i)=>{"use strict";i.d(e,{jQ:()=>g,M8:()=>d,Ay:()=>v});const n="webglcontextlost",s="webglcontextrestored";var r=i(25),o=i(4087);const a=class{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),e.compileShader(i);const n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n precision mediump float;\n \n uniform sampler2D u_image;\n uniform float u_opacity;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((i=>{this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}))}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const t=0,n=e.RGBA,s=0,r=e.RGBA,o=e.UNSIGNED_BYTE,a=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,t,n,i[0],i[1],s,r,o,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i[0],i[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,i,n){const s=this.getGL(),r=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const e=(0,o.v6)(s.canvas);if(!t.renderTargets[e]){const i=s.getContextAttributes();i&&i.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[e]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,r[0],r[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(t),i&&i(s,t),s.drawArrays(s.TRIANGLES,0,6),n&&n(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let i,n=1;this.uniforms_.forEach((function(s){if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(s.location,n++);else if(Array.isArray(i))switch(i.length){case 2:return void e.uniform2f(s.location,i[0],i[1]);case 3:return void e.uniform3f(s.location,i[0],i[1],i[2]);case 4:return void e.uniform4f(s.location,i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(s.location,i)}))}};var l=i(130),h=i(3530),c=i(9703),u=i(3954);const d={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},g={UNSIGNED_BYTE:l.l4,UNSIGNED_SHORT:l.JL,UNSIGNED_INT:l.UD,FLOAT:l.zH},_={};function f(t){return"shared/"+t}let p=0;class m extends r.A{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?f(t.canvasCacheKey):function(){const t="unique/"+p;return p+=1,t}(),this.gl_=function(t){let e=_[t];if(!e){const i=document.createElement("canvas");i.width=1,i.height=1,i.style.position="absolute",i.style.left="0",e={users:0,context:(0,l.SD)(i)},_[t]=e}return e.users+=1,e.context}(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(n,this.boundHandleWebGLContextLost_),e.addEventListener(s,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=(0,c.vt)(),this.offsetScaleMatrix_=(0,c.vt)(),this.tmpMat4_=(0,u.v)(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map((t=>new a({webGlContext:this.gl_,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms}))):[new a({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===f(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,i=(0,o.v6)(t);let n=this.bufferCache_[i];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[i]=n),e.bindBuffer(t.getType(),n.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,i=(0,o.v6)(t),n=this.bufferCache_[i];n&&!e.isContextLost()&&e.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(n,this.boundHandleWebGLContextLost_),t.removeEventListener(s,this.boundHandleWebGLContextRestored_),function(t){const e=_[t];if(!e)return;if(e.users-=1,e.users>0)return;const i=e.context,n=i.getExtension("WEBGL_lose_context");n&&n.loseContext();const s=i.canvas;s.width=1,s.height=1,delete _[t]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,i){const n=this.gl_,s=this.getCanvas(),r=t.size,o=t.pixelRatio;s.width===r[0]*o&&s.height===r[1]*o||(s.width=r[0]*o,s.height=r[1]*o,s.style.width=r[0]+"px",s.style.height=r[1]+"px");for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.depthRange(0,1),n.clearDepth(1),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),i?(n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL)):n.disable(n.DEPTH_TEST)}bindTexture(t,e,i){const n=this.gl_;n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(this.getUniformLocation(i),e)}prepareDrawToRenderTarget(t,e,i,n){const s=this.gl_,r=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,r[0],r[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,i?s.ZERO:s.ONE_MINUS_SRC_ALPHA),n?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const i=this.gl_;this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,s=e-t,r=4*t;i.drawElements(i.TRIANGLES,s,n,r)}finalizeDraw(t,e,i){for(let n=0,s=this.postProcessPasses_.length;n{if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData||i instanceof WebGLTexture){i instanceof WebGLTexture&&!s.texture?(s.prevValue=void 0,s.texture=i):s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,n,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const t=!(i instanceof HTMLImageElement)||i.complete;i instanceof WebGLTexture||!t||s.prevValue===i||(s.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),n++}else if(Array.isArray(i)&&6===i.length)this.setUniformMatrixValue(s.name,(0,u.Z)(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:return void e.uniform2f(this.getUniformLocation(s.name),i[0],i[1]);case 3:return void e.uniform3f(this.getUniformLocation(s.name),i[0],i[1],i[2]);case 4:return void e.uniform4f(this.getUniformLocation(s.name),i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(this.getUniformLocation(s.name),i)}))}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.gl_,n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}getProgram(t,e){const i=this.gl_,n=this.compileShader(t,i.FRAGMENT_SHADER),s=this.compileShader(e,i.VERTEX_SHADER),r=i.createProgram();if(i.attachShader(r,n),i.attachShader(r,s),i.linkProgram(r),!i.getShaderParameter(n,i.COMPILE_STATUS)){const t=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(t)}if(i.deleteShader(n),!i.getShaderParameter(s,i.COMPILE_STATUS)){const t=`Vertex shader compilation failed: ${i.getShaderInfoLog(s)}`;throw new Error(t)}if(i.deleteShader(s),!i.getProgramParameter(r,i.LINK_STATUS)){const t=`GL program linking failed: ${i.getProgramInfoLog(r)}`;throw new Error(t)}return r}getUniformLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[e]&&(this.uniformLocationsByProgram_[e]={}),void 0===this.uniformLocationsByProgram_[e][t]&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.attribLocationsByProgram_[e]&&(this.attribLocationsByProgram_[e]={}),void 0===this.attribLocationsByProgram_[e][t]&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const i=t.size,n=t.viewState.rotation,s=t.viewState.resolution,r=t.viewState.center;return(0,c.Zz)(e,0,0,2/(s*i[0]),2/(s*i[1]),-n,-r[0],-r[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,n,s){const r=this.getAttributeLocation(t);r<0||(this.gl_.enableVertexAttribArray(r),this.gl_.vertexAttribPointer(r,e,i,!1,n,s))}enableAttributes(t){const e=function(t){let e=0;for(let i=0;i{i.read=function(t,i,e,r,s){var n,o,a=8*s-r-1,h=(1<>1,f=-7,l=e?s-1:0,d=e?-1:1,p=t[i+l];for(l+=d,n=p&(1<<-f)-1,p>>=-f,f+=a;f>0;n=256*n+t[i+l],l+=d,f-=8);for(o=n&(1<<-f)-1,n>>=-f,f+=r;f>0;o=256*o+t[i+l],l+=d,f-=8);if(0===n)n=1-u;else{if(n===h)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),n-=u}return(p?-1:1)*o*Math.pow(2,n-r)},i.write=function(t,i,e,r,s,n){var o,a,h,u=8*n-s-1,f=(1<>1,d=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:n-1,c=r?1:-1,w=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(a=isNaN(i)?1:0,o=f):(o=Math.floor(Math.log(i)/Math.LN2),i*(h=Math.pow(2,-o))<1&&(o--,h*=2),(i+=o+l>=1?d/h:d*Math.pow(2,1-l))*h>=2&&(o++,h/=2),o+l>=f?(a=0,o=f):o+l>=1?(a=(i*h-1)*Math.pow(2,s),o+=l):(a=i*Math.pow(2,l-1)*Math.pow(2,s),o=0));s>=8;t[e+p]=255&a,p+=c,a/=256,s-=8);for(o=o<0;t[e+p]=255&o,p+=c,o/=256,u-=8);t[e+p-c]|=128*w}},5335:(t,i,e)=>{"use strict";t.exports=s;var r=e(251);function s(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}s.Varint=0,s.Fixed64=1,s.Bytes=2,s.Fixed32=5;var n=4294967296,o=1/n,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function h(t){return t.type===s.Bytes?t.readVarint()+t.pos:t.pos+1}function u(t,i,e){return e?4294967296*i+(t>>>0):4294967296*(i>>>0)+(t>>>0)}function f(t,i,e){var r=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));e.realloc(r);for(var s=e.pos-1;s>=t;s--)e.buf[s+r]=e.buf[s]}function l(t,i){for(var e=0;e>>8,t[e+2]=i>>>16,t[e+3]=i>>>24}function P(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+(t[i+3]<<24)}s.prototype={destroy:function(){this.buf=null},readFields:function(t,i,e){for(e=e||this.length;this.pos>3,n=this.pos;this.type=7&r,t(s,i,this),this.pos===n&&this.skip(r)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=v(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=P(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=v(this.buf,this.pos)+v(this.buf,this.pos+4)*n;return this.pos+=8,t},readSFixed64:function(){var t=v(this.buf,this.pos)+P(this.buf,this.pos+4)*n;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var i,e,r=this.buf;return i=127&(e=r[this.pos++]),e<128?i:(i|=(127&(e=r[this.pos++]))<<7,e<128?i:(i|=(127&(e=r[this.pos++]))<<14,e<128?i:(i|=(127&(e=r[this.pos++]))<<21,e<128?i:function(t,i,e){var r,s,n=e.buf;if(r=(112&(s=n[e.pos++]))>>4,s<128)return u(t,r,i);if(r|=(127&(s=n[e.pos++]))<<3,s<128)return u(t,r,i);if(r|=(127&(s=n[e.pos++]))<<10,s<128)return u(t,r,i);if(r|=(127&(s=n[e.pos++]))<<17,s<128)return u(t,r,i);if(r|=(127&(s=n[e.pos++]))<<24,s<128)return u(t,r,i);if(r|=(1&(s=n[e.pos++]))<<31,s<128)return u(t,r,i);throw new Error("Expected varint not more than 10 bytes")}(i|=(15&(e=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,i=this.pos;return this.pos=t,t-i>=12&&a?function(t,i,e){return a.decode(t.subarray(i,e))}(this.buf,i,t):function(t,i,e){for(var r="",s=i;s239?4:h>223?3:h>191?2:1;if(s+f>e)break;1===f?h<128&&(u=h):2===f?128==(192&(n=t[s+1]))&&(u=(31&h)<<6|63&n)<=127&&(u=null):3===f?(n=t[s+1],o=t[s+2],128==(192&n)&&128==(192&o)&&((u=(15&h)<<12|(63&n)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===f&&(n=t[s+1],o=t[s+2],a=t[s+3],128==(192&n)&&128==(192&o)&&128==(192&a)&&((u=(15&h)<<18|(63&n)<<12|(63&o)<<6|63&a)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,f=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),s+=f}return r}(this.buf,i,t)},readBytes:function(){var t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i},readPackedVarint:function(t,i){if(this.type!==s.Bytes)return t.push(this.readVarint(i));var e=h(this);for(t=t||[];this.pos127;);else if(i===s.Bytes)this.pos=this.readVarint()+this.pos;else if(i===s.Fixed32)this.pos+=4;else{if(i!==s.Fixed64)throw new Error("Unimplemented type: "+i);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i268435455||t<0?function(t,i){var e,r;if(t>=0?(e=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(e=~(-t%4294967296))?e=e+1|0:(e=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");i.realloc(10),function(t,i,e){e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos]=127&t}(e,0,i),function(t,i){var e=(7&t)<<4;i.buf[i.pos++]|=e|((t>>>=3)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),t&&(i.buf[i.pos++]=127&t)))))}(r,i)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var i=this.pos;this.pos=function(t,i,e){for(var r,s,n=0;n55295&&r<57344){if(!s){r>56319||n+1===i.length?(t[e++]=239,t[e++]=191,t[e++]=189):s=r;continue}if(r<56320){t[e++]=239,t[e++]=191,t[e++]=189,s=r;continue}r=s-55296<<10|r-56320|65536,s=null}else s&&(t[e++]=239,t[e++]=191,t[e++]=189,s=null);r<128?t[e++]=r:(r<2048?t[e++]=r>>6|192:(r<65536?t[e++]=r>>12|224:(t[e++]=r>>18|240,t[e++]=r>>12&63|128),t[e++]=r>>6&63|128),t[e++]=63&r|128)}return e}(this.buf,t,this.pos);var e=this.pos-i;e>=128&&f(i,e,this),this.pos=i-1,this.writeVarint(e),this.pos+=e},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e=128&&f(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,i,e){this.writeTag(t,s.Bytes),this.writeRawMessage(i,e)},writePackedVarint:function(t,i){i.length&&this.writeMessage(t,l,i)},writePackedSVarint:function(t,i){i.length&&this.writeMessage(t,d,i)},writePackedBoolean:function(t,i){i.length&&this.writeMessage(t,w,i)},writePackedFloat:function(t,i){i.length&&this.writeMessage(t,p,i)},writePackedDouble:function(t,i){i.length&&this.writeMessage(t,c,i)},writePackedFixed32:function(t,i){i.length&&this.writeMessage(t,g,i)},writePackedSFixed32:function(t,i){i.length&&this.writeMessage(t,y,i)},writePackedFixed64:function(t,i){i.length&&this.writeMessage(t,b,i)},writePackedSFixed64:function(t,i){i.length&&this.writeMessage(t,F,i)},writeBytesField:function(t,i){this.writeTag(t,s.Bytes),this.writeBytes(i)},writeFixed32Field:function(t,i){this.writeTag(t,s.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(t,i){this.writeTag(t,s.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(t,i){this.writeTag(t,s.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(t,i){this.writeTag(t,s.Fixed64),this.writeSFixed64(i)},writeVarintField:function(t,i){this.writeTag(t,s.Varint),this.writeVarint(i)},writeSVarintField:function(t,i){this.writeTag(t,s.Varint),this.writeSVarint(i)},writeStringField:function(t,i){this.writeTag(t,s.Bytes),this.writeString(i)},writeFloatField:function(t,i){this.writeTag(t,s.Fixed32),this.writeFloat(i)},writeDoubleField:function(t,i){this.writeTag(t,s.Fixed64),this.writeDouble(i)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}}},8217:(t,i,e)=>{"use strict";e.d(i,{Ay:()=>w,Bs:()=>b,hX:()=>g,te:()=>F});var r=e(6717),s=e(4778),n=e(4294),o=e(1217),a=e(1064),h=e(503),u=e(6702),f=e(2871),l=e(4338),d=e(4087),p=e(3407),c=e(3402);const w=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=r.A,this.supportedMediaTypes=null}getReadOptions(t,i){if(i){let e=i.dataProjection?(0,p.Jt)(i.dataProjection):this.readProjection(t);i.extent&&e&&"tile-pixels"===e.getUnits()&&(e=(0,p.Jt)(e),e.setWorldExtent(i.extent)),i={dataProjection:e,featureProjection:i.featureProjection}}return this.adaptOptions(i)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return(0,d.b0)()}readFeature(t,i){return(0,d.b0)()}readFeatures(t,i){return(0,d.b0)()}readGeometry(t,i){return(0,d.b0)()}readProjection(t){return(0,d.b0)()}writeFeature(t,i){return(0,d.b0)()}writeFeatures(t,i){return(0,d.b0)()}writeGeometry(t,i){return(0,d.b0)()}};function g(t,i,e){const r=e?(0,p.Jt)(e.featureProjection):null,s=e?(0,p.Jt)(e.dataProjection):null;let n=t;if(r&&s&&!(0,p.tI)(r,s)){i&&(n=t.clone());const e=i?r:s,o=i?s:r;"tile-pixels"===e.getUnits()?n.transform(e,o):n.applyTransform((0,p.RG)(e,o))}if(i&&e&&void 0!==e.decimals){const i=Math.pow(10,e.decimals),r=function(t){for(let e=0,r=t.length;eb({...t,geometry:i}))).flat();const r="MultiPolygon"===e.type?"Polygon":e.type;if("GeometryCollection"===r||"Circle"===r)throw new Error("Unsupported geometry type: "+r);const n=e.layout.length;return g(new s.Ay(r,"Polygon"===r?function(t,i,e){return Array.isArray(i[0])?((0,c.mb)(t,0,i,e)||(t=t.slice(),(0,c.NK)(t,0,i,e)),t):((0,c.PA)(t,0,i,e)||(t=t.slice(),(0,c.ug)(t,0,i,e)),t)}(e.flatCoordinates,e.ends,n):e.flatCoordinates,e.ends?.flat(),n,t.properties||{},t.id).enableSimplifyTransformed(),!1,i)}function F(t,i){if(!t)return null;if(Array.isArray(t)){const e=t.map((t=>F(t,i)));return new l.A(e)}return g(new(0,y[t.type])(t.flatCoordinates,t.layout,t.ends),!1,i)}}}]); \ No newline at end of file diff --git a/6025.bundle.js b/6025.bundle.js index 82c18164..29145b4b 100644 --- a/6025.bundle.js +++ b/6025.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6025],{783:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(1601),o=n.n(a),r=n(6314),s=n.n(r)()(o());s.push([e.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const l=s},7601:(e,t,n)=>{var a=n(5072),o=n.n(a),r=n(7825),s=n.n(r),l=n(7659),i=n.n(l),p=n(5056),m=n.n(p),c=n(540),u=n.n(c),g=n(1113),d=n.n(g),h=n(783),x={};x.styleTagTransform=d(),x.setAttributes=m(),x.insert=i().bind(null,"head"),x.domAPI=s(),x.insertStyleElement=u(),o()(h.A,x),h.A&&h.A.locals&&h.A.locals},6025:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var a=n(6540),o=n(3407),r=n(1365),s=n(7240),l=n(2381),i=(n(5045),n(7601),n(6717));const p=a.createElement("button",null,"☰");function m(){return a.createElement("div",null,a.createElement("p",null,"Use the layers controls in the upper right corner to switch the active layer"),a.createElement(s.f9,{className:"example-map",initial:{center:(0,o.Rb)([2.364,48.82]),zoom:7}},a.createElement(s.E6.bc,{element:p},a.createElement(s.ej,{properties:{label:"OpenStreetMap"}}),a.createElement(s.HS,{properties:{label:"OpenTopo"},url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}),a.createElement(s.HS,{properties:{label:"Transport"},url:"http://tile.thunderforest.com/transport/{z}/{x}/{y}.png"}),a.createElement(l.A,{properties:{label:"Stadia Terrain Background"},layer:"stamen_terrain_background"}),a.createElement(s.QN,{properties:{label:"Mapbox TileJSON"},url:"https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1"}),a.createElement(s.Tw,{properties:{label:"Magellium OSM France Schools WMS"},url:"https://magosm.magellium.com/geoserver/ows",params:{LAYERS:"magosm:france_schools_point",FORMAT:"image/jpeg"}}),a.createElement(s.Ff,{properties:{label:"Switzerland ArcGIS TileWMS"},url:"https://wms.geo.admin.ch/",params:{LAYERS:"ch.swisstopo.pixelkarte-farbe-pk1000.noscale",FORMAT:"image/jpeg",serverType:"mapserver"}})),a.createElement(s.j9,{zIndex:5,format:new r.A({featureProjection:"EPSG:3857",featureClass:i.A}),url:"https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"},a.createElement(s.cq.RStyle,null,a.createElement(s.cq.RStroke,{color:"#007bff",width:3}),a.createElement(s.cq.RFill,{color:"transparent"})))))}},2381:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(945),o=n(5042),r=n(2662);class s extends r.A{constructor(e,t){var n;super(e,t),this.source=new o.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new a.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(702),o=n(7896);const r={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class l extends a.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),a=s[n]||{minZoom:0,maxZoom:20,retina:!0},l=r[e.layer],i=e.apiKey?"?api_key="+e.apiKey:"",p=a.retina&&e.retina?"@2x":"",m=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+p+"."+l.extension+i,c=['© Stadia Maps','© OpenMapTiles',o.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:a.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:a.minZoom,opaque:l.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:m,tilePixelRatio:p?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const i=l}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6025],{783:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(1601),a=n.n(r),o=n(6314),s=n.n(o)()(a());s.push([e.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const l=s},7601:(e,t,n)=>{var r=n(5072),a=n.n(r),o=n(7825),s=n.n(o),l=n(7659),i=n.n(l),m=n(5056),p=n.n(m),c=n(540),u=n.n(c),g=n(1113),d=n.n(g),h=n(783),x={};x.styleTagTransform=d(),x.setAttributes=p(),x.insert=i().bind(null,"head"),x.domAPI=s(),x.insertStyleElement=u(),a()(h.A,x),h.A&&h.A.locals&&h.A.locals},6025:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(6540),a=n(3407),o=n(1365),s=n(7240),l=n(2381),i=(n(5045),n(7601),n(6717));const m=r.createElement("button",null,"☰");function p(){return r.createElement("div",null,r.createElement("p",null,"Use the layers controls in the upper right corner to switch the active layer"),r.createElement(s.f9,{className:"example-map",initial:{center:(0,a.Rb)([2.364,48.82]),zoom:7}},r.createElement(s.E6.bc,{element:m},r.createElement(s.ej,{properties:{label:"OpenStreetMap"}}),r.createElement(s.HS,{properties:{label:"OpenTopo"},url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}),r.createElement(s.HS,{properties:{label:"Transport"},url:"http://tile.thunderforest.com/transport/{z}/{x}/{y}.png"}),r.createElement(l.A,{properties:{label:"Stadia Terrain Background"},layer:"stamen_terrain_background"}),r.createElement(s.QN,{properties:{label:"Mapbox TileJSON"},url:"https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1"}),r.createElement(s.Tw,{properties:{label:"Magellium OSM France Schools WMS"},url:"https://magosm.magellium.com/geoserver/ows",params:{LAYERS:"magosm:france_schools_point",FORMAT:"image/jpeg"}}),r.createElement(s.Ff,{properties:{label:"Switzerland ArcGIS TileWMS"},url:"https://wms.geo.admin.ch/",params:{LAYERS:"ch.swisstopo.pixelkarte-farbe-pk1000.noscale",FORMAT:"image/jpeg",serverType:"mapserver"}})),r.createElement(s.j9,{zIndex:5,format:new o.A({featureProjection:"EPSG:3857",featureClass:i.A}),url:"https://raw.githubusercontent.com/gregoiredavid/france-geojson/master/departements.geojson"},r.createElement(s.cq.RStyle,null,r.createElement(s.cq.RStroke,{color:"#007bff",width:3}),r.createElement(s.cq.RFill,{color:"transparent"})))))}},2381:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(945),a=n(5042),o=n(2662);class s extends o.A{constructor(e,t){var n;super(e,t),this.source=new a.A({layer:this.props.layer,apiKey:this.props.apiKey,retina:null!==(n=this.props.retina)&&void 0!==n&&n}),this.ol=new r.A({source:this.source}),this.eventSources=[this.ol,this.source]}}},5042:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(702),a=n(7896);const o={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},s={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class l extends r.A{constructor(e){const t=e.layer.indexOf("-"),n=-1==t?e.layer:e.layer.slice(0,t),r=s[n]||{minZoom:0,maxZoom:20,retina:!0},l=o[e.layer],i=e.apiKey?"?api_key="+e.apiKey:"",m=r.retina&&e.retina?"@2x":"",p=void 0!==e.url?e.url:"https://tiles.stadiamaps.com/tiles/"+e.layer+"/{z}/{x}/{y}"+m+"."+l.extension+i,c=['© Stadia Maps','© OpenMapTiles',a.o];e.layer.startsWith("stamen_")&&c.splice(1,0,'© Stamen Design'),super({attributions:c,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:r.maxZoom,minZoom:void 0!==e.minZoom?e.minZoom:r.minZoom,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:p,tilePixelRatio:m?2:1,wrapX:e.wrapX,zDirection:e.zDirection})}}const i=l}}]); \ No newline at end of file diff --git a/6537.bundle.js b/6537.bundle.js index 399d037a..431b7d40 100644 --- a/6537.bundle.js +++ b/6537.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6537],{4096:(t,s,i)=>{i.d(s,{A:()=>r});var a=i(1601),h=i.n(a),e=i(6314),n=i.n(e)()(h());n.push([t.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const r=n},8110:(t,s,i)=>{i.d(s,{A:()=>oi});var a=1,h=2,e=3,n=5,r=6378137,o=6356752.314,l=.0066943799901413165,c=484813681109536e-20,u=Math.PI/2,M=1e-10,d=.017453292519943295,f=57.29577951308232,p=Math.PI/4,m=2*Math.PI,y=3.14159265359,g={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const x={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var _=/[\s_\-\/\(\)]/g;function v(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),h=s.toLowerCase().replace(_,""),e=-1;++e=this.text.length)return;t=this.text[this.place++]}switch(this.state){case N:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},A.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(S.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},A.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=N)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=N,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},A.prototype.number=function(t){if(!E.test(t)){if(S.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},A.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},A.prototype.keyword=function(t){if(P.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=N)}if(!S.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},A.prototype.neutral=function(t){if(C.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(E.test(t))return this.word=t,void(this.state=3);if(!S.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},A.prototype.output=function(){for(;this.place0?90:-90)):(t.lat0=z(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(h),h}function G(t){var s=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?G[t]=b(arguments[1]):G[t]=j(arguments[1]):G[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?G.apply(s,t):G(t)}));if("string"==typeof t){if(t in G)return G[t]}else"EPSG"in t?G["EPSG:"+t.EPSG]=t:"ESRI"in t?G["ESRI:"+t.ESRI]=t:"IAU2000"in t?G["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(G);const L=G;var R=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],B=["3857","900913","3785","102113"];function T(t,s){var i,a;if(t=t||{},!s)return t;for(a in s)void 0!==(i=s[a])&&(t[a]=i);return t}function F(t,s,i){var a=t*s;return i/Math.sqrt(1-a*a)}function D(t){return t<0?-1:1}function U(t){return Math.abs(t)<=y?t:t-D(t)*m}function Q(t,s,i){var a=t*i,h=.5*t;return a=Math.pow((1-a)/(1+a),h),Math.tan(.5*(u-s))/a}function W(t,s){for(var i,a,h=.5*t,e=u-2*Math.atan(s),n=0;n<=15;n++)if(i=t*Math.sin(e),e+=a=u-2*Math.atan(s*Math.pow((1-i)/(1+i),h))-e,Math.abs(a)<=1e-10)return e;return-9999}function J(t){return t}var X=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var s,i,a=t.x,h=t.y;if(h*f>90&&h*f<-90&&a*f>180&&a*f<-180)return null;if(Math.abs(Math.abs(h)-u)<=M)return null;if(this.sphere)s=this.x0+this.a*this.k0*U(a-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(p+.5*h));else{var e=Math.sin(h),n=Q(this.e,h,e);s=this.x0+this.a*this.k0*U(a-this.long0),i=this.y0-this.a*this.k0*Math.log(n)}return t.x=s,t.y=i,t},inverse:function(t){var s,i,a=t.x-this.x0,h=t.y-this.y0;if(this.sphere)i=u-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var e=Math.exp(-h/(this.a*this.k0));if(-9999===(i=W(this.e,e)))return null}return s=U(this.long0+a/(this.a*this.k0)),t.x=s,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:J,inverse:J,names:["longlat","identity"]}],H={},K=[];function V(t,s){var i=K.length;return t.names?(K[i]=t,t.names.forEach((function(t){H[t.toLowerCase()]=i})),this):(console.log(s),!0)}const Z={start:function(){X.forEach(V)},add:V,get:function(t){if(!t)return!1;var s=t.toLowerCase();return void 0!==H[s]&&K[H[s]]?K[H[s]]:void 0}};var Y={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},$=Y.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Y.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var tt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},militargeographische_institut:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var st={};function it(t){if(0===t.length)return null;var s="@"===t[0];return s&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!s,grid:null,isNull:!0}:{name:t,mandatory:!s,grid:st[t]||null,isNull:!1}}function at(t){return t/3600*Math.PI/180}function ht(t,s,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(s,i)))}function et(t){return t.map((function(t){return[at(t.longitudeShift),at(t.latitudeShift)]}))}function nt(t,s,i){return{name:ht(t,s+8,s+16).trim(),parent:ht(t,s+24,s+24+8).trim(),lowerLatitude:t.getFloat64(s+72,i),upperLatitude:t.getFloat64(s+88,i),lowerLongitude:t.getFloat64(s+104,i),upperLongitude:t.getFloat64(s+120,i),latitudeInterval:t.getFloat64(s+136,i),longitudeInterval:t.getFloat64(s+152,i),gridNodeCount:t.getInt32(s+168,i)}}function rt(t,s,i,a){for(var h=s+176,e=[],n=0;n-1}))}(t)){var s=j(t);if(function(t){var s=v(t,"authority");if(s){var i=v(s,"epsg");return i&&B.indexOf(i)>-1}}(s))return L["EPSG:3857"];var i=function(t){var s=v(t,"extension");if(s)return v(s,"proj4")}(s);return i?b(i):s}return function(t){return"+"===t[0]}(t)?b(t):void 0}(t);if("object"==typeof i){var r=ot.projections.get(i.projName);if(r){if(i.datumCode&&"none"!==i.datumCode){var o=v(tt,i.datumCode);o&&(i.datum_params=i.datum_params||(o.towgs84?o.towgs84.split(","):null),i.ellps=o.ellipse,i.datumName=o.datumName?o.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var l,u,d,f,p,m,y=function(t,s,i,a,h){if(!t){var e=v(Y,a);e||(e=$),t=e.a,s=e.b,i=e.rf}return i&&!s&&(s=(1-1/i)*t),(0===i||Math.abs(t-s)3&&(0===M.datum_params[3]&&0===M.datum_params[4]&&0===M.datum_params[5]&&0===M.datum_params[6]||(M.datum_type=h,M.datum_params[3]*=c,M.datum_params[4]*=c,M.datum_params[5]*=c,M.datum_params[6]=M.datum_params[6]/1e6+1))),u&&(M.datum_type=e,M.grids=u),M.a=i,M.b=r,M.es=o,M.ep2=l,M}(i.datumCode,i.datum_params,y.a,y.b,g.es,g.ep2,x);T(this,i),T(this,r),this.a=y.a,this.b=y.b,this.rf=y.rf,this.sphere=y.sphere,this.es=g.es,this.e=g.e,this.ep2=g.ep2,this.datum=_,this.init(),s(null,this)}else s(t)}else s(t)}ot.projections=Z,ot.projections.start();const lt=ot;function ct(t,s,i){var a,h,e,n,r=t.x,o=t.y,l=t.z?t.z:0;if(o<-u&&o>-1.001*u)o=-u;else if(o>u&&o<1.001*u)o=u;else{if(o<-u)return{x:-1/0,y:-1/0,z:t.z};if(o>u)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),h=Math.sin(o),n=Math.cos(o),e=h*h,{x:((a=i/Math.sqrt(1-s*e))+l)*n*Math.cos(r),y:(a+l)*n*Math.sin(r),z:(a*(1-s)+l)*h}}function ut(t,s,i,a){var h,e,n,r,o,l,c,u,M,d,f,p,m,y,g,x=t.x,_=t.y,v=t.z?t.z:0;if(h=Math.sqrt(x*x+_*_),e=Math.sqrt(x*x+_*_+v*v),h/i<1e-12){if(y=0,e/i<1e-12)return g=-a,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(_,x);n=v/e,u=(r=h/e)*(1-s)*(o=1/Math.sqrt(1-s*(2-s)*r*r)),M=n*o,m=0;do{m++,l=s*(c=i/Math.sqrt(1-s*M*M))/(c+(g=h*u+v*M-c*(1-s*M*M))),p=(f=n*(o=1/Math.sqrt(1-l*(2-l)*r*r)))*u-(d=r*(1-l)*o)*M,u=d,M=f}while(p*p>1e-24&&m<30);return{x:y,y:Math.atan(f/Math.abs(d)),z:g}}function Mt(t){return t===a||t===h}function dt(t,s,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var a={x:-i.x,y:i.y},h={x:Number.NaN,y:Number.NaN},e=[];t:for(var n=0;na.y||d>a.x||y1e-12&&Math.abs(n.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),a;a.x=U(e.x+i.ll[0]),a.y=e.y+i.ll[1]}else isNaN(e.x)||(a.x=t.x+e.x,a.y=t.y+e.y);return a}function pt(t,s){var i,a={x:t.x/s.del[0],y:t.y/s.del[1]},h=Math.floor(a.x),e=Math.floor(a.y),n=a.x-1*h,r=a.y-1*e,o={x:Number.NaN,y:Number.NaN};if(h<0||h>=s.lim[0])return o;if(e<0||e>=s.lim[1])return o;i=e*s.lim[0]+h;var l=s.cvs[i][0],c=s.cvs[i][1];i++;var u=s.cvs[i][0],M=s.cvs[i][1];i+=s.lim[0];var d=s.cvs[i][0],f=s.cvs[i][1];i--;var p=s.cvs[i][0],m=s.cvs[i][1],y=n*r,g=n*(1-r),x=(1-n)*(1-r),_=(1-n)*r;return o.x=x*l+g*u+_*p+y*d,o.y=x*c+g*M+_*m+y*f,o}function mt(t,s,i){var a,h,e,n=i.x,r=i.y,o=i.z||0,l={};for(e=0;e<3;e++)if(!s||2!==e||void 0!==i.z)switch(0===e?(a=n,h=-1!=="ew".indexOf(t.axis[e])?"x":"y"):1===e?(a=r,h=-1!=="ns".indexOf(t.axis[e])?"y":"x"):(a=o,h="z"),t.axis[e]){case"e":case"n":l[h]=a;break;case"w":case"s":l[h]=-a;break;case"u":void 0!==i[h]&&(l.z=a);break;case"d":void 0!==i[h]&&(l.z=-a);break;default:return null}return l}function yt(t){var s={x:t[0],y:t[1]};return t.length>2&&(s.z=t[2]),t.length>3&&(s.m=t[3]),s}function gt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function xt(t,s,i,c){var u,M=void 0!==(i=Array.isArray(i)?yt(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){gt(t.x),gt(t.y)}(i),t.datum&&s.datum&&function(t,s){return(t.datum.datum_type===a||t.datum.datum_type===h||t.datum.datum_type===e)&&"WGS84"!==s.datumCode||(s.datum.datum_type===a||s.datum.datum_type===h||s.datum.datum_type===e)&&"WGS84"!==t.datumCode}(t,s)&&(i=xt(t,u=new lt("WGS84"),i,c),t=u),c&&"enu"!==t.axis&&(i=mt(t,!1,i)),"longlat"===t.projName)i={x:i.x*d,y:i.y*d,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=function(t,s,i){if(function(t,s){return t.datum_type===s.datum_type&&!(t.a!==s.a||Math.abs(t.es-s.es)>5e-11)&&(t.datum_type===a?t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]:t.datum_type!==h||t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]&&t.datum_params[3]===s.datum_params[3]&&t.datum_params[4]===s.datum_params[4]&&t.datum_params[5]===s.datum_params[5]&&t.datum_params[6]===s.datum_params[6])}(t,s))return i;if(t.datum_type===n||s.datum_type===n)return i;var c=t.a,u=t.es;if(t.datum_type===e){if(0!==dt(t,!1,i))return;c=r,u=l}var M=s.a,d=s.b,f=s.es;return s.datum_type===e&&(M=r,d=o,f=l),u!==f||c!==M||Mt(t.datum_type)||Mt(s.datum_type)?(i=ct(i,u,c),Mt(t.datum_type)&&(i=function(t,s,i){if(s===a)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(s===h){var e=i[0],n=i[1],r=i[2],o=i[3],l=i[4],c=i[5],u=i[6];return{x:u*(t.x-c*t.y+l*t.z)+e,y:u*(c*t.x+t.y-o*t.z)+n,z:u*(-l*t.x+o*t.y+t.z)+r}}}(i,t.datum_type,t.datum_params)),Mt(s.datum_type)&&(i=function(t,s,i){if(s===a)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(s===h){var e=i[0],n=i[1],r=i[2],o=i[3],l=i[4],c=i[5],u=i[6],M=(t.x-e)/u,d=(t.y-n)/u,f=(t.z-r)/u;return{x:M+c*d-l*f,y:-c*M+d+o*f,z:l*M-o*d+f}}}(i,s.datum_type,s.datum_params)),i=ut(i,f,M,d),s.datum_type!==e||0===dt(s,!0,i)?i:void 0):i}(t.datum,s.datum,i))return s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y,z:i.z||0}),"longlat"===s.projName?i={x:i.x*f,y:i.y*f,z:i.z||0}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter,z:i.z||0})),c&&"enu"!==s.axis?mt(s,!0,i):(i&&!M&&delete i.z,i)}var _t=lt("WGS84");function vt(t,s,i,a){var h,e,n;return Array.isArray(i)?(h=xt(t,s,i,a)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name?"number"==typeof h.z?[h.x,h.y,h.z].concat(i.splice(3)):[h.x,h.y,i[2]].concat(i.splice(3)):[h.x,h.y].concat(i.splice(2)):[h.x,h.y]):(e=xt(t,s,i,a),2===(n=Object.keys(i)).length||n.forEach((function(a){if(void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name){if("x"===a||"y"===a||"z"===a)return}else if("x"===a||"y"===a)return;e[a]=i[a]})),e)}function bt(t){return t instanceof lt?t:t.oProj?t.oProj:lt(t)}const wt=function(t,s,i){t=bt(t);var a,h=!1;return void 0===s?(s=t,t=_t,h=!0):(void 0!==s.x||Array.isArray(s))&&(i=s,s=t,t=_t,h=!0),s=bt(s),i?vt(t,s,i):(a={forward:function(i,a){return vt(t,s,i,a)},inverse:function(i,a){return vt(s,t,i,a)}},h&&(a.oProj=s),a)};var Nt=6,kt="AJSAJS",Ct="AFAFAF",Pt=65,St=73,Et=79,At=86,It=90;const qt={forward:Ot,inverse:function(t){var s=Lt(Bt(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat,s.lon,s.lat]:[s.left,s.bottom,s.right,s.top]},toPoint:zt};function Ot(t,s){return s=s||5,function(t,s){var i,a,h,e,n,r,o,l,c,u,M,d="00000"+t.easting,f="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(c=t.easting,u=t.northing,M=Rt(t.zoneNumber),i=Math.floor(c/1e5),a=Math.floor(u/1e5)%20,h=M-1,e=kt.charCodeAt(h),n=Ct.charCodeAt(h),l=!1,(r=e+i-1)>It&&(r=r-It+Pt-1,l=!0),(r===St||eSt||(r>St||eEt||(r>Et||eIt&&(r=r-It+Pt-1),(o=n+a)>At?(o=o-At+Pt-1,l=!0):l=!1,(o===St||nSt||(o>St||nEt||(o>Et||nAt&&(o=o-At+Pt-1),String.fromCharCode(r)+String.fromCharCode(o))+d.substr(d.length-5,s)+f.substr(f.length-5,s)}(function(t){var s,i,a,h,e,n,r,o=t.lat,l=t.lon,c=6378137,u=.00669438,M=.9996,d=jt(o),f=jt(l);r=Math.floor((l+180)/6)+1,180===l&&(r=60),o>=56&&o<64&&l>=3&&l<12&&(r=32),o>=72&&o<84&&(l>=0&&l<9?r=31:l>=9&&l<21?r=33:l>=21&&l<33?r=35:l>=33&&l<42&&(r=37)),n=jt(6*(r-1)-180+3),s=.006739496752268451,i=c/Math.sqrt(1-u*Math.sin(d)*Math.sin(d)),a=Math.tan(d)*Math.tan(d),h=s*Math.cos(d)*Math.cos(d);var p,m,y=M*i*((e=Math.cos(d)*(f-n))+(1-a+h)*e*e*e/6+(5-18*a+a*a+72*h-58*s)*e*e*e*e*e/120)+5e5,g=M*(c*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d))+i*Math.tan(d)*(e*e/2+(5-a+9*h+4*h*h)*e*e*e*e/24+(61-58*a+a*a+600*h-2.2240339282485886)*e*e*e*e*e*e/720));return o<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(y),zoneNumber:r,zoneLetter:(p=o,m="Z",84>=p&&p>=72?m="X":72>p&&p>=64?m="W":64>p&&p>=56?m="V":56>p&&p>=48?m="U":48>p&&p>=40?m="T":40>p&&p>=32?m="S":32>p&&p>=24?m="R":24>p&&p>=16?m="Q":16>p&&p>=8?m="P":8>p&&p>=0?m="N":0>p&&p>=-8?m="M":-8>p&&p>=-16?m="L":-16>p&&p>=-24?m="K":-24>p&&p>=-32?m="J":-32>p&&p>=-40?m="H":-40>p&&p>=-48?m="G":-48>p&&p>=-56?m="F":-56>p&&p>=-64?m="E":-64>p&&p>=-72?m="D":-72>p&&p>=-80&&(m="C"),m)}}({lat:t[1],lon:t[0]}),s)}function zt(t){var s=Lt(Bt(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat]:[(s.left+s.right)/2,(s.top+s.bottom)/2]}function jt(t){return t*(Math.PI/180)}function Gt(t){return t/Math.PI*180}function Lt(t){var s=t.northing,i=t.easting,a=t.zoneLetter,h=t.zoneNumber;if(h<0||h>60)return null;var e,n,r,o,l,c,u,M,d,f=.9996,p=6378137,m=.00669438,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),g=i-5e5,x=s;a<"N"&&(x-=1e7),u=6*(h-1)-180+3,e=.006739496752268451,d=(M=x/f/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*M)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*M)+151*y*y*y/96*Math.sin(6*M),n=p/Math.sqrt(1-m*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),o=e*Math.cos(d)*Math.cos(d),l=.99330562*p/Math.pow(1-m*Math.sin(d)*Math.sin(d),1.5),c=g/(n*f);var _=d-n*Math.tan(d)/l*(c*c/2-(5+3*r+10*o-4*o*o-9*e)*c*c*c*c/24+(61+90*r+298*o+45*r*r-1.6983531815716497-3*o*o)*c*c*c*c*c*c/720);_=Gt(_);var v,b=(c-(1+2*r+o)*c*c*c/6+(5-2*o+28*r-3*o*o+8*e+24*r*r)*c*c*c*c*c/120)/Math.cos(d);if(b=u+Gt(b),t.accuracy){var w=Lt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});v={top:w.lat,right:w.lon,bottom:_,left:b}}else v={lat:_,lon:b};return v}function Rt(t){var s=t%Nt;return 0===s&&(s=Nt),s}function Bt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,h="",e=0;!/[A-Z]/.test(s=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;h+=s,e++}var n=parseInt(h,10);if(0===e||e+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(e++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;a=t.substring(e,e+=2);for(var o=Rt(n),l=function(t,s){for(var i=kt.charCodeAt(s-1),a=1e5,h=!1;i!==t.charCodeAt(0);){if(++i===St&&i++,i===Et&&i++,i>It){if(h)throw"Bad character: "+t;i=Pt,h=!0}a+=1e5}return a}(a.charAt(0),o),c=function(t,s){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=Ct.charCodeAt(s-1),a=0,h=!1;i!==t.charCodeAt(0);){if(++i===St&&i++,i===Et&&i++,i>At){if(h)throw"Bad character: "+t;i=Pt,h=!0}a+=1e5}return a}(a.charAt(1),o);c0&&(M=1e5/Math.pow(10,p),d=t.substring(e,e+p),m=parseFloat(d)*M,f=t.substring(e+p),y=parseFloat(f)*M),{easting:m+l,northing:y+c,zoneLetter:r,zoneNumber:n,accuracy:M}}function Tt(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(s>=0)return s;throw"Invalid zone letter: "+t}function Ft(t,s,i){if(!(this instanceof Ft))return new Ft(t,s,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===s){var a=t.split(",");this.x=parseFloat(a[0],10),this.y=parseFloat(a[1],10),this.z=parseFloat(a[2],10)||0}else this.x=t,this.y=s,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ft.fromMGRS=function(t){return new Ft(zt(t))},Ft.prototype.toMGRS=function(t){return Ot([this.x,this.y],t)};const Dt=Ft;var Ut=.046875,Qt=.01953125,Wt=.01068115234375;function Jt(t){var s=[];s[0]=1-t*(.25+t*(Ut+t*(Qt+t*Wt))),s[1]=t*(.75-t*(Ut+t*(Qt+t*Wt)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s}function Xt(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))}function Ht(t,s,i){for(var a=1/(1-s),h=t,e=20;e;--e){var n=Math.sin(h),r=1-s*n*n;if(h-=r=(Xt(h,n,Math.cos(h),i)-t)*(r*Math.sqrt(r))*a,Math.abs(r)M?Math.tan(e):0,p=Math.pow(f,2),m=Math.pow(p,2);s=1-this.es*Math.pow(r,2),l/=Math.sqrt(s);var y=Xt(e,r,o,this.en);i=this.a*(this.k0*l*(1+c/6*(1-p+u+c/20*(5-18*p+m+14*u-58*p*u+c/42*(61+179*m-m*p-479*p)))))+this.x0,a=this.a*(this.k0*(y-this.ml0+r*n*l/2*(1+c/12*(5-p+9*u+4*d+c/30*(61+m-58*p+270*u-330*p*u+c/56*(1385+543*m-m*p-3111*p))))))+this.y0}else{var g=o*Math.sin(n);if(Math.abs(Math.abs(g)-1)=1){if(g-1>M)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return t.x=i,t.y=a,t},inverse:function(t){var s,i,a,h,e=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(this.es)if(i=Ht(s=this.ml0+n/this.k0,this.es,this.en),Math.abs(i)M?Math.tan(i):0,c=this.ep2*Math.pow(o,2),d=Math.pow(c,2),f=Math.pow(l,2),p=Math.pow(f,2);s=1-this.es*Math.pow(r,2);var m=e*Math.sqrt(s)/this.k0,y=Math.pow(m,2);a=i-(s*=l)*y/(1-this.es)*.5*(1-y/12*(5+3*f-9*c*f+c-4*d-y/30*(61+90*f-252*c*f+45*p+46*c-y/56*(1385+3633*f+4095*p+1574*p*f)))),h=U(this.long0+m*(1-y/6*(1+2*f+c-y/20*(5+28*f+24*p+8*c*f+6*c-y/42*(61+662*f+1320*p+720*p*f))))/o)}else a=u*D(n),h=0;else{var g=Math.exp(e/this.k0),x=.5*(g-1/g),_=this.lat0+n/this.k0,v=Math.cos(_);s=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(x,2))),a=Math.asin(s),n<0&&(a=-a),h=0===x&&0===v?0:U(Math.atan2(x,v)+this.long0)}return t.x=h,t.y=a,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Vt(t){var s=Math.exp(t);return(s-1/s)/2}function Zt(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),a=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(a,2))}function Yt(t,s){for(var i,a=2*Math.cos(2*s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return s+i*Math.sin(2*s)}function $t(t,s,i){for(var a,h,e=Math.sin(s),n=Math.cos(s),r=Vt(i),o=function(t){var s=Math.exp(t);return(s+1/s)/2}(i),l=2*n*o,c=-2*e*r,u=t.length-1,M=t[u],d=0,f=0,p=0;--u>=0;)a=f,h=d,M=l*(f=M)-a-c*(d=p)+t[u],p=c*f-h+l*d;return[(l=e*o)*M-(c=n*r)*p,l*p+c*M]}const ts={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Kt.init.apply(this),this.forward=Kt.forward,this.inverse=Kt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),i=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+s*(-2854/675)))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+s*(4642/4725)))))-2),i*=s,this.cgb[1]=i*(7/3+s*(s*(-227/45+s*(2704/315+s*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+s*(-16/15+s*(-13/9+s*(904/315+s*(-1522/945))))),i*=s,this.cgb[2]=i*(56/15+s*(-136/35+s*(-1262/105+s*(73814/2835)))),this.cbg[2]=i*(-26/15+s*(34/21+s*(1.6+s*(-12686/2835)))),i*=s,this.cgb[3]=i*(4279/630+s*(-332/35+s*(-399572/14175))),this.cbg[3]=i*(1237/630+s*(s*(-24832/14175)-2.4)),i*=s,this.cgb[4]=i*(4174/315+s*(-144838/6237)),this.cbg[4]=i*(-734/315+s*(109598/31185)),i*=s,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+s*(-96199/604800)))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+s*(7891/37800)))))),this.utg[1]=i*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+s*(1118711/3870720))))),this.gtu[1]=i*(13/48+s*(s*(557/1440+s*(281/630+s*(-1983433/1935360)))-.6)),i*=s,this.utg[2]=i*(-17/480+s*(37/840+s*(209/4480+s*(-5569/90720)))),this.gtu[2]=i*(61/240+s*(-103/140+s*(15061/26880+s*(167603/181440)))),i*=s,this.utg[3]=i*(-4397/161280+s*(11/504+s*(830251/7257600))),this.gtu[3]=i*(49561/161280+s*(-179/168+s*(6601661/7257600))),i*=s,this.utg[4]=i*(-4583/161280+s*(108847/3991680)),this.gtu[4]=i*(34729/80640+s*(-3418889/1995840)),i*=s,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var a=Yt(this.cbg,this.lat0);this.Zb=-this.Qn*(a+function(t,s){for(var i,a=2*Math.cos(s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return Math.sin(s)*i}(this.gtu,2*a))},forward:function(t){var s=U(t.x-this.long0),i=t.y;i=Yt(this.cbg,i);var a=Math.sin(i),h=Math.cos(i),e=Math.sin(s),n=Math.cos(s);i=Math.atan2(a,n*h),s=Math.atan2(e*h,Zt(a,h*n)),s=function(t){var s=Math.abs(t);return s=function(t){var s=1+t,i=s-1;return 0===i?t:t*Math.log(s)/i}(s*(1+s/(Zt(1,s)+1))),t<0?-s:s}(Math.tan(s));var r,o,l=$t(this.gtu,2*i,2*s);return i+=l[0],s+=l[1],Math.abs(s)<=2.623395162778?(r=this.a*(this.Qn*s)+this.x0,o=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,o=1/0),t.x=r,t.y=o,t},inverse:function(t){var s,i,a=(t.x-this.x0)*(1/this.a),h=(t.y-this.y0)*(1/this.a);if(h=(h-this.Zb)/this.Qn,a/=this.Qn,Math.abs(a)<=2.623395162778){var e=$t(this.utg,2*h,2*a);h+=e[0],a+=e[1],a=Math.atan(Vt(a));var n=Math.sin(h),r=Math.cos(h),o=Math.sin(a),l=Math.cos(a);h=Math.atan2(n*l,Zt(o,l*r)),s=U((a=Math.atan2(o,l*r))+this.long0),i=Yt(this.cgb,h)}else s=1/0,i=1/0;return t.x=s,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},ss={init:function(){var t=function(t,s){if(void 0===t){if((t=Math.floor(30*(U(s)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*d,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ts.init.apply(this),this.forward=ts.forward,this.inverse=ts.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function is(t,s){return Math.pow((1-t)/(1+t),s)}const as={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+p)/(Math.pow(Math.tan(.5*this.lat0+p),this.C)*is(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+p),this.C)*is(this.e*Math.sin(i),this.ratexp))-u,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,a=Math.pow(Math.tan(.5*i+p)/this.K,1/this.C),h=20;h>0&&(i=2*Math.atan(a*is(this.e*Math.sin(t.y),-.5*this.e))-u,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null},names:["gauss"]},hs={init:function(){as.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,h;return t.x=U(t.x-this.long0),as.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=h*i*Math.sin(t.x),t.y=h*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,h,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Zt(t.x,t.y)){var n=2*Math.atan2(e,this.R2);s=Math.sin(n),i=Math.cos(n),h=Math.asin(i*this.sinc0+t.y*s*this.cosc0/e),a=Math.atan2(t.x*s,e*this.cosc0*i-t.y*this.sinc0*s)}else h=this.phic0,a=0;return t.x=a,t.y=h,as.inverse.apply(this,[t]),t.x=U(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},es={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=M&&(this.k0=.5*(1+D(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=M&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=M&&Math.abs(Math.cos(this.lat_ts))>M&&(this.k0=.5*this.cons*F(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Q(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-u,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,l=Math.sin(o),c=Math.cos(o),d=U(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=M&&Math.abs(o+this.lat0)<=M?(t.x=NaN,t.y=NaN,t):this.sphere?(s=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(d)),t.x=this.a*s*c*Math.sin(d)+this.x0,t.y=this.a*s*(this.coslat0*l-this.sinlat0*c*Math.cos(d))+this.y0,t):(i=2*Math.atan(this.ssfn_(o,l,this.e))-u,h=Math.cos(i),a=Math.sin(i),Math.abs(this.coslat0)<=M?(e=Q(this.e,o*this.con,this.con*l),n=2*this.a*this.k0*e/this.cons,t.x=this.x0+n*Math.sin(r-this.long0),t.y=this.y0-this.con*n*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)0?U(this.long0+Math.atan2(t.x,-1*t.y)):U(this.long0+Math.atan2(t.x,t.y)):U(this.long0+Math.atan2(t.x*Math.sin(r),n*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=s,t.y=i,t)}if(Math.abs(this.coslat0)<=M){if(n<=M)return i=this.lat0,s=this.long0,t.x=s,t.y=i,t;t.x*=this.con,t.y*=this.con,a=n*this.cons/(2*this.a*this.k0),i=this.con*W(this.e,a),s=this.con*U(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else h=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),s=this.long0,n<=M?e=this.X0:(e=Math.asin(Math.cos(h)*this.sinX0+t.y*Math.sin(h)*this.cosX0/n),s=U(this.long0+Math.atan2(t.x*Math.sin(h),n*this.cosX0*Math.cos(h)-t.y*this.sinX0*Math.sin(h)))),i=-1*W(this.e,Math.tan(.5*(u+e)));return t.x=s,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function(t,s,i){return s*=i,Math.tan(.5*(u+t))*Math.pow((1-s)/(1+s),.5*i)}},ns={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,h=2*a-Math.pow(a,2),e=this.e=Math.sqrt(h);this.R=this.k0*i*Math.sqrt(1-h)/(1-h*Math.pow(s,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*s)/(1-e*s));this.K=n-this.alpha*r+this.alpha*e/2*o},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,h=2*(Math.atan(Math.exp(a))-Math.PI/4),e=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(e)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(e))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(e));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var s=t.x-this.x0,i=t.y-this.y0,a=s/this.R,h=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),e=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(a)),n=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(h))),r=this.lambda0+n/this.alpha,o=0,l=e,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+e/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]};var rs=1e-7;const os={init:function(){var t,s,i,a,h,e,n,r,o,l,c,f,y,g=0,x=0,_=0,v=0,b=0,w=0,N=0;this.no_off=(y="object"==typeof(f=this).PROJECTION?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(y)),this.no_rot="no_rot"in this;var k=!1;"alpha"in this&&(k=!0);var C=!1;if("rectified_grid_angle"in this&&(C=!0),k&&(N=this.alpha),C&&(g=this.rectified_grid_angle*d),k||C)x=this.longc;else if(_=this.long1,b=this.lat1,v=this.long2,w=this.lat2,Math.abs(b-w)<=rs||(t=Math.abs(b))<=rs||Math.abs(t-u)<=rs||Math.abs(Math.abs(this.lat0)-u)<=rs||Math.abs(Math.abs(w)-u)<=rs)throw new Error;var P=1-this.es;s=Math.sqrt(P),Math.abs(this.lat0)>M?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/P),this.A=this.B*this.k0*s/t,(h=(a=this.B*s/(i*Math.sqrt(t)))*a-1)<=0?h=0:(h=Math.sqrt(h),this.lat0<0&&(h=-h)),this.E=h+=a,this.E*=Math.pow(Q(this.e,this.lat0,r),this.B)):(this.B=1/s,this.A=this.k0,this.E=a=h=1),k||C?(k?(c=Math.asin(Math.sin(N)/a),C||(g=N)):(c=g,N=Math.asin(a*Math.sin(c))),this.lam0=x-Math.asin(.5*(h-1/h)*Math.tan(c))/this.B):(e=Math.pow(Q(this.e,b,Math.sin(b)),this.B),n=Math.pow(Q(this.e,w,Math.sin(w)),this.B),h=this.E/e,o=(n-e)/(n+e),l=((l=this.E*this.E)-n*e)/(l+n*e),(t=_-v)<-Math.pi?v-=m:t>Math.pi&&(v+=m),this.lam0=U(.5*(_+v)-Math.atan(l*Math.tan(.5*this.B*(_-v))/o)/this.B),c=Math.atan(2*Math.sin(this.B*U(_-this.lam0))/(h-1/h)),g=N=Math.asin(a*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(g),this.cosrot=Math.cos(g),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(a*a-1)/Math.cos(N))),this.lat0<0&&(this.u_0=-this.u_0)),h=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(p-h)),this.v_pole_s=this.ArB*Math.log(Math.tan(p+h))},forward:function(t){var s,i,a,h,e,n,r,o,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-u)>M){if(s=.5*((e=this.E/Math.pow(Q(this.e,t.y,Math.sin(t.y)),this.B))-(n=1/e)),i=.5*(e+n),h=Math.sin(this.B*t.x),a=(s*this.singam-h*this.cosgam)/i,Math.abs(Math.abs(a)-1)0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=o):(r-=this.u_0,l.x=o*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-o*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var s,i,a,h,e,n,r,o={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,s=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,s=t.y*this.cosrot+t.x*this.sinrot+this.u_0),h=.5*((a=Math.exp(-this.BrA*i))-1/a),e=.5*(a+1/a),r=((n=Math.sin(this.BrA*s))*this.cosgam+h*this.singam)/e,Math.abs(Math.abs(r)-1)M?this.ns=Math.log(a/r)/Math.log(h/o):this.ns=s,isNaN(this.ns)&&(this.ns=s),this.f0=a/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=M&&(i=D(i)*(u-2e-10));var a,h,e=Math.abs(Math.abs(i)-u);if(e>M)a=Q(this.e,i,Math.sin(i)),h=this.a*this.f0*Math.pow(a,this.ns);else{if((e=i*this.ns)<=0)return null;h=0}var n=this.ns*U(s-this.long0);return t.x=this.k0*(h*Math.sin(n))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(n))+this.y0,t},inverse:function(t){var s,i,a,h,e,n=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(s=Math.sqrt(n*n+r*r),i=1):(s=-Math.sqrt(n*n+r*r),i=-1);var o=0;if(0!==s&&(o=Math.atan2(i*n,i*r)),0!==s||this.ns>0){if(i=1/this.ns,a=Math.pow(s/(this.a*this.f0),i),-9999===(h=W(this.e,a)))return null}else h=-u;return e=U(o/this.ns+this.long0),t.x=e,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},cs={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y,c=U(o-this.long0);return s=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/s)-this.s45),a=-c*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(a)),e=Math.asin(Math.cos(i)*Math.sin(a)/Math.cos(h)),n=this.n*e,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=r*Math.cos(n)/1,t.x=r*Math.sin(n)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,h,e,n,r,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(h)),i=Math.asin(Math.cos(a)*Math.sin(h)/Math.cos(s)),t.x=this.long0-i/this.alfa,n=s,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(r=1),n=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function us(t,s,i,a,h){return t*h-s*Math.sin(2*h)+i*Math.sin(4*h)-a*Math.sin(6*h)}function Ms(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function ds(t){return.375*t*(1+.25*t*(1+.46875*t))}function fs(t){return.05859375*t*t*(1+.75*t)}function ps(t){return t*t*t*(35/3072)}function ms(t,s,i){var a=s*i;return t/Math.sqrt(1-a*a)}function ys(t){return Math.abs(t)1e-7?(1-t*t)*(s/(1-(i=t*s)*i)-.5/t*Math.log((1-i)/(1+i))):2*s}const vs={init:function(){var t,s=Math.abs(this.lat0);if(Math.abs(s-u)0)switch(this.qp=_s(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var s,i=[];return i[0]=.3333333333333333*t,s=t*t,i[0]+=.17222222222222222*s,i[1]=.06388888888888888*s,s*=t,i[0]+=.10257936507936508*s,i[1]+=.0664021164021164*s,i[2]=.016415012942191543*s,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=_s(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,a,h,e,n,r,o,l,c,d=t.x,f=t.y;if(d=U(d-this.long0),this.sphere){if(e=Math.sin(f),c=Math.cos(f),a=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*a:1+this.sinph0*e+this.cosph0*c*a)<=M)return null;s=(i=Math.sqrt(2/i))*c*Math.sin(d),i*=this.mode===this.EQUIT?e:this.cosph0*e-this.sinph0*c*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(f+this.lat0)=0?(s=(l=Math.sqrt(n))*h,i=a*(this.mode===this.S_POLE?l:-l)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o,l,c,d=t.x/this.a,f=t.y/this.a;if(this.sphere){var p,m=0,y=0;if((i=.5*(p=Math.sqrt(d*d+f*f)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(y=Math.sin(i),m=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(p)<=M?0:Math.asin(f*y/p),d*=y,f=m*p;break;case this.OBLIQ:i=Math.abs(p)<=M?this.lat0:Math.asin(m*this.sinph0+f*y*this.cosph0/p),d*=y*this.cosph0,f=(m-Math.sin(i)*this.sinph0)*p;break;case this.N_POLE:f=-f,i=u-i;break;case this.S_POLE:i-=u}s=0!==f||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,f):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,f*=this.dd,(n=Math.sqrt(d*d+f*f))1&&(t=t>1?1:-1),Math.asin(t)}const ws={init:function(){Math.abs(this.lat1+this.lat2)M?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=_s(this.e3,this.sin_phi),h=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,e=this.ns0*U(s-this.long0),n=h*Math.sin(e)+this.x0,r=this.rh-h*Math.cos(e)+this.y0;return t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),h=0,0!==s&&(h=Math.atan2(a*t.x,a*t.y)),a=s*this.ns0/this.a,this.sphere?n=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,n=this.phi1z(this.e3,i)),e=U(h/this.ns0+this.long0),t.x=e,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,e,n=bs(.5*s);if(t0||Math.abs(e)<=M?(n=this.x0+1*this.a*i*Math.sin(a)/e,r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)/e):(n=this.x0+this.infinity_dist*i*Math.sin(a),r=this.y0+this.infinity_dist*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(s=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(s,this.rc),i=Math.sin(h),n=bs((a=Math.cos(h))*this.sin_p14+t.y*i*this.cos_p14/s),e=Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i),e=U(this.long0+e)):(n=this.phic0,e=0),t.x=e,t.y=n,t},names:["gnom"]},ks={init:function(){this.sphere||(this.k0=F(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,h=t.y,e=U(a-this.long0);if(this.sphere)s=this.x0+this.a*e*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var n=_s(this.e,Math.sin(h));s=this.x0+this.a*this.k0*e,i=this.y0+this.a*n*.5/this.k0}return t.x=s,t.y=i,t},inverse:function(t){var s,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(s=U(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*u:u;for(var a,h,e,n,r=Math.asin(.5*s),o=0;o<30;o++)if(h=Math.sin(r),e=Math.cos(r),n=t*h,r+=a=Math.pow(1-n*n,2)/(2*e)*(s/(1-t*t)-h/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),Math.abs(a)<=1e-10)return r;return NaN}(this.e,2*t.y*this.k0/this.a),s=U(this.long0+t.x/(this.a*this.k0))),t.x=s,t.y=i,t},names:["cea"]},Cs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,a=U(s-this.long0),h=ys(i-this.lat0);return t.x=this.x0+this.a*a*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var s=t.x,i=t.y;return t.x=U(this.long0+(s-this.x0)/(this.a*this.rc)),t.y=ys(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ps={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ms(this.es),this.e1=ds(this.es),this.e2=fs(this.es),this.e3=ps(this.es),this.ml0=this.a*us(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i,a,h=t.x,e=t.y,n=U(h-this.long0);if(a=n*Math.sin(e),this.sphere)Math.abs(e)<=M?(s=this.a*n,i=-1*this.a*this.lat0):(s=this.a*Math.sin(a)/Math.tan(e),i=this.a*(ys(e-this.lat0)+(1-Math.cos(a))/Math.tan(e)));else if(Math.abs(e)<=M)s=this.a*n,i=-1*this.ml0;else{var r=ms(this.a,this.e,Math.sin(e))/Math.tan(e);s=r*Math.sin(a),i=this.a*us(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+r*(1-Math.cos(a))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,e,n,r,o,l;if(a=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=M)s=U(a/this.a+this.long0),i=0;else{var c;for(n=this.lat0+h/this.a,r=a*a/this.a/this.a+n*n,o=n,e=20;e;--e)if(o+=l=-1*(n*(o*(c=Math.tan(o))+1)-o-.5*(o*o+r)*c)/((o-n)/c-1),Math.abs(l)<=M){i=o;break}s=U(this.long0+Math.asin(a*Math.tan(o)/this.a)/Math.sin(i))}else if(Math.abs(h+this.ml0)<=M)i=0,s=U(this.long0+a/this.a);else{var u,d,f,p,m;for(n=(this.ml0+h)/this.a,r=a*a/this.a/this.a+n*n,o=n,e=20;e;--e)if(m=this.e*Math.sin(o),u=Math.sqrt(1-m*m)*Math.tan(o),d=this.a*us(this.e0,this.e1,this.e2,this.e3,o),f=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o),o-=l=(n*(u*(p=d/this.a)+1)-p-.5*u*(p*p+r))/(this.es*Math.sin(2*o)*(p*p+r-2*n*p)/(4*u)+(n-p)*(u*f-2/Math.sin(2*o))-f),Math.abs(l)<=M){i=o;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=U(this.long0+Math.asin(a*u/this.a)/Math.sin(i))}return t.x=s,t.y=i,t},names:["Polyconic","poly"]},Ss={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var s,i=t.x,a=t.y-this.lat0,h=i-this.long0,e=a/c*1e-5,n=h,r=1,o=0;for(s=1;s<=10;s++)r*=e,o+=this.A[s]*r;var l,u=o,M=n,d=1,f=0,p=0,m=0;for(s=1;s<=6;s++)l=f*u+d*M,d=d*u-f*M,f=l,p=p+this.B_re[s]*d-this.B_im[s]*f,m=m+this.B_im[s]*d+this.B_re[s]*f;return t.x=m*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var s,i,a=t.x,h=t.y,e=a-this.x0,n=(h-this.y0)/this.a,r=e/this.a,o=1,l=0,u=0,M=0;for(s=1;s<=6;s++)i=l*n+o*r,o=o*n-l*r,l=i,u=u+this.C_re[s]*o-this.C_im[s]*l,M=M+this.C_im[s]*o+this.C_re[s]*l;for(var d=0;d.999999999999&&(i=.999999999999),s=Math.asin(i);var a=U(this.long0+t.x/(.900316316158*this.a*Math.cos(s)));a<-Math.PI&&(a=-Math.PI),a>Math.PI&&(a=Math.PI),i=(2*s+Math.sin(2*s))/Math.PI,Math.abs(i)>1&&(i=1);var h=Math.asin(i);return t.x=a,t.y=h,t},names:["Mollweide","moll"]},qs={init:function(){Math.abs(this.lat1+this.lat2)=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1);var e=0;return 0!==i&&(e=Math.atan2(s*t.x,s*t.y)),this.sphere?(h=U(this.long0+e/this.ns),a=ys(this.g-i/this.a),t.x=h,t.y=a,t):(a=gs(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),h=U(this.long0+e/this.ns),t.x=h,t.y=a,t)},names:["Equidistant_Conic","eqdc"]},Os={init:function(){this.R=this.a},forward:function(t){var s,i,a=t.x,h=t.y,e=U(a-this.long0);Math.abs(h)<=M&&(s=this.x0+this.R*e,i=this.y0);var n=bs(2*Math.abs(h/Math.PI));(Math.abs(e)<=M||Math.abs(Math.abs(h)-u)<=M)&&(s=this.x0,i=h>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var r=.5*Math.abs(Math.PI/e-e/Math.PI),o=r*r,l=Math.sin(n),c=Math.cos(n),d=c/(l+c-1),f=d*d,p=d*(2/l-1),m=p*p,y=Math.PI*this.R*(r*(d-m)+Math.sqrt(o*(d-m)*(d-m)-(m+o)*(f-m)))/(m+o);e<0&&(y=-y),s=this.x0+y;var g=o+d;return y=Math.PI*this.R*(p*g-r*Math.sqrt((m+o)*(o+1)-g*g))/(m+o),i=h>=0?this.y0+y:this.y0-y,t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,c,u,d;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,e=(a=t.x/u)*a+(h=t.y/u)*h,u=3*(h*h/(o=-2*(n=-Math.abs(h)*(1+e))+1+2*h*h+e*e)+(2*(r=n-2*h*h+a*a)*r*r/o/o/o-9*n*r/o/o)/27)/(l=(n-r*r/3/o)/o)/(c=2*Math.sqrt(-l/3)),Math.abs(u)>1&&(u=u>=0?1:-1),d=Math.acos(u)/3,i=t.y>=0?(-c*Math.cos(d+Math.PI/3)-r/3/o)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-r/3/o)*Math.PI,s=Math.abs(a)2*u*this.a)return;return i=s/this.a,a=Math.sin(i),h=Math.cos(i),e=this.long0,Math.abs(s)<=M?n=this.lat0:(n=bs(h*this.sin_p12+t.y*a*this.cos_p12/s),r=Math.abs(this.lat0)-u,e=Math.abs(r)<=M?this.lat0>=0?U(this.long0+Math.atan2(t.x,-t.y)):U(this.long0-Math.atan2(-t.x,t.y)):U(this.long0+Math.atan2(t.x*a,s*this.cos_p12*h-t.y*this.sin_p12*a))),t.x=e,t.y=n,t}return o=Ms(this.es),l=ds(this.es),c=fs(this.es),d=ps(this.es),Math.abs(this.sin_p12-1)<=M?(n=gs(((f=this.a*us(o,l,c,d,u))-(s=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,o,l,c,d),e=U(this.long0+Math.atan2(t.x,-1*t.y)),t.x=e,t.y=n,t):Math.abs(this.sin_p12+1)<=M?(f=this.a*us(o,l,c,d,u),n=gs(((s=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,o,l,c,d),e=U(this.long0+Math.atan2(t.x,t.y)),t.x=e,t.y=n,t):(s=Math.sqrt(t.x*t.x+t.y*t.y),y=Math.atan2(t.x,t.y),p=ms(this.a,this.e,this.sin_p12),g=Math.cos(y),_=-(x=this.e*this.cos_p12*g)*x/(1-this.es),v=3*this.es*(1-_)*this.sin_p12*this.cos_p12*g/(1-this.es),N=1-_*(w=(b=s/p)-_*(1+_)*Math.pow(b,3)/6-v*(1+3*_)*Math.pow(b,4)/24)*w/2-b*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*g),e=U(this.long0+Math.asin(Math.sin(y)*Math.sin(w)/Math.cos(m))),k=Math.sin(m),n=Math.atan2((k-this.es*N*this.sin_p12)*Math.tan(m),k*(1-this.es)),t.x=e,t.y=n,t)},names:["Azimuthal_Equidistant","aeqd"]},js={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=U(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),((e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=M)&&(n=1*this.a*i*Math.sin(a),r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n,r;return t.x-=this.x0,t.y-=this.y0,i=bs((s=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),a=Math.sin(i),h=Math.cos(i),n=this.long0,Math.abs(s)<=M?(r=this.lat0,t.x=n,t.y=r,t):(r=bs(h*this.sin_p14+t.y*a*this.cos_p14/s),e=Math.abs(this.lat0)-u,Math.abs(e)<=M?(n=this.lat0>=0?U(this.long0+Math.atan2(t.x,-t.y)):U(this.long0-Math.atan2(-t.x,t.y)),t.x=n,t.y=r,t):(n=U(this.long0+Math.atan2(t.x*a,s*this.cos_p14*h-t.y*this.sin_p14*a)),t.x=n,t.y=r,t))},names:["ortho"]};var Gs=1,Ls=2,Rs=3,Bs=4;function Ts(t,s,i,a){var h;return tp&&h<=u+p?(a.value=Ls,h-=u):h>u+p||h<=-(u+p)?(a.value=Rs,h=h>=0?h-y:h+y):(a.value=Bs,h+=u)),h}function Fs(t,s){var i=t+s;return i<-y?i+=m:i>+y&&(i-=m),i}const Ds={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=u-p/2?this.face=5:this.lat0<=-(u-p/2)?this.face=6:Math.abs(this.long0)<=p?this.face=1:Math.abs(this.long0)<=u+p?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,a,h,e,n,r={x:0,y:0},o={value:0};if(t.x-=this.long0,s=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,5===this.face)h=u-s,i>=p&&i<=u+p?(o.value=Gs,a=i-u):i>u+p||i<=-(u+p)?(o.value=Ls,a=i>0?i-y:i+y):i>-(u+p)&&i<=-p?(o.value=Rs,a=i+u):(o.value=Bs,a=i);else if(6===this.face)h=u+s,i>=p&&i<=u+p?(o.value=Gs,a=-i+u):i=-p?(o.value=Ls,a=-i):i<-p&&i>=-(u+p)?(o.value=Rs,a=-i-u):(o.value=Bs,a=i>0?-i+y:-i-y);else{var l,c,M,d,f,m;2===this.face?i=Fs(i,+u):3===this.face?i=Fs(i,+y):4===this.face&&(i=Fs(i,-u)),d=Math.sin(s),f=Math.cos(s),m=Math.sin(i),l=f*Math.cos(i),c=f*m,M=d,1===this.face?a=Ts(h=Math.acos(l),M,c,o):2===this.face?a=Ts(h=Math.acos(c),M,-l,o):3===this.face?a=Ts(h=Math.acos(-l),M,-c,o):4===this.face?a=Ts(h=Math.acos(-c),M,l,o):(h=a=0,o.value=Gs)}return n=Math.atan(12/y*(a+Math.acos(Math.sin(a)*Math.cos(p))-u)),e=Math.sqrt((1-Math.cos(h))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(a))))),o.value===Ls?n+=u:o.value===Rs?n+=y:o.value===Bs&&(n+=1.5*y),r.x=e*Math.cos(n),r.y=e*Math.sin(n),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,c,M,d,f={lam:0,phi:0},p={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?p.value=Gs:t.y>=0&&t.y>=Math.abs(t.x)?(p.value=Ls,s-=u):t.x<0&&-t.x>=Math.abs(t.y)?(p.value=Rs,s=s<0?s+y:s-y):(p.value=Bs,s+=u),l=y/12*Math.tan(s),e=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(e),(r=1-(a=Math.cos(s))*a*(h=Math.tan(i))*h*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?r=-1:r>1&&(r=1),5===this.face)o=Math.acos(r),f.phi=u-o,p.value===Gs?f.lam=n+u:p.value===Ls?f.lam=n<0?n+y:n-y:p.value===Rs?f.lam=n-u:f.lam=n;else if(6===this.face)o=Math.acos(r),f.phi=o-u,p.value===Gs?f.lam=-n+u:p.value===Ls?f.lam=-n:p.value===Rs?f.lam=-n-u:f.lam=n<0?-n-y:-n+y;else{var m,g,x;l=(m=r)*m,g=(l+=(x=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*x)>=1?0:Math.sqrt(1-l),p.value===Ls?(l=g,g=-x,x=l):p.value===Rs?(g=-g,x=-x):p.value===Bs&&(l=g,g=x,x=-l),2===this.face?(l=m,m=-g,g=l):3===this.face?(m=-m,g=-g):4===this.face&&(l=m,m=g,g=-l),f.phi=Math.acos(-x)-u,f.lam=Math.atan2(g,m),2===this.face?f.lam=Fs(f.lam,-u):3===this.face?f.lam=Fs(f.lam,-y):4===this.face&&(f.lam=Fs(f.lam,+u))}return 0!==this.es&&(c=f.phi<0?1:0,M=Math.tan(f.phi),d=this.b/Math.sqrt(M*M+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi)),f.lam+=this.long0,t.x=f.lam,t.y=f.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Us=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Qs=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ws=.8487,Js=1.3523,Xs=f/5,Hs=1/Xs,Ks=function(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))};const Vs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=U(t.x-this.long0),i=Math.abs(t.y),a=Math.floor(i*Xs);a<0?a=0:a>=18&&(a=17);var h={x:Ks(Us[a],i=f*(i-Hs*a))*s,y:Ks(Qs[a],i)};return t.y<0&&(h.y=-h.y),h.x=h.x*this.a*Ws+this.x0,h.y=h.y*this.a*Js+this.y0,h},inverse:function(t){var s={x:(t.x-this.x0)/(this.a*Ws),y:Math.abs(t.y-this.y0)/(this.a*Js)};if(s.y>=1)s.x/=Us[18][0],s.y=t.y<0?-u:u;else{var i=Math.floor(18*s.y);for(i<0?i=0:i>=18&&(i=17);;)if(Qs[i][0]>s.y)--i;else{if(!(Qs[i+1][0]<=s.y))break;++i}var a=Qs[i],h=5*(s.y-a[0])/(Qs[i+1][0]-a[0]);h=function(t,s,i,a){for(var h=s;a;--a){var e=t(h);if(h-=e,Math.abs(e)<1e-10)break}return h}((function(t){return(Ks(a,t)-s.y)/function(t,s){return t[1]+s*(2*t[2]+3*s*t[3])}(a,t)}),h,0,100),s.x/=Ks(Us[i],h),s.y=(5*i+h)*d,t.y<0&&(s.y=-s.y)}return s.x=U(s.x+this.long0),s},names:["Robinson","robin"]},Zs={init:function(){this.name="geocent"},forward:function(t){return ct(t,this.es,this.a)},inverse:function(t){return ut(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ys={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const $s={init:function(){if(Object.keys(Ys).forEach(function(t){if(void 0===this[t])this[t]=Ys[t].def;else{if(Ys[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ys[t].num&&(this[t]=parseFloat(this[t]))}Ys[t].degrees&&(this[t]=this[t]*d)}.bind(this)),Math.abs(Math.abs(this.lat0)-u)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,s=this.azi;this.cg=Math.cos(s),this.sg=Math.sin(s),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var s,i,a,h,e=Math.sin(t.y),n=Math.cos(t.y),r=Math.cos(t.x);switch(this.mode){case 3:i=this.sinph0*e+this.cosph0*n*r;break;case 2:i=n*r;break;case 1:i=-e;break;case 0:i=e}switch(s=(i=this.pn1/(this.p-i))*n*Math.sin(t.x),this.mode){case 3:i*=this.cosph0*e-this.sinph0*n*r;break;case 2:i*=e;break;case 0:i*=-n*r;break;case 1:i*=n*r}return h=1/((a=i*this.cg+s*this.sg)*this.sw*this.h1+this.cw),s=(s*this.cg-i*this.sg)*this.cw*h,i=a*h,t.x=s*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var s,i,a,h={x:t.x,y:t.y};a=1/(this.pn1-t.y*this.sw),s=this.pn1*t.x*a,i=this.pn1*t.y*this.cw*a,t.x=s*this.cg+i*this.sg,t.y=i*this.cg-s*this.sg;var e=Zt(t.x,t.y);if(Math.abs(e)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,s=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=s,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var s,i,a,h,e=t.x,n=t.y;if(e-=this.long0,"ellipse"===this.shape){n=Math.atan(this.radius_p2*Math.tan(n));var r=this.radius_p/Zt(this.radius_p*Math.cos(n),Math.sin(n));if(i=r*Math.cos(e)*Math.cos(n),a=r*Math.sin(e)*Math.cos(n),h=r*Math.sin(n),(this.radius_g-i)*i-a*a-h*h*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(a/Zt(h,s)),t.y=this.radius_g_1*Math.atan(h/s)):(t.x=this.radius_g_1*Math.atan(a/s),t.y=this.radius_g_1*Math.atan(h/Zt(a,s)))}else"sphere"===this.shape&&(s=Math.cos(n),i=Math.cos(e)*s,a=Math.sin(e)*s,h=Math.sin(n),s=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(a/Zt(h,s)),t.y=this.radius_g_1*Math.atan(h/s)):(t.x=this.radius_g_1*Math.atan(a/s),t.y=this.radius_g_1*Math.atan(h/Zt(a,s))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var s,i,a,h,e=-1,n=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Zt(1,r)):(n=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Zt(1,n));var o=r/this.radius_p;if(s=n*n+o*o+e*e,(a=(i=2*this.radius_g*e)*i-4*s*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;h=(-i-Math.sqrt(a))/(2*s),e=this.radius_g+h*e,n*=h,r*=h,t.x=Math.atan2(n,e),t.y=Math.atan(r*Math.cos(t.x)/e),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(n=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+n*n)),s=n*n+r*r+e*e,(a=(i=2*this.radius_g*e)*i-4*s*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;h=(-i-Math.sqrt(a))/(2*s),e=this.radius_g+h*e,n*=h,r*=h,t.x=Math.atan2(n,e),t.y=Math.atan(r*Math.cos(t.x)/e)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var si=1.340264,ii=-.081106,ai=893e-6,hi=.003796,ei=Math.sqrt(3)/2;const ni={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var s=U(t.x-this.long0),i=t.y,a=Math.asin(ei*Math.sin(i)),h=a*a,e=h*h*h;return t.x=s*Math.cos(a)/(ei*(si+3*ii*h+e*(7*ai+9*hi*h))),t.y=a*(si+ii*h+e*(ai+hi*h)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var s,i,a,h,e=t.y;for(h=0;h<12&&(e-=a=(e*(si+ii*(s=e*e)+(i=s*s*s)*(ai+hi*s))-t.y)/(si+3*ii*s+i*(7*ai+9*hi*s)),!(Math.abs(a)<1e-9));++h);return i=(s=e*e)*s*s,t.x=ei*t.x*(si+3*ii*s+i*(7*ai+9*hi*s))/Math.cos(e),t.y=Math.asin(Math.sin(e)/ei),t.x=U(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var ri;wt.defaultDatum="WGS84",wt.Proj=lt,wt.WGS84=new wt.Proj("WGS84"),wt.Point=Dt,wt.toPoint=yt,wt.defs=L,wt.nadgrid=function(t,s){var i=new DataView(s),a=function(t){var s=t.getInt32(8,!1);return 11!==s&&(11!==(s=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(i),h=function(t,s){return{nFields:t.getInt32(8,s),nSubgridFields:t.getInt32(24,s),nSubgrids:t.getInt32(40,s),shiftType:ht(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,s),fromSemiMinorAxis:t.getFloat64(136,s),toSemiMajorAxis:t.getFloat64(152,s),toSemiMinorAxis:t.getFloat64(168,s)}}(i,a),e=function(t,s,i){for(var a=176,h=[],e=0;e{var a=i(5072),h=i.n(a),e=i(7825),n=i.n(e),r=i(7659),o=i.n(r),l=i(5056),c=i.n(l),u=i(540),M=i.n(u),d=i(1113),f=i.n(d),p=i(4096),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=o().bind(null,"head"),m.domAPI=n(),m.insertStyleElement=M(),h()(p.A,m),p.A&&p.A.locals&&p.A.locals},4078:(t,s,i)=>{i.d(s,{kz:()=>r});var a=i(5286),h=i(3407),e=i(3158);let n=null;function r(t){n=t;const s=Object.keys(t.defs),i=s.length;let r,o;for(r=0;r{i.d(s,{A:()=>r});var a=i(1601),h=i.n(a),e=i(6314),n=i.n(e)()(h());n.push([t.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const r=n},8110:(t,s,i)=>{i.d(s,{A:()=>oi});var a=1,h=2,e=3,n=5,r=6378137,o=6356752.314,l=.0066943799901413165,c=484813681109536e-20,u=Math.PI/2,M=1e-10,d=.017453292519943295,f=57.29577951308232,p=Math.PI/4,m=2*Math.PI,y=3.14159265359,g={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const x={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var _=/[\s_\-\/\(\)]/g;function v(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),h=s.toLowerCase().replace(_,""),e=-1;++e=this.text.length)return;t=this.text[this.place++]}switch(this.state){case N:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},A.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(S.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},A.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=N)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=N,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},A.prototype.number=function(t){if(!E.test(t)){if(S.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},A.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},A.prototype.keyword=function(t){if(P.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=N)}if(!S.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},A.prototype.neutral=function(t){if(C.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(E.test(t))return this.word=t,void(this.state=3);if(!S.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},A.prototype.output=function(){for(;this.place0?90:-90)):(t.lat0=z(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(h),h}function G(t){var s=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?G[t]=b(arguments[1]):G[t]=j(arguments[1]):G[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?G.apply(s,t):G(t)}));if("string"==typeof t){if(t in G)return G[t]}else"EPSG"in t?G["EPSG:"+t.EPSG]=t:"ESRI"in t?G["ESRI:"+t.ESRI]=t:"IAU2000"in t?G["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(G);const L=G;var R=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],B=["3857","900913","3785","102113"];function T(t,s){var i,a;if(t=t||{},!s)return t;for(a in s)void 0!==(i=s[a])&&(t[a]=i);return t}function F(t,s,i){var a=t*s;return i/Math.sqrt(1-a*a)}function D(t){return t<0?-1:1}function U(t){return Math.abs(t)<=y?t:t-D(t)*m}function Q(t,s,i){var a=t*i,h=.5*t;return a=Math.pow((1-a)/(1+a),h),Math.tan(.5*(u-s))/a}function W(t,s){for(var i,a,h=.5*t,e=u-2*Math.atan(s),n=0;n<=15;n++)if(i=t*Math.sin(e),e+=a=u-2*Math.atan(s*Math.pow((1-i)/(1+i),h))-e,Math.abs(a)<=1e-10)return e;return-9999}function J(t){return t}var X=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=F(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var s,i,a=t.x,h=t.y;if(h*f>90&&h*f<-90&&a*f>180&&a*f<-180)return null;if(Math.abs(Math.abs(h)-u)<=M)return null;if(this.sphere)s=this.x0+this.a*this.k0*U(a-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(p+.5*h));else{var e=Math.sin(h),n=Q(this.e,h,e);s=this.x0+this.a*this.k0*U(a-this.long0),i=this.y0-this.a*this.k0*Math.log(n)}return t.x=s,t.y=i,t},inverse:function(t){var s,i,a=t.x-this.x0,h=t.y-this.y0;if(this.sphere)i=u-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var e=Math.exp(-h/(this.a*this.k0));if(-9999===(i=W(this.e,e)))return null}return s=U(this.long0+a/(this.a*this.k0)),t.x=s,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:J,inverse:J,names:["longlat","identity"]}],H={},K=[];function V(t,s){var i=K.length;return t.names?(K[i]=t,t.names.forEach((function(t){H[t.toLowerCase()]=i})),this):(console.log(s),!0)}const Z={start:function(){X.forEach(V)},add:V,get:function(t){if(!t)return!1;var s=t.toLowerCase();return void 0!==H[s]&&K[H[s]]?K[H[s]]:void 0}};var Y={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},$=Y.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Y.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var tt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},militargeographische_institut:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var st={};function it(t){if(0===t.length)return null;var s="@"===t[0];return s&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!s,grid:null,isNull:!0}:{name:t,mandatory:!s,grid:st[t]||null,isNull:!1}}function at(t){return t/3600*Math.PI/180}function ht(t,s,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(s,i)))}function et(t){return t.map((function(t){return[at(t.longitudeShift),at(t.latitudeShift)]}))}function nt(t,s,i){return{name:ht(t,s+8,s+16).trim(),parent:ht(t,s+24,s+24+8).trim(),lowerLatitude:t.getFloat64(s+72,i),upperLatitude:t.getFloat64(s+88,i),lowerLongitude:t.getFloat64(s+104,i),upperLongitude:t.getFloat64(s+120,i),latitudeInterval:t.getFloat64(s+136,i),longitudeInterval:t.getFloat64(s+152,i),gridNodeCount:t.getInt32(s+168,i)}}function rt(t,s,i,a){for(var h=s+176,e=[],n=0;n-1}))}(t)){var s=j(t);if(function(t){var s=v(t,"authority");if(s){var i=v(s,"epsg");return i&&B.indexOf(i)>-1}}(s))return L["EPSG:3857"];var i=function(t){var s=v(t,"extension");if(s)return v(s,"proj4")}(s);return i?b(i):s}return function(t){return"+"===t[0]}(t)?b(t):void 0}(t);if("object"==typeof i){var r=ot.projections.get(i.projName);if(r){if(i.datumCode&&"none"!==i.datumCode){var o=v(tt,i.datumCode);o&&(i.datum_params=i.datum_params||(o.towgs84?o.towgs84.split(","):null),i.ellps=o.ellipse,i.datumName=o.datumName?o.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var l,u,d,f,p,m,y=function(t,s,i,a,h){if(!t){var e=v(Y,a);e||(e=$),t=e.a,s=e.b,i=e.rf}return i&&!s&&(s=(1-1/i)*t),(0===i||Math.abs(t-s)3&&(0===M.datum_params[3]&&0===M.datum_params[4]&&0===M.datum_params[5]&&0===M.datum_params[6]||(M.datum_type=h,M.datum_params[3]*=c,M.datum_params[4]*=c,M.datum_params[5]*=c,M.datum_params[6]=M.datum_params[6]/1e6+1))),u&&(M.datum_type=e,M.grids=u),M.a=i,M.b=r,M.es=o,M.ep2=l,M}(i.datumCode,i.datum_params,y.a,y.b,g.es,g.ep2,x);T(this,i),T(this,r),this.a=y.a,this.b=y.b,this.rf=y.rf,this.sphere=y.sphere,this.es=g.es,this.e=g.e,this.ep2=g.ep2,this.datum=_,this.init(),s(null,this)}else s(t)}else s(t)}ot.projections=Z,ot.projections.start();const lt=ot;function ct(t,s,i){var a,h,e,n,r=t.x,o=t.y,l=t.z?t.z:0;if(o<-u&&o>-1.001*u)o=-u;else if(o>u&&o<1.001*u)o=u;else{if(o<-u)return{x:-1/0,y:-1/0,z:t.z};if(o>u)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),h=Math.sin(o),n=Math.cos(o),e=h*h,{x:((a=i/Math.sqrt(1-s*e))+l)*n*Math.cos(r),y:(a+l)*n*Math.sin(r),z:(a*(1-s)+l)*h}}function ut(t,s,i,a){var h,e,n,r,o,l,c,u,M,d,f,p,m,y,g,x=t.x,_=t.y,v=t.z?t.z:0;if(h=Math.sqrt(x*x+_*_),e=Math.sqrt(x*x+_*_+v*v),h/i<1e-12){if(y=0,e/i<1e-12)return g=-a,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(_,x);n=v/e,u=(r=h/e)*(1-s)*(o=1/Math.sqrt(1-s*(2-s)*r*r)),M=n*o,m=0;do{m++,l=s*(c=i/Math.sqrt(1-s*M*M))/(c+(g=h*u+v*M-c*(1-s*M*M))),p=(f=n*(o=1/Math.sqrt(1-l*(2-l)*r*r)))*u-(d=r*(1-l)*o)*M,u=d,M=f}while(p*p>1e-24&&m<30);return{x:y,y:Math.atan(f/Math.abs(d)),z:g}}function Mt(t){return t===a||t===h}function dt(t,s,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var a={x:-i.x,y:i.y},h={x:Number.NaN,y:Number.NaN},e=[];t:for(var n=0;na.y||d>a.x||y1e-12&&Math.abs(n.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),a;a.x=U(e.x+i.ll[0]),a.y=e.y+i.ll[1]}else isNaN(e.x)||(a.x=t.x+e.x,a.y=t.y+e.y);return a}function pt(t,s){var i,a={x:t.x/s.del[0],y:t.y/s.del[1]},h=Math.floor(a.x),e=Math.floor(a.y),n=a.x-1*h,r=a.y-1*e,o={x:Number.NaN,y:Number.NaN};if(h<0||h>=s.lim[0])return o;if(e<0||e>=s.lim[1])return o;i=e*s.lim[0]+h;var l=s.cvs[i][0],c=s.cvs[i][1];i++;var u=s.cvs[i][0],M=s.cvs[i][1];i+=s.lim[0];var d=s.cvs[i][0],f=s.cvs[i][1];i--;var p=s.cvs[i][0],m=s.cvs[i][1],y=n*r,g=n*(1-r),x=(1-n)*(1-r),_=(1-n)*r;return o.x=x*l+g*u+_*p+y*d,o.y=x*c+g*M+_*m+y*f,o}function mt(t,s,i){var a,h,e,n=i.x,r=i.y,o=i.z||0,l={};for(e=0;e<3;e++)if(!s||2!==e||void 0!==i.z)switch(0===e?(a=n,h=-1!=="ew".indexOf(t.axis[e])?"x":"y"):1===e?(a=r,h=-1!=="ns".indexOf(t.axis[e])?"y":"x"):(a=o,h="z"),t.axis[e]){case"e":case"n":l[h]=a;break;case"w":case"s":l[h]=-a;break;case"u":void 0!==i[h]&&(l.z=a);break;case"d":void 0!==i[h]&&(l.z=-a);break;default:return null}return l}function yt(t){var s={x:t[0],y:t[1]};return t.length>2&&(s.z=t[2]),t.length>3&&(s.m=t[3]),s}function gt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function xt(t,s,i,c){var u,M=void 0!==(i=Array.isArray(i)?yt(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){gt(t.x),gt(t.y)}(i),t.datum&&s.datum&&function(t,s){return(t.datum.datum_type===a||t.datum.datum_type===h||t.datum.datum_type===e)&&"WGS84"!==s.datumCode||(s.datum.datum_type===a||s.datum.datum_type===h||s.datum.datum_type===e)&&"WGS84"!==t.datumCode}(t,s)&&(i=xt(t,u=new lt("WGS84"),i,c),t=u),c&&"enu"!==t.axis&&(i=mt(t,!1,i)),"longlat"===t.projName)i={x:i.x*d,y:i.y*d,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=function(t,s,i){if(function(t,s){return t.datum_type===s.datum_type&&!(t.a!==s.a||Math.abs(t.es-s.es)>5e-11)&&(t.datum_type===a?t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]:t.datum_type!==h||t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]&&t.datum_params[3]===s.datum_params[3]&&t.datum_params[4]===s.datum_params[4]&&t.datum_params[5]===s.datum_params[5]&&t.datum_params[6]===s.datum_params[6])}(t,s))return i;if(t.datum_type===n||s.datum_type===n)return i;var c=t.a,u=t.es;if(t.datum_type===e){if(0!==dt(t,!1,i))return;c=r,u=l}var M=s.a,d=s.b,f=s.es;return s.datum_type===e&&(M=r,d=o,f=l),u!==f||c!==M||Mt(t.datum_type)||Mt(s.datum_type)?(i=ct(i,u,c),Mt(t.datum_type)&&(i=function(t,s,i){if(s===a)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(s===h){var e=i[0],n=i[1],r=i[2],o=i[3],l=i[4],c=i[5],u=i[6];return{x:u*(t.x-c*t.y+l*t.z)+e,y:u*(c*t.x+t.y-o*t.z)+n,z:u*(-l*t.x+o*t.y+t.z)+r}}}(i,t.datum_type,t.datum_params)),Mt(s.datum_type)&&(i=function(t,s,i){if(s===a)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(s===h){var e=i[0],n=i[1],r=i[2],o=i[3],l=i[4],c=i[5],u=i[6],M=(t.x-e)/u,d=(t.y-n)/u,f=(t.z-r)/u;return{x:M+c*d-l*f,y:-c*M+d+o*f,z:l*M-o*d+f}}}(i,s.datum_type,s.datum_params)),i=ut(i,f,M,d),s.datum_type!==e||0===dt(s,!0,i)?i:void 0):i}(t.datum,s.datum,i))return s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y,z:i.z||0}),"longlat"===s.projName?i={x:i.x*f,y:i.y*f,z:i.z||0}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter,z:i.z||0})),c&&"enu"!==s.axis?mt(s,!0,i):(i&&!M&&delete i.z,i)}var _t=lt("WGS84");function vt(t,s,i,a){var h,e,n;return Array.isArray(i)?(h=xt(t,s,i,a)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name?"number"==typeof h.z?[h.x,h.y,h.z].concat(i.splice(3)):[h.x,h.y,i[2]].concat(i.splice(3)):[h.x,h.y].concat(i.splice(2)):[h.x,h.y]):(e=xt(t,s,i,a),2===(n=Object.keys(i)).length||n.forEach((function(a){if(void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name){if("x"===a||"y"===a||"z"===a)return}else if("x"===a||"y"===a)return;e[a]=i[a]})),e)}function bt(t){return t instanceof lt?t:t.oProj?t.oProj:lt(t)}const wt=function(t,s,i){t=bt(t);var a,h=!1;return void 0===s?(s=t,t=_t,h=!0):(void 0!==s.x||Array.isArray(s))&&(i=s,s=t,t=_t,h=!0),s=bt(s),i?vt(t,s,i):(a={forward:function(i,a){return vt(t,s,i,a)},inverse:function(i,a){return vt(s,t,i,a)}},h&&(a.oProj=s),a)};var Nt=6,kt="AJSAJS",Ct="AFAFAF",Pt=65,St=73,Et=79,At=86,It=90;const qt={forward:Ot,inverse:function(t){var s=Lt(Bt(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat,s.lon,s.lat]:[s.left,s.bottom,s.right,s.top]},toPoint:zt};function Ot(t,s){return s=s||5,function(t,s){var i,a,h,e,n,r,o,l,c,u,M,d="00000"+t.easting,f="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(c=t.easting,u=t.northing,M=Rt(t.zoneNumber),i=Math.floor(c/1e5),a=Math.floor(u/1e5)%20,h=M-1,e=kt.charCodeAt(h),n=Ct.charCodeAt(h),l=!1,(r=e+i-1)>It&&(r=r-It+Pt-1,l=!0),(r===St||eSt||(r>St||eEt||(r>Et||eIt&&(r=r-It+Pt-1),(o=n+a)>At?(o=o-At+Pt-1,l=!0):l=!1,(o===St||nSt||(o>St||nEt||(o>Et||nAt&&(o=o-At+Pt-1),String.fromCharCode(r)+String.fromCharCode(o))+d.substr(d.length-5,s)+f.substr(f.length-5,s)}(function(t){var s,i,a,h,e,n,r,o=t.lat,l=t.lon,c=6378137,u=.00669438,M=.9996,d=jt(o),f=jt(l);r=Math.floor((l+180)/6)+1,180===l&&(r=60),o>=56&&o<64&&l>=3&&l<12&&(r=32),o>=72&&o<84&&(l>=0&&l<9?r=31:l>=9&&l<21?r=33:l>=21&&l<33?r=35:l>=33&&l<42&&(r=37)),n=jt(6*(r-1)-180+3),s=.006739496752268451,i=c/Math.sqrt(1-u*Math.sin(d)*Math.sin(d)),a=Math.tan(d)*Math.tan(d),h=s*Math.cos(d)*Math.cos(d);var p,m,y=M*i*((e=Math.cos(d)*(f-n))+(1-a+h)*e*e*e/6+(5-18*a+a*a+72*h-58*s)*e*e*e*e*e/120)+5e5,g=M*(c*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d))+i*Math.tan(d)*(e*e/2+(5-a+9*h+4*h*h)*e*e*e*e/24+(61-58*a+a*a+600*h-2.2240339282485886)*e*e*e*e*e*e/720));return o<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(y),zoneNumber:r,zoneLetter:(p=o,m="Z",84>=p&&p>=72?m="X":72>p&&p>=64?m="W":64>p&&p>=56?m="V":56>p&&p>=48?m="U":48>p&&p>=40?m="T":40>p&&p>=32?m="S":32>p&&p>=24?m="R":24>p&&p>=16?m="Q":16>p&&p>=8?m="P":8>p&&p>=0?m="N":0>p&&p>=-8?m="M":-8>p&&p>=-16?m="L":-16>p&&p>=-24?m="K":-24>p&&p>=-32?m="J":-32>p&&p>=-40?m="H":-40>p&&p>=-48?m="G":-48>p&&p>=-56?m="F":-56>p&&p>=-64?m="E":-64>p&&p>=-72?m="D":-72>p&&p>=-80&&(m="C"),m)}}({lat:t[1],lon:t[0]}),s)}function zt(t){var s=Lt(Bt(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat]:[(s.left+s.right)/2,(s.top+s.bottom)/2]}function jt(t){return t*(Math.PI/180)}function Gt(t){return t/Math.PI*180}function Lt(t){var s=t.northing,i=t.easting,a=t.zoneLetter,h=t.zoneNumber;if(h<0||h>60)return null;var e,n,r,o,l,c,u,M,d,f=.9996,p=6378137,m=.00669438,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),g=i-5e5,x=s;a<"N"&&(x-=1e7),u=6*(h-1)-180+3,e=.006739496752268451,d=(M=x/f/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*M)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*M)+151*y*y*y/96*Math.sin(6*M),n=p/Math.sqrt(1-m*Math.sin(d)*Math.sin(d)),r=Math.tan(d)*Math.tan(d),o=e*Math.cos(d)*Math.cos(d),l=.99330562*p/Math.pow(1-m*Math.sin(d)*Math.sin(d),1.5),c=g/(n*f);var _=d-n*Math.tan(d)/l*(c*c/2-(5+3*r+10*o-4*o*o-9*e)*c*c*c*c/24+(61+90*r+298*o+45*r*r-1.6983531815716497-3*o*o)*c*c*c*c*c*c/720);_=Gt(_);var v,b=(c-(1+2*r+o)*c*c*c/6+(5-2*o+28*r-3*o*o+8*e+24*r*r)*c*c*c*c*c/120)/Math.cos(d);if(b=u+Gt(b),t.accuracy){var w=Lt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});v={top:w.lat,right:w.lon,bottom:_,left:b}}else v={lat:_,lon:b};return v}function Rt(t){var s=t%Nt;return 0===s&&(s=Nt),s}function Bt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,h="",e=0;!/[A-Z]/.test(s=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;h+=s,e++}var n=parseInt(h,10);if(0===e||e+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(e++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;a=t.substring(e,e+=2);for(var o=Rt(n),l=function(t,s){for(var i=kt.charCodeAt(s-1),a=1e5,h=!1;i!==t.charCodeAt(0);){if(++i===St&&i++,i===Et&&i++,i>It){if(h)throw"Bad character: "+t;i=Pt,h=!0}a+=1e5}return a}(a.charAt(0),o),c=function(t,s){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=Ct.charCodeAt(s-1),a=0,h=!1;i!==t.charCodeAt(0);){if(++i===St&&i++,i===Et&&i++,i>At){if(h)throw"Bad character: "+t;i=Pt,h=!0}a+=1e5}return a}(a.charAt(1),o);c0&&(M=1e5/Math.pow(10,p),d=t.substring(e,e+p),m=parseFloat(d)*M,f=t.substring(e+p),y=parseFloat(f)*M),{easting:m+l,northing:y+c,zoneLetter:r,zoneNumber:n,accuracy:M}}function Tt(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(s>=0)return s;throw"Invalid zone letter: "+t}function Ft(t,s,i){if(!(this instanceof Ft))return new Ft(t,s,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===s){var a=t.split(",");this.x=parseFloat(a[0],10),this.y=parseFloat(a[1],10),this.z=parseFloat(a[2],10)||0}else this.x=t,this.y=s,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ft.fromMGRS=function(t){return new Ft(zt(t))},Ft.prototype.toMGRS=function(t){return Ot([this.x,this.y],t)};const Dt=Ft;var Ut=.046875,Qt=.01953125,Wt=.01068115234375;function Jt(t){var s=[];s[0]=1-t*(.25+t*(Ut+t*(Qt+t*Wt))),s[1]=t*(.75-t*(Ut+t*(Qt+t*Wt)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s}function Xt(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))}function Ht(t,s,i){for(var a=1/(1-s),h=t,e=20;e;--e){var n=Math.sin(h),r=1-s*n*n;if(h-=r=(Xt(h,n,Math.cos(h),i)-t)*(r*Math.sqrt(r))*a,Math.abs(r)M?Math.tan(e):0,p=Math.pow(f,2),m=Math.pow(p,2);s=1-this.es*Math.pow(r,2),l/=Math.sqrt(s);var y=Xt(e,r,o,this.en);i=this.a*(this.k0*l*(1+c/6*(1-p+u+c/20*(5-18*p+m+14*u-58*p*u+c/42*(61+179*m-m*p-479*p)))))+this.x0,a=this.a*(this.k0*(y-this.ml0+r*n*l/2*(1+c/12*(5-p+9*u+4*d+c/30*(61+m-58*p+270*u-330*p*u+c/56*(1385+543*m-m*p-3111*p))))))+this.y0}else{var g=o*Math.sin(n);if(Math.abs(Math.abs(g)-1)=1){if(g-1>M)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return t.x=i,t.y=a,t},inverse:function(t){var s,i,a,h,e=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(this.es)if(i=Ht(s=this.ml0+n/this.k0,this.es,this.en),Math.abs(i)M?Math.tan(i):0,c=this.ep2*Math.pow(o,2),d=Math.pow(c,2),f=Math.pow(l,2),p=Math.pow(f,2);s=1-this.es*Math.pow(r,2);var m=e*Math.sqrt(s)/this.k0,y=Math.pow(m,2);a=i-(s*=l)*y/(1-this.es)*.5*(1-y/12*(5+3*f-9*c*f+c-4*d-y/30*(61+90*f-252*c*f+45*p+46*c-y/56*(1385+3633*f+4095*p+1574*p*f)))),h=U(this.long0+m*(1-y/6*(1+2*f+c-y/20*(5+28*f+24*p+8*c*f+6*c-y/42*(61+662*f+1320*p+720*p*f))))/o)}else a=u*D(n),h=0;else{var g=Math.exp(e/this.k0),x=.5*(g-1/g),_=this.lat0+n/this.k0,v=Math.cos(_);s=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(x,2))),a=Math.asin(s),n<0&&(a=-a),h=0===x&&0===v?0:U(Math.atan2(x,v)+this.long0)}return t.x=h,t.y=a,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Vt(t){var s=Math.exp(t);return(s-1/s)/2}function Zt(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),a=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(a,2))}function Yt(t,s){for(var i,a=2*Math.cos(2*s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return s+i*Math.sin(2*s)}function $t(t,s,i){for(var a,h,e=Math.sin(s),n=Math.cos(s),r=Vt(i),o=function(t){var s=Math.exp(t);return(s+1/s)/2}(i),l=2*n*o,c=-2*e*r,u=t.length-1,M=t[u],d=0,f=0,p=0;--u>=0;)a=f,h=d,M=l*(f=M)-a-c*(d=p)+t[u],p=c*f-h+l*d;return[(l=e*o)*M-(c=n*r)*p,l*p+c*M]}const ts={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Kt.init.apply(this),this.forward=Kt.forward,this.inverse=Kt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),i=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+s*(-2854/675)))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+s*(4642/4725)))))-2),i*=s,this.cgb[1]=i*(7/3+s*(s*(-227/45+s*(2704/315+s*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+s*(-16/15+s*(-13/9+s*(904/315+s*(-1522/945))))),i*=s,this.cgb[2]=i*(56/15+s*(-136/35+s*(-1262/105+s*(73814/2835)))),this.cbg[2]=i*(-26/15+s*(34/21+s*(1.6+s*(-12686/2835)))),i*=s,this.cgb[3]=i*(4279/630+s*(-332/35+s*(-399572/14175))),this.cbg[3]=i*(1237/630+s*(s*(-24832/14175)-2.4)),i*=s,this.cgb[4]=i*(4174/315+s*(-144838/6237)),this.cbg[4]=i*(-734/315+s*(109598/31185)),i*=s,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+s*(-96199/604800)))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+s*(7891/37800)))))),this.utg[1]=i*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+s*(1118711/3870720))))),this.gtu[1]=i*(13/48+s*(s*(557/1440+s*(281/630+s*(-1983433/1935360)))-.6)),i*=s,this.utg[2]=i*(-17/480+s*(37/840+s*(209/4480+s*(-5569/90720)))),this.gtu[2]=i*(61/240+s*(-103/140+s*(15061/26880+s*(167603/181440)))),i*=s,this.utg[3]=i*(-4397/161280+s*(11/504+s*(830251/7257600))),this.gtu[3]=i*(49561/161280+s*(-179/168+s*(6601661/7257600))),i*=s,this.utg[4]=i*(-4583/161280+s*(108847/3991680)),this.gtu[4]=i*(34729/80640+s*(-3418889/1995840)),i*=s,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var a=Yt(this.cbg,this.lat0);this.Zb=-this.Qn*(a+function(t,s){for(var i,a=2*Math.cos(s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return Math.sin(s)*i}(this.gtu,2*a))},forward:function(t){var s=U(t.x-this.long0),i=t.y;i=Yt(this.cbg,i);var a=Math.sin(i),h=Math.cos(i),e=Math.sin(s),n=Math.cos(s);i=Math.atan2(a,n*h),s=Math.atan2(e*h,Zt(a,h*n)),s=function(t){var s=Math.abs(t);return s=function(t){var s=1+t,i=s-1;return 0===i?t:t*Math.log(s)/i}(s*(1+s/(Zt(1,s)+1))),t<0?-s:s}(Math.tan(s));var r,o,l=$t(this.gtu,2*i,2*s);return i+=l[0],s+=l[1],Math.abs(s)<=2.623395162778?(r=this.a*(this.Qn*s)+this.x0,o=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,o=1/0),t.x=r,t.y=o,t},inverse:function(t){var s,i,a=(t.x-this.x0)*(1/this.a),h=(t.y-this.y0)*(1/this.a);if(h=(h-this.Zb)/this.Qn,a/=this.Qn,Math.abs(a)<=2.623395162778){var e=$t(this.utg,2*h,2*a);h+=e[0],a+=e[1],a=Math.atan(Vt(a));var n=Math.sin(h),r=Math.cos(h),o=Math.sin(a),l=Math.cos(a);h=Math.atan2(n*l,Zt(o,l*r)),s=U((a=Math.atan2(o,l*r))+this.long0),i=Yt(this.cgb,h)}else s=1/0,i=1/0;return t.x=s,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},ss={init:function(){var t=function(t,s){if(void 0===t){if((t=Math.floor(30*(U(s)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*d,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ts.init.apply(this),this.forward=ts.forward,this.inverse=ts.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function is(t,s){return Math.pow((1-t)/(1+t),s)}const as={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+p)/(Math.pow(Math.tan(.5*this.lat0+p),this.C)*is(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+p),this.C)*is(this.e*Math.sin(i),this.ratexp))-u,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,a=Math.pow(Math.tan(.5*i+p)/this.K,1/this.C),h=20;h>0&&(i=2*Math.atan(a*is(this.e*Math.sin(t.y),-.5*this.e))-u,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null},names:["gauss"]},hs={init:function(){as.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,h;return t.x=U(t.x-this.long0),as.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=h*i*Math.sin(t.x),t.y=h*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,h,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Zt(t.x,t.y)){var n=2*Math.atan2(e,this.R2);s=Math.sin(n),i=Math.cos(n),h=Math.asin(i*this.sinc0+t.y*s*this.cosc0/e),a=Math.atan2(t.x*s,e*this.cosc0*i-t.y*this.sinc0*s)}else h=this.phic0,a=0;return t.x=a,t.y=h,as.inverse.apply(this,[t]),t.x=U(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},es={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=M&&(this.k0=.5*(1+D(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=M&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=M&&Math.abs(Math.cos(this.lat_ts))>M&&(this.k0=.5*this.cons*F(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Q(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=F(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-u,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,l=Math.sin(o),c=Math.cos(o),d=U(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=M&&Math.abs(o+this.lat0)<=M?(t.x=NaN,t.y=NaN,t):this.sphere?(s=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(d)),t.x=this.a*s*c*Math.sin(d)+this.x0,t.y=this.a*s*(this.coslat0*l-this.sinlat0*c*Math.cos(d))+this.y0,t):(i=2*Math.atan(this.ssfn_(o,l,this.e))-u,h=Math.cos(i),a=Math.sin(i),Math.abs(this.coslat0)<=M?(e=Q(this.e,o*this.con,this.con*l),n=2*this.a*this.k0*e/this.cons,t.x=this.x0+n*Math.sin(r-this.long0),t.y=this.y0-this.con*n*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)0?U(this.long0+Math.atan2(t.x,-1*t.y)):U(this.long0+Math.atan2(t.x,t.y)):U(this.long0+Math.atan2(t.x*Math.sin(r),n*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=s,t.y=i,t)}if(Math.abs(this.coslat0)<=M){if(n<=M)return i=this.lat0,s=this.long0,t.x=s,t.y=i,t;t.x*=this.con,t.y*=this.con,a=n*this.cons/(2*this.a*this.k0),i=this.con*W(this.e,a),s=this.con*U(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else h=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),s=this.long0,n<=M?e=this.X0:(e=Math.asin(Math.cos(h)*this.sinX0+t.y*Math.sin(h)*this.cosX0/n),s=U(this.long0+Math.atan2(t.x*Math.sin(h),n*this.cosX0*Math.cos(h)-t.y*this.sinX0*Math.sin(h)))),i=-1*W(this.e,Math.tan(.5*(u+e)));return t.x=s,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function(t,s,i){return s*=i,Math.tan(.5*(u+t))*Math.pow((1-s)/(1+s),.5*i)}},ns={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,h=2*a-Math.pow(a,2),e=this.e=Math.sqrt(h);this.R=this.k0*i*Math.sqrt(1-h)/(1-h*Math.pow(s,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*s)/(1-e*s));this.K=n-this.alpha*r+this.alpha*e/2*o},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,h=2*(Math.atan(Math.exp(a))-Math.PI/4),e=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(e)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(e))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(e));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var s=t.x-this.x0,i=t.y-this.y0,a=s/this.R,h=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),e=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(a)),n=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(h))),r=this.lambda0+n/this.alpha,o=0,l=e,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+e/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]};var rs=1e-7;const os={init:function(){var t,s,i,a,h,e,n,r,o,l,c,f,y,g=0,x=0,_=0,v=0,b=0,w=0,N=0;this.no_off=(y="object"==typeof(f=this).PROJECTION?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(y)),this.no_rot="no_rot"in this;var k=!1;"alpha"in this&&(k=!0);var C=!1;if("rectified_grid_angle"in this&&(C=!0),k&&(N=this.alpha),C&&(g=this.rectified_grid_angle*d),k||C)x=this.longc;else if(_=this.long1,b=this.lat1,v=this.long2,w=this.lat2,Math.abs(b-w)<=rs||(t=Math.abs(b))<=rs||Math.abs(t-u)<=rs||Math.abs(Math.abs(this.lat0)-u)<=rs||Math.abs(Math.abs(w)-u)<=rs)throw new Error;var P=1-this.es;s=Math.sqrt(P),Math.abs(this.lat0)>M?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/P),this.A=this.B*this.k0*s/t,(h=(a=this.B*s/(i*Math.sqrt(t)))*a-1)<=0?h=0:(h=Math.sqrt(h),this.lat0<0&&(h=-h)),this.E=h+=a,this.E*=Math.pow(Q(this.e,this.lat0,r),this.B)):(this.B=1/s,this.A=this.k0,this.E=a=h=1),k||C?(k?(c=Math.asin(Math.sin(N)/a),C||(g=N)):(c=g,N=Math.asin(a*Math.sin(c))),this.lam0=x-Math.asin(.5*(h-1/h)*Math.tan(c))/this.B):(e=Math.pow(Q(this.e,b,Math.sin(b)),this.B),n=Math.pow(Q(this.e,w,Math.sin(w)),this.B),h=this.E/e,o=(n-e)/(n+e),l=((l=this.E*this.E)-n*e)/(l+n*e),(t=_-v)<-Math.pi?v-=m:t>Math.pi&&(v+=m),this.lam0=U(.5*(_+v)-Math.atan(l*Math.tan(.5*this.B*(_-v))/o)/this.B),c=Math.atan(2*Math.sin(this.B*U(_-this.lam0))/(h-1/h)),g=N=Math.asin(a*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(g),this.cosrot=Math.cos(g),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(a*a-1)/Math.cos(N))),this.lat0<0&&(this.u_0=-this.u_0)),h=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(p-h)),this.v_pole_s=this.ArB*Math.log(Math.tan(p+h))},forward:function(t){var s,i,a,h,e,n,r,o,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-u)>M){if(s=.5*((e=this.E/Math.pow(Q(this.e,t.y,Math.sin(t.y)),this.B))-(n=1/e)),i=.5*(e+n),h=Math.sin(this.B*t.x),a=(s*this.singam-h*this.cosgam)/i,Math.abs(Math.abs(a)-1)0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=o):(r-=this.u_0,l.x=o*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-o*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var s,i,a,h,e,n,r,o={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,s=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,s=t.y*this.cosrot+t.x*this.sinrot+this.u_0),h=.5*((a=Math.exp(-this.BrA*i))-1/a),e=.5*(a+1/a),r=((n=Math.sin(this.BrA*s))*this.cosgam+h*this.singam)/e,Math.abs(Math.abs(r)-1)M?this.ns=Math.log(a/r)/Math.log(h/o):this.ns=s,isNaN(this.ns)&&(this.ns=s),this.f0=a/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=M&&(i=D(i)*(u-2e-10));var a,h,e=Math.abs(Math.abs(i)-u);if(e>M)a=Q(this.e,i,Math.sin(i)),h=this.a*this.f0*Math.pow(a,this.ns);else{if((e=i*this.ns)<=0)return null;h=0}var n=this.ns*U(s-this.long0);return t.x=this.k0*(h*Math.sin(n))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(n))+this.y0,t},inverse:function(t){var s,i,a,h,e,n=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(s=Math.sqrt(n*n+r*r),i=1):(s=-Math.sqrt(n*n+r*r),i=-1);var o=0;if(0!==s&&(o=Math.atan2(i*n,i*r)),0!==s||this.ns>0){if(i=1/this.ns,a=Math.pow(s/(this.a*this.f0),i),-9999===(h=W(this.e,a)))return null}else h=-u;return e=U(o/this.ns+this.long0),t.x=e,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},cs={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y,c=U(o-this.long0);return s=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/s)-this.s45),a=-c*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(a)),e=Math.asin(Math.cos(i)*Math.sin(a)/Math.cos(h)),n=this.n*e,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=r*Math.cos(n)/1,t.x=r*Math.sin(n)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,h,e,n,r,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(h)),i=Math.asin(Math.cos(a)*Math.sin(h)/Math.cos(s)),t.x=this.long0-i/this.alfa,n=s,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(r=1),n=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function us(t,s,i,a,h){return t*h-s*Math.sin(2*h)+i*Math.sin(4*h)-a*Math.sin(6*h)}function Ms(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function ds(t){return.375*t*(1+.25*t*(1+.46875*t))}function fs(t){return.05859375*t*t*(1+.75*t)}function ps(t){return t*t*t*(35/3072)}function ms(t,s,i){var a=s*i;return t/Math.sqrt(1-a*a)}function ys(t){return Math.abs(t)1e-7?(1-t*t)*(s/(1-(i=t*s)*i)-.5/t*Math.log((1-i)/(1+i))):2*s}const vs={init:function(){var t,s=Math.abs(this.lat0);if(Math.abs(s-u)0)switch(this.qp=_s(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var s,i=[];return i[0]=.3333333333333333*t,s=t*t,i[0]+=.17222222222222222*s,i[1]=.06388888888888888*s,s*=t,i[0]+=.10257936507936508*s,i[1]+=.0664021164021164*s,i[2]=.016415012942191543*s,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=_s(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,a,h,e,n,r,o,l,c,d=t.x,f=t.y;if(d=U(d-this.long0),this.sphere){if(e=Math.sin(f),c=Math.cos(f),a=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*a:1+this.sinph0*e+this.cosph0*c*a)<=M)return null;s=(i=Math.sqrt(2/i))*c*Math.sin(d),i*=this.mode===this.EQUIT?e:this.cosph0*e-this.sinph0*c*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(f+this.lat0)=0?(s=(l=Math.sqrt(n))*h,i=a*(this.mode===this.S_POLE?l:-l)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o,l,c,d=t.x/this.a,f=t.y/this.a;if(this.sphere){var p,m=0,y=0;if((i=.5*(p=Math.sqrt(d*d+f*f)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(y=Math.sin(i),m=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(p)<=M?0:Math.asin(f*y/p),d*=y,f=m*p;break;case this.OBLIQ:i=Math.abs(p)<=M?this.lat0:Math.asin(m*this.sinph0+f*y*this.cosph0/p),d*=y*this.cosph0,f=(m-Math.sin(i)*this.sinph0)*p;break;case this.N_POLE:f=-f,i=u-i;break;case this.S_POLE:i-=u}s=0!==f||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,f):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,f*=this.dd,(n=Math.sqrt(d*d+f*f))1&&(t=t>1?1:-1),Math.asin(t)}const ws={init:function(){Math.abs(this.lat1+this.lat2)M?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=_s(this.e3,this.sin_phi),h=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,e=this.ns0*U(s-this.long0),n=h*Math.sin(e)+this.x0,r=this.rh-h*Math.cos(e)+this.y0;return t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),h=0,0!==s&&(h=Math.atan2(a*t.x,a*t.y)),a=s*this.ns0/this.a,this.sphere?n=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,n=this.phi1z(this.e3,i)),e=U(h/this.ns0+this.long0),t.x=e,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,e,n=bs(.5*s);if(t0||Math.abs(e)<=M?(n=this.x0+1*this.a*i*Math.sin(a)/e,r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)/e):(n=this.x0+this.infinity_dist*i*Math.sin(a),r=this.y0+this.infinity_dist*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(s=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(s,this.rc),i=Math.sin(h),n=bs((a=Math.cos(h))*this.sin_p14+t.y*i*this.cos_p14/s),e=Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i),e=U(this.long0+e)):(n=this.phic0,e=0),t.x=e,t.y=n,t},names:["gnom"]},ks={init:function(){this.sphere||(this.k0=F(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,h=t.y,e=U(a-this.long0);if(this.sphere)s=this.x0+this.a*e*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var n=_s(this.e,Math.sin(h));s=this.x0+this.a*this.k0*e,i=this.y0+this.a*n*.5/this.k0}return t.x=s,t.y=i,t},inverse:function(t){var s,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(s=U(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*u:u;for(var a,h,e,n,r=Math.asin(.5*s),o=0;o<30;o++)if(h=Math.sin(r),e=Math.cos(r),n=t*h,r+=a=Math.pow(1-n*n,2)/(2*e)*(s/(1-t*t)-h/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),Math.abs(a)<=1e-10)return r;return NaN}(this.e,2*t.y*this.k0/this.a),s=U(this.long0+t.x/(this.a*this.k0))),t.x=s,t.y=i,t},names:["cea"]},Cs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,a=U(s-this.long0),h=ys(i-this.lat0);return t.x=this.x0+this.a*a*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var s=t.x,i=t.y;return t.x=U(this.long0+(s-this.x0)/(this.a*this.rc)),t.y=ys(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Ps={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ms(this.es),this.e1=ds(this.es),this.e2=fs(this.es),this.e3=ps(this.es),this.ml0=this.a*us(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i,a,h=t.x,e=t.y,n=U(h-this.long0);if(a=n*Math.sin(e),this.sphere)Math.abs(e)<=M?(s=this.a*n,i=-1*this.a*this.lat0):(s=this.a*Math.sin(a)/Math.tan(e),i=this.a*(ys(e-this.lat0)+(1-Math.cos(a))/Math.tan(e)));else if(Math.abs(e)<=M)s=this.a*n,i=-1*this.ml0;else{var r=ms(this.a,this.e,Math.sin(e))/Math.tan(e);s=r*Math.sin(a),i=this.a*us(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+r*(1-Math.cos(a))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,e,n,r,o,l;if(a=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=M)s=U(a/this.a+this.long0),i=0;else{var c;for(n=this.lat0+h/this.a,r=a*a/this.a/this.a+n*n,o=n,e=20;e;--e)if(o+=l=-1*(n*(o*(c=Math.tan(o))+1)-o-.5*(o*o+r)*c)/((o-n)/c-1),Math.abs(l)<=M){i=o;break}s=U(this.long0+Math.asin(a*Math.tan(o)/this.a)/Math.sin(i))}else if(Math.abs(h+this.ml0)<=M)i=0,s=U(this.long0+a/this.a);else{var u,d,f,p,m;for(n=(this.ml0+h)/this.a,r=a*a/this.a/this.a+n*n,o=n,e=20;e;--e)if(m=this.e*Math.sin(o),u=Math.sqrt(1-m*m)*Math.tan(o),d=this.a*us(this.e0,this.e1,this.e2,this.e3,o),f=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o),o-=l=(n*(u*(p=d/this.a)+1)-p-.5*u*(p*p+r))/(this.es*Math.sin(2*o)*(p*p+r-2*n*p)/(4*u)+(n-p)*(u*f-2/Math.sin(2*o))-f),Math.abs(l)<=M){i=o;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=U(this.long0+Math.asin(a*u/this.a)/Math.sin(i))}return t.x=s,t.y=i,t},names:["Polyconic","poly"]},Ss={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var s,i=t.x,a=t.y-this.lat0,h=i-this.long0,e=a/c*1e-5,n=h,r=1,o=0;for(s=1;s<=10;s++)r*=e,o+=this.A[s]*r;var l,u=o,M=n,d=1,f=0,p=0,m=0;for(s=1;s<=6;s++)l=f*u+d*M,d=d*u-f*M,f=l,p=p+this.B_re[s]*d-this.B_im[s]*f,m=m+this.B_im[s]*d+this.B_re[s]*f;return t.x=m*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var s,i,a=t.x,h=t.y,e=a-this.x0,n=(h-this.y0)/this.a,r=e/this.a,o=1,l=0,u=0,M=0;for(s=1;s<=6;s++)i=l*n+o*r,o=o*n-l*r,l=i,u=u+this.C_re[s]*o-this.C_im[s]*l,M=M+this.C_im[s]*o+this.C_re[s]*l;for(var d=0;d.999999999999&&(i=.999999999999),s=Math.asin(i);var a=U(this.long0+t.x/(.900316316158*this.a*Math.cos(s)));a<-Math.PI&&(a=-Math.PI),a>Math.PI&&(a=Math.PI),i=(2*s+Math.sin(2*s))/Math.PI,Math.abs(i)>1&&(i=1);var h=Math.asin(i);return t.x=a,t.y=h,t},names:["Mollweide","moll"]},qs={init:function(){Math.abs(this.lat1+this.lat2)=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1);var e=0;return 0!==i&&(e=Math.atan2(s*t.x,s*t.y)),this.sphere?(h=U(this.long0+e/this.ns),a=ys(this.g-i/this.a),t.x=h,t.y=a,t):(a=gs(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),h=U(this.long0+e/this.ns),t.x=h,t.y=a,t)},names:["Equidistant_Conic","eqdc"]},Os={init:function(){this.R=this.a},forward:function(t){var s,i,a=t.x,h=t.y,e=U(a-this.long0);Math.abs(h)<=M&&(s=this.x0+this.R*e,i=this.y0);var n=bs(2*Math.abs(h/Math.PI));(Math.abs(e)<=M||Math.abs(Math.abs(h)-u)<=M)&&(s=this.x0,i=h>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var r=.5*Math.abs(Math.PI/e-e/Math.PI),o=r*r,l=Math.sin(n),c=Math.cos(n),d=c/(l+c-1),f=d*d,p=d*(2/l-1),m=p*p,y=Math.PI*this.R*(r*(d-m)+Math.sqrt(o*(d-m)*(d-m)-(m+o)*(f-m)))/(m+o);e<0&&(y=-y),s=this.x0+y;var g=o+d;return y=Math.PI*this.R*(p*g-r*Math.sqrt((m+o)*(o+1)-g*g))/(m+o),i=h>=0?this.y0+y:this.y0-y,t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,c,u,d;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,e=(a=t.x/u)*a+(h=t.y/u)*h,u=3*(h*h/(o=-2*(n=-Math.abs(h)*(1+e))+1+2*h*h+e*e)+(2*(r=n-2*h*h+a*a)*r*r/o/o/o-9*n*r/o/o)/27)/(l=(n-r*r/3/o)/o)/(c=2*Math.sqrt(-l/3)),Math.abs(u)>1&&(u=u>=0?1:-1),d=Math.acos(u)/3,i=t.y>=0?(-c*Math.cos(d+Math.PI/3)-r/3/o)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-r/3/o)*Math.PI,s=Math.abs(a)2*u*this.a)return;return i=s/this.a,a=Math.sin(i),h=Math.cos(i),e=this.long0,Math.abs(s)<=M?n=this.lat0:(n=bs(h*this.sin_p12+t.y*a*this.cos_p12/s),r=Math.abs(this.lat0)-u,e=Math.abs(r)<=M?this.lat0>=0?U(this.long0+Math.atan2(t.x,-t.y)):U(this.long0-Math.atan2(-t.x,t.y)):U(this.long0+Math.atan2(t.x*a,s*this.cos_p12*h-t.y*this.sin_p12*a))),t.x=e,t.y=n,t}return o=Ms(this.es),l=ds(this.es),c=fs(this.es),d=ps(this.es),Math.abs(this.sin_p12-1)<=M?(n=gs(((f=this.a*us(o,l,c,d,u))-(s=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,o,l,c,d),e=U(this.long0+Math.atan2(t.x,-1*t.y)),t.x=e,t.y=n,t):Math.abs(this.sin_p12+1)<=M?(f=this.a*us(o,l,c,d,u),n=gs(((s=Math.sqrt(t.x*t.x+t.y*t.y))-f)/this.a,o,l,c,d),e=U(this.long0+Math.atan2(t.x,t.y)),t.x=e,t.y=n,t):(s=Math.sqrt(t.x*t.x+t.y*t.y),y=Math.atan2(t.x,t.y),p=ms(this.a,this.e,this.sin_p12),g=Math.cos(y),_=-(x=this.e*this.cos_p12*g)*x/(1-this.es),v=3*this.es*(1-_)*this.sin_p12*this.cos_p12*g/(1-this.es),N=1-_*(w=(b=s/p)-_*(1+_)*Math.pow(b,3)/6-v*(1+3*_)*Math.pow(b,4)/24)*w/2-b*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*g),e=U(this.long0+Math.asin(Math.sin(y)*Math.sin(w)/Math.cos(m))),k=Math.sin(m),n=Math.atan2((k-this.es*N*this.sin_p12)*Math.tan(m),k*(1-this.es)),t.x=e,t.y=n,t)},names:["Azimuthal_Equidistant","aeqd"]},js={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=U(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),((e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=M)&&(n=1*this.a*i*Math.sin(a),r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n,r;return t.x-=this.x0,t.y-=this.y0,i=bs((s=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),a=Math.sin(i),h=Math.cos(i),n=this.long0,Math.abs(s)<=M?(r=this.lat0,t.x=n,t.y=r,t):(r=bs(h*this.sin_p14+t.y*a*this.cos_p14/s),e=Math.abs(this.lat0)-u,Math.abs(e)<=M?(n=this.lat0>=0?U(this.long0+Math.atan2(t.x,-t.y)):U(this.long0-Math.atan2(-t.x,t.y)),t.x=n,t.y=r,t):(n=U(this.long0+Math.atan2(t.x*a,s*this.cos_p14*h-t.y*this.sin_p14*a)),t.x=n,t.y=r,t))},names:["ortho"]};var Gs=1,Ls=2,Rs=3,Bs=4;function Ts(t,s,i,a){var h;return tp&&h<=u+p?(a.value=Ls,h-=u):h>u+p||h<=-(u+p)?(a.value=Rs,h=h>=0?h-y:h+y):(a.value=Bs,h+=u)),h}function Fs(t,s){var i=t+s;return i<-y?i+=m:i>+y&&(i-=m),i}const Ds={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=u-p/2?this.face=5:this.lat0<=-(u-p/2)?this.face=6:Math.abs(this.long0)<=p?this.face=1:Math.abs(this.long0)<=u+p?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,a,h,e,n,r={x:0,y:0},o={value:0};if(t.x-=this.long0,s=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,5===this.face)h=u-s,i>=p&&i<=u+p?(o.value=Gs,a=i-u):i>u+p||i<=-(u+p)?(o.value=Ls,a=i>0?i-y:i+y):i>-(u+p)&&i<=-p?(o.value=Rs,a=i+u):(o.value=Bs,a=i);else if(6===this.face)h=u+s,i>=p&&i<=u+p?(o.value=Gs,a=-i+u):i=-p?(o.value=Ls,a=-i):i<-p&&i>=-(u+p)?(o.value=Rs,a=-i-u):(o.value=Bs,a=i>0?-i+y:-i-y);else{var l,c,M,d,f,m;2===this.face?i=Fs(i,+u):3===this.face?i=Fs(i,+y):4===this.face&&(i=Fs(i,-u)),d=Math.sin(s),f=Math.cos(s),m=Math.sin(i),l=f*Math.cos(i),c=f*m,M=d,1===this.face?a=Ts(h=Math.acos(l),M,c,o):2===this.face?a=Ts(h=Math.acos(c),M,-l,o):3===this.face?a=Ts(h=Math.acos(-l),M,-c,o):4===this.face?a=Ts(h=Math.acos(-c),M,l,o):(h=a=0,o.value=Gs)}return n=Math.atan(12/y*(a+Math.acos(Math.sin(a)*Math.cos(p))-u)),e=Math.sqrt((1-Math.cos(h))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(a))))),o.value===Ls?n+=u:o.value===Rs?n+=y:o.value===Bs&&(n+=1.5*y),r.x=e*Math.cos(n),r.y=e*Math.sin(n),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,c,M,d,f={lam:0,phi:0},p={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?p.value=Gs:t.y>=0&&t.y>=Math.abs(t.x)?(p.value=Ls,s-=u):t.x<0&&-t.x>=Math.abs(t.y)?(p.value=Rs,s=s<0?s+y:s-y):(p.value=Bs,s+=u),l=y/12*Math.tan(s),e=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(e),(r=1-(a=Math.cos(s))*a*(h=Math.tan(i))*h*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?r=-1:r>1&&(r=1),5===this.face)o=Math.acos(r),f.phi=u-o,p.value===Gs?f.lam=n+u:p.value===Ls?f.lam=n<0?n+y:n-y:p.value===Rs?f.lam=n-u:f.lam=n;else if(6===this.face)o=Math.acos(r),f.phi=o-u,p.value===Gs?f.lam=-n+u:p.value===Ls?f.lam=-n:p.value===Rs?f.lam=-n-u:f.lam=n<0?-n-y:-n+y;else{var m,g,x;l=(m=r)*m,g=(l+=(x=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*x)>=1?0:Math.sqrt(1-l),p.value===Ls?(l=g,g=-x,x=l):p.value===Rs?(g=-g,x=-x):p.value===Bs&&(l=g,g=x,x=-l),2===this.face?(l=m,m=-g,g=l):3===this.face?(m=-m,g=-g):4===this.face&&(l=m,m=g,g=-l),f.phi=Math.acos(-x)-u,f.lam=Math.atan2(g,m),2===this.face?f.lam=Fs(f.lam,-u):3===this.face?f.lam=Fs(f.lam,-y):4===this.face&&(f.lam=Fs(f.lam,+u))}return 0!==this.es&&(c=f.phi<0?1:0,M=Math.tan(f.phi),d=this.b/Math.sqrt(M*M+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi)),f.lam+=this.long0,t.x=f.lam,t.y=f.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Us=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Qs=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ws=.8487,Js=1.3523,Xs=f/5,Hs=1/Xs,Ks=function(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))};const Vs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=U(t.x-this.long0),i=Math.abs(t.y),a=Math.floor(i*Xs);a<0?a=0:a>=18&&(a=17);var h={x:Ks(Us[a],i=f*(i-Hs*a))*s,y:Ks(Qs[a],i)};return t.y<0&&(h.y=-h.y),h.x=h.x*this.a*Ws+this.x0,h.y=h.y*this.a*Js+this.y0,h},inverse:function(t){var s={x:(t.x-this.x0)/(this.a*Ws),y:Math.abs(t.y-this.y0)/(this.a*Js)};if(s.y>=1)s.x/=Us[18][0],s.y=t.y<0?-u:u;else{var i=Math.floor(18*s.y);for(i<0?i=0:i>=18&&(i=17);;)if(Qs[i][0]>s.y)--i;else{if(!(Qs[i+1][0]<=s.y))break;++i}var a=Qs[i],h=5*(s.y-a[0])/(Qs[i+1][0]-a[0]);h=function(t,s,i,a){for(var h=s;a;--a){var e=t(h);if(h-=e,Math.abs(e)<1e-10)break}return h}((function(t){return(Ks(a,t)-s.y)/function(t,s){return t[1]+s*(2*t[2]+3*s*t[3])}(a,t)}),h,0,100),s.x/=Ks(Us[i],h),s.y=(5*i+h)*d,t.y<0&&(s.y=-s.y)}return s.x=U(s.x+this.long0),s},names:["Robinson","robin"]},Zs={init:function(){this.name="geocent"},forward:function(t){return ct(t,this.es,this.a)},inverse:function(t){return ut(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var Ys={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const $s={init:function(){if(Object.keys(Ys).forEach(function(t){if(void 0===this[t])this[t]=Ys[t].def;else{if(Ys[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ys[t].num&&(this[t]=parseFloat(this[t]))}Ys[t].degrees&&(this[t]=this[t]*d)}.bind(this)),Math.abs(Math.abs(this.lat0)-u)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,s=this.azi;this.cg=Math.cos(s),this.sg=Math.sin(s),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var s,i,a,h,e=Math.sin(t.y),n=Math.cos(t.y),r=Math.cos(t.x);switch(this.mode){case 3:i=this.sinph0*e+this.cosph0*n*r;break;case 2:i=n*r;break;case 1:i=-e;break;case 0:i=e}switch(s=(i=this.pn1/(this.p-i))*n*Math.sin(t.x),this.mode){case 3:i*=this.cosph0*e-this.sinph0*n*r;break;case 2:i*=e;break;case 0:i*=-n*r;break;case 1:i*=n*r}return h=1/((a=i*this.cg+s*this.sg)*this.sw*this.h1+this.cw),s=(s*this.cg-i*this.sg)*this.cw*h,i=a*h,t.x=s*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var s,i,a,h={x:t.x,y:t.y};a=1/(this.pn1-t.y*this.sw),s=this.pn1*t.x*a,i=this.pn1*t.y*this.cw*a,t.x=s*this.cg+i*this.sg,t.y=i*this.cg-s*this.sg;var e=Zt(t.x,t.y);if(Math.abs(e)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,s=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=s,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var s,i,a,h,e=t.x,n=t.y;if(e-=this.long0,"ellipse"===this.shape){n=Math.atan(this.radius_p2*Math.tan(n));var r=this.radius_p/Zt(this.radius_p*Math.cos(n),Math.sin(n));if(i=r*Math.cos(e)*Math.cos(n),a=r*Math.sin(e)*Math.cos(n),h=r*Math.sin(n),(this.radius_g-i)*i-a*a-h*h*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(a/Zt(h,s)),t.y=this.radius_g_1*Math.atan(h/s)):(t.x=this.radius_g_1*Math.atan(a/s),t.y=this.radius_g_1*Math.atan(h/Zt(a,s)))}else"sphere"===this.shape&&(s=Math.cos(n),i=Math.cos(e)*s,a=Math.sin(e)*s,h=Math.sin(n),s=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(a/Zt(h,s)),t.y=this.radius_g_1*Math.atan(h/s)):(t.x=this.radius_g_1*Math.atan(a/s),t.y=this.radius_g_1*Math.atan(h/Zt(a,s))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var s,i,a,h,e=-1,n=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Zt(1,r)):(n=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Zt(1,n));var o=r/this.radius_p;if(s=n*n+o*o+e*e,(a=(i=2*this.radius_g*e)*i-4*s*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;h=(-i-Math.sqrt(a))/(2*s),e=this.radius_g+h*e,n*=h,r*=h,t.x=Math.atan2(n,e),t.y=Math.atan(r*Math.cos(t.x)/e),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),n=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(n=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+n*n)),s=n*n+r*r+e*e,(a=(i=2*this.radius_g*e)*i-4*s*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;h=(-i-Math.sqrt(a))/(2*s),e=this.radius_g+h*e,n*=h,r*=h,t.x=Math.atan2(n,e),t.y=Math.atan(r*Math.cos(t.x)/e)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var si=1.340264,ii=-.081106,ai=893e-6,hi=.003796,ei=Math.sqrt(3)/2;const ni={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var s=U(t.x-this.long0),i=t.y,a=Math.asin(ei*Math.sin(i)),h=a*a,e=h*h*h;return t.x=s*Math.cos(a)/(ei*(si+3*ii*h+e*(7*ai+9*hi*h))),t.y=a*(si+ii*h+e*(ai+hi*h)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var s,i,a,h,e=t.y;for(h=0;h<12&&(e-=a=(e*(si+ii*(s=e*e)+(i=s*s*s)*(ai+hi*s))-t.y)/(si+3*ii*s+i*(7*ai+9*hi*s)),!(Math.abs(a)<1e-9));++h);return i=(s=e*e)*s*s,t.x=ei*t.x*(si+3*ii*s+i*(7*ai+9*hi*s))/Math.cos(e),t.y=Math.asin(Math.sin(e)/ei),t.x=U(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]};var ri;wt.defaultDatum="WGS84",wt.Proj=lt,wt.WGS84=new wt.Proj("WGS84"),wt.Point=Dt,wt.toPoint=yt,wt.defs=L,wt.nadgrid=function(t,s){var i=new DataView(s),a=function(t){var s=t.getInt32(8,!1);return 11!==s&&(11!==(s=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(i),h=function(t,s){return{nFields:t.getInt32(8,s),nSubgridFields:t.getInt32(24,s),nSubgrids:t.getInt32(40,s),shiftType:ht(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,s),fromSemiMinorAxis:t.getFloat64(136,s),toSemiMajorAxis:t.getFloat64(152,s),toSemiMinorAxis:t.getFloat64(168,s)}}(i,a),e=function(t,s,i){for(var a=176,h=[],e=0;e{var a=i(5072),h=i.n(a),e=i(7825),n=i.n(e),r=i(7659),o=i.n(r),l=i(5056),c=i.n(l),u=i(540),M=i.n(u),d=i(1113),f=i.n(d),p=i(4096),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=o().bind(null,"head"),m.domAPI=n(),m.insertStyleElement=M(),h()(p.A,m),p.A&&p.A.locals&&p.A.locals},4078:(t,s,i)=>{i.d(s,{kz:()=>r});var a=i(5286),h=i(3407),e=i(3158);let n=null;function r(t){n=t;const s=Object.keys(t.defs),i=s.length;let r,o;for(r=0;r{t.r(n),t.d(n,{default:()=>m});var o=t(6540);const r=JSON.parse('{"U$":{"yvL":{"rE":"5.3.3"},"Deh":{"rE":"9.2.3"},"N69":{"rE":"2.11.0"},"JDG":{"rE":"18.3.1"}}}'),l=r.U$.JDG.rE,s=r.U$.Deh.rE,a=r.U$.yvL.rE,i=r.U$.N69.rE,p=e=>e.replace(/\//g,".").replace(/rlayers\.style/g,"rlayers.RStyle").replace(/rlayers\.control/g,"rlayers.RControl").replace(/rlayers\.interaction/g,"rlayers.RInteraction").replace(/react/g,"React"),m=o.memo((function(e){const[n,t]=o.useState("loading()");o.useEffect((()=>{e.text.then((e=>{let n;const o=[];let r=/import .*\{([A-Za-z,\s\n]+)\}.* from '(.*)'/g;for(;null!==(n=r.exec(e));){const e=n[1].replace(/\s/g,"").replace(/\n/g,"").split(","),t=p(n[2]);for(const n of e)o.push({from:n,to:`${t}.${n}`})}for(r=/import ([A-Za-z]+) from '(ol.*)'/g;null!==(n=r.exec(e));){const e=p(n[2]);o.push({from:n[1],to:e})}for(r=/import ([A-Za-z]+) from '(.*\.svg)'/g;null!==(n=r.exec(e));){const e=`'https://cdn.jsdelivr.net/npm/rlayers/examples/${n[2]}'`;o.push({from:n[1],to:e})}e=(e=(e=e.replace(/import [^;]+;\n/g,"")).replace(/^\n+/,"")).replace(/export default function (.*)/,"function Comp() {"),e+="\nReactDOM.createRoot(document.getElementById('root')).render();\n",o.length>0&&(e="\n"+e);for(const n of o.reverse())e=`const ${n.from} = ${n.to};\n`+e;t(e)}))}),[e.text]);const r=o.useRef();return n&&n.match(/in CodePen/)?null:o.createElement("form",{className:"position-absolute my-2 mx-4",style:{top:"0px",right:"0px"},ref:r,action:"https://codepen.io/pen/define",method:"POST",target:"_blank"},o.createElement("input",{type:"hidden",name:"data",value:JSON.stringify({title:"rlayers "+e.title,description:"This is an editable example from rlayers - https://mmomtchev.githb.io/rlayers",tags:["openlayers","react","maps","rlayers"],html:'
\n
\n
\n
',js:n,js_pre_processor:"typescript",css:".example-map p,\n.jumbotron p {\n margin: 0;\n padding: 0;\n}\n\n.example-map {\n width: 100%;\n height: 60vh;\n margin-bottom: 1em;\n}\n\n.no-interaction {\n user-select: none;\n pointer-events: none;\n}\n\n.example-overlay {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n user-select: none;\n pointer-events: none;\n position: absolute;\n width: max-content;\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 15px;\n border-radius: 10px;\n border: 1px solid #cccccc;\n}\n\n.example-control {\n top: 2.5em;\n right: 0.5em;\n}\n\n.example-list {\n width: 150px;\n max-width: 150px;\n min-width: 150px;\n font-size: 0.7em;\n list-style: lower-latin;\n padding: 0;\n overflow: hidden;\n}\n\n.example-list ul {\n padding: 0;\n overflow: hidden;\n}\n\n.example-list li {\n font-style: italic;\n overflow: hidden;\n}\n\n.example-overview .ol-overviewmap-map {\n border: none !important;\n width: 300px !important;\n}\n\n.example-overview .ol-overviewmap-box {\n border: 2px solid blue;\n}\n\n.example-overview,\n.example-overview.ol-uncollapsible {\n bottom: auto !important;\n left: auto !important;\n right: 0 !important;\n top: 0 !important;\n}\n\n.example-overview:not(.ol-collapsed) button {\n bottom: auto !important;\n left: auto !important;\n right: 1px !important;\n top: 1px !important;\n}\n\n.example-fullscreen {\n top: 5em;\n right: 0.5em;\n}\n\n.fullscreen:-webkit-full-screen {\n height: 100%;\n margin: 0;\n}\n\n.fullscreen:-ms-fullscreen {\n height: 100%;\n}\n\n.fullscreen:fullscreen {\n height: 100%;\n}\n\n.fullscreen {\n margin-bottom: 10px;\n width: 100%;\n height: 400px;\n}\n\n.example-spinner {\n position: absolute;\n top: 40%;\n left: 40%;\n width: 20%;\n height: 20%;\n z-index: 1000;\n}\n\n.example-spinner>img {\n width: 100%;\n}\n",js_external:`https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/js/bootstrap.min.js;https://cdnjs.cloudflare.com/ajax/libs/react/${l}/umd/react.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/react-dom/${l}/umd/react-dom.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/proj4js/${i}/proj4.js;https://cdn.jsdelivr.net/npm/ol@v${s}/dist/ol.js;https://cdn.jsdelivr.net/npm/rlayers@3.0.1`,css_external:`https://cdn.jsdelivr.net/npm/ol@v${s}/ol.css;https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/css/bootstrap.min.css`})}),o.createElement("button",{className:"btn border mb-2 bg-light",onClick:()=>{r.current.submit()}},o.createElement("span",{className:"me-2 align-middle"},"Edit on"),o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 138 26",height:"24px",fill:"none",stroke:"#000",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("path",{d:"M80 6h-9v14h9 M114 6h-9 v14h9 M111 13h-6 M77 13h-6 M122 20V6l11 14V6 M22 16.7L33 24l11-7.3V9.3L33 2L22 9.3V16.7z M44 16.7L33 9.3l-11 7.4 M22 9.3l11 7.3 l11-7.3 M33 2v7.3 M33 16.7V24 M88 14h6c2.2 0 4-1.8 4-4s-1.8-4-4-4h-6v14 M15 8c-1.3-1.3-3-2-5-2c-4 0-7 3-7 7s3 7 7 7 c2 0 3.7-0.8 5-2 M64 13c0 4-3 7-7 7h-5V6h5C61 6 64 9 64 13z"}))))}))}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6782],{6782:(e,n,t)=>{t.r(n),t.d(n,{default:()=>m});var o=t(6540);const r=JSON.parse('{"U$":{"yvL":{"rE":"5.3.3"},"Deh":{"rE":"10.0.0"},"N69":{"rE":"2.11.0"},"JDG":{"rE":"18.3.1"}}}'),l=r.U$.JDG.rE,s=r.U$.Deh.rE,a=r.U$.yvL.rE,i=r.U$.N69.rE,p=e=>e.replace(/\//g,".").replace(/rlayers\.style/g,"rlayers.RStyle").replace(/rlayers\.control/g,"rlayers.RControl").replace(/rlayers\.interaction/g,"rlayers.RInteraction").replace(/react/g,"React"),m=o.memo((function(e){const[n,t]=o.useState("loading()");o.useEffect((()=>{e.text.then((e=>{let n;const o=[];let r=/import .*\{([A-Za-z,\s\n]+)\}.* from '(.*)'/g;for(;null!==(n=r.exec(e));){const e=n[1].replace(/\s/g,"").replace(/\n/g,"").split(","),t=p(n[2]);for(const n of e)o.push({from:n,to:`${t}.${n}`})}for(r=/import ([A-Za-z]+) from '(ol.*)'/g;null!==(n=r.exec(e));){const e=p(n[2]);o.push({from:n[1],to:e})}for(r=/import ([A-Za-z]+) from '(.*\.svg)'/g;null!==(n=r.exec(e));){const e=`'https://cdn.jsdelivr.net/npm/rlayers/examples/${n[2]}'`;o.push({from:n[1],to:e})}e=(e=(e=e.replace(/import [^;]+;\n/g,"")).replace(/^\n+/,"")).replace(/export default function (.*)/,"function Comp() {"),e+="\nReactDOM.createRoot(document.getElementById('root')).render();\n",o.length>0&&(e="\n"+e);for(const n of o.reverse())e=`const ${n.from} = ${n.to};\n`+e;t(e)}))}),[e.text]);const r=o.useRef();return n&&n.match(/in CodePen/)?null:o.createElement("form",{className:"position-absolute my-2 mx-4",style:{top:"0px",right:"0px"},ref:r,action:"https://codepen.io/pen/define",method:"POST",target:"_blank"},o.createElement("input",{type:"hidden",name:"data",value:JSON.stringify({title:"rlayers "+e.title,description:"This is an editable example from rlayers - https://mmomtchev.githb.io/rlayers",tags:["openlayers","react","maps","rlayers"],html:'
\n
\n
\n
',js:n,js_pre_processor:"typescript",css:".example-map p,\n.jumbotron p {\n margin: 0;\n padding: 0;\n}\n\n.example-map {\n width: 100%;\n height: 60vh;\n margin-bottom: 1em;\n}\n\n.no-interaction {\n user-select: none;\n pointer-events: none;\n}\n\n.example-overlay {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n user-select: none;\n pointer-events: none;\n position: absolute;\n width: max-content;\n background-color: white;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);\n padding: 15px;\n border-radius: 10px;\n border: 1px solid #cccccc;\n}\n\n.example-control {\n top: 2.5em;\n right: 0.5em;\n}\n\n.example-list {\n width: 150px;\n max-width: 150px;\n min-width: 150px;\n font-size: 0.7em;\n list-style: lower-latin;\n padding: 0;\n overflow: hidden;\n}\n\n.example-list ul {\n padding: 0;\n overflow: hidden;\n}\n\n.example-list li {\n font-style: italic;\n overflow: hidden;\n}\n\n.example-overview .ol-overviewmap-map {\n border: none !important;\n width: 300px !important;\n}\n\n.example-overview .ol-overviewmap-box {\n border: 2px solid blue;\n}\n\n.example-overview,\n.example-overview.ol-uncollapsible {\n bottom: auto !important;\n left: auto !important;\n right: 0 !important;\n top: 0 !important;\n}\n\n.example-overview:not(.ol-collapsed) button {\n bottom: auto !important;\n left: auto !important;\n right: 1px !important;\n top: 1px !important;\n}\n\n.example-fullscreen {\n top: 5em;\n right: 0.5em;\n}\n\n.fullscreen:-webkit-full-screen {\n height: 100%;\n margin: 0;\n}\n\n.fullscreen:-ms-fullscreen {\n height: 100%;\n}\n\n.fullscreen:fullscreen {\n height: 100%;\n}\n\n.fullscreen {\n margin-bottom: 10px;\n width: 100%;\n height: 400px;\n}\n\n.example-spinner {\n position: absolute;\n top: 40%;\n left: 40%;\n width: 20%;\n height: 20%;\n z-index: 1000;\n}\n\n.example-spinner>img {\n width: 100%;\n}\n",js_external:`https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/js/bootstrap.min.js;https://cdnjs.cloudflare.com/ajax/libs/react/${l}/umd/react.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/react-dom/${l}/umd/react-dom.development.min.js;https://cdnjs.cloudflare.com/ajax/libs/proj4js/${i}/proj4.js;https://cdn.jsdelivr.net/npm/ol@v${s}/dist/ol.js;https://cdn.jsdelivr.net/npm/rlayers@3.1.0`,css_external:`https://cdn.jsdelivr.net/npm/ol@v${s}/ol.css;https://cdn.jsdelivr.net/npm/bootstrap@${a}/dist/css/bootstrap.min.css`})}),o.createElement("button",{className:"btn border mb-2 bg-light",onClick:()=>{r.current.submit()}},o.createElement("span",{className:"me-2 align-middle"},"Edit on"),o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 138 26",height:"24px",fill:"none",stroke:"#000",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("path",{d:"M80 6h-9v14h9 M114 6h-9 v14h9 M111 13h-6 M77 13h-6 M122 20V6l11 14V6 M22 16.7L33 24l11-7.3V9.3L33 2L22 9.3V16.7z M44 16.7L33 9.3l-11 7.4 M22 9.3l11 7.3 l11-7.3 M33 2v7.3 M33 16.7V24 M88 14h6c2.2 0 4-1.8 4-4s-1.8-4-4-4h-6v14 M15 8c-1.3-1.3-3-2-5-2c-4 0-7 3-7 7s3 7 7 7 c2 0 3.7-0.8 5-2 M64 13c0 4-3 7-7 7h-5V6h5C61 6 64 9 64 13z"}))))}))}}]); \ No newline at end of file diff --git a/681.bundle.js b/681.bundle.js index 34534fa9..c836a5fd 100644 --- a/681.bundle.js +++ b/681.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[681],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},783:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const i=a},5045:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),u=l.n(s),b=l(540),d=l.n(b),p=l(1113),m=l.n(p),g=l(4096),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},7601:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),u=l.n(s),b=l(540),d=l.n(b),p=l(1113),m=l.n(p),g=l(783),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},681:(n,o,l)=>{l.r(o),l.d(o,{default:()=>c});var e=l(6540),r=l(3407),t=(l(5045),l(7601),l(7240));const a=[2.364,48.82],i={center:(0,r.Rb)(a),zoom:11};function c(){const[n,o]=e.useState(a),[l,c]=e.useState(i);return e.createElement(e.Fragment,null,e.createElement(t.f9,{className:"example-map",initial:i,view:[l,c],noDefaultControls:!0,onClick:(0,e.useCallback)((n=>{const l=n.map.getCoordinateFromPixel(n.pixel),e=(0,r.WP)(l);o(e)}),[])},e.createElement(t.ej,null),e.createElement(t.E6.H4,null),e.createElement(t.E6.ON,null),e.createElement(t.E6.WP,null),e.createElement(t.E6.ni,null),e.createElement(t.E6.yO,{className:"example-fullscreen",source:"fullscreen",label:"扩",labelActive:"噏"}),e.createElement(t.E6.Es,{className:"example-control"},e.createElement("button",{onClick:()=>c({...l,center:(0,r.Rb)(n)})},"o"))),e.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow"},e.createElement("p",null,"Last click location is"," ",e.createElement("strong",null,`${n[1].toFixed(3)} : ${n[0].toFixed(3)}`))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[681],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},783:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const i=a},5045:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),u=l.n(s),b=l(540),d=l.n(b),p=l(1113),m=l.n(p),g=l(4096),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},7601:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),u=l.n(s),b=l(540),d=l.n(b),p=l(1113),m=l.n(p),g=l(783),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},681:(n,o,l)=>{l.r(o),l.d(o,{default:()=>c});var e=l(6540),r=l(3407),t=(l(5045),l(7601),l(7240));const a=[2.364,48.82],i={center:(0,r.Rb)(a),zoom:11};function c(){const[n,o]=e.useState(a),[l,c]=e.useState(i);return e.createElement(e.Fragment,null,e.createElement(t.f9,{className:"example-map",initial:i,view:[l,c],noDefaultControls:!0,onClick:(0,e.useCallback)((n=>{const l=n.map.getCoordinateFromPixel(n.pixel),e=(0,r.WP)(l);o(e)}),[])},e.createElement(t.ej,null),e.createElement(t.E6.H4,null),e.createElement(t.E6.ON,null),e.createElement(t.E6.WP,null),e.createElement(t.E6.ni,null),e.createElement(t.E6.yO,{className:"example-fullscreen",source:"fullscreen",label:"扩",labelActive:"噏"}),e.createElement(t.E6.Es,{className:"example-control"},e.createElement("button",{onClick:()=>c({...l,center:(0,r.Rb)(n)})},"o"))),e.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow"},e.createElement("p",null,"Last click location is"," ",e.createElement("strong",null,`${n[1].toFixed(3)} : ${n[0].toFixed(3)}`))))}}}]); \ No newline at end of file diff --git a/6946.bundle.js b/6946.bundle.js deleted file mode 100644 index 02b2307f..00000000 --- a/6946.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[6946],{6675:e=>{function t(e,t){const i=new RegExp(t,"g"),r=e.match(i);return r?r.length:0}e.exports=t,e.exports.default=t},8556:(e,t,i)=>{const r=i(3614),s=i(8694),n=i(6675);function o(e,t,i){const o=i&&i.debug||!1,a=!(i&&!1===typeof i.nested),l=i&&i.startIndex||0;o&&console.log("[xml-utils] starting findTagByName with",t," and ",i);const h=r(e,`<${t}[ \n>/]`,l);if(o&&console.log("[xml-utils] start:",h),-1===h)return;const c=e.slice(h+t.length);let u=s(c,"^[^<]*[ /]>",0);const f=-1!==u&&"/"===c[u-1];if(o&&console.log("[xml-utils] selfClosing:",f),!1===f)if(a){let e=0,i=1,r=0;for(;-1!==(u=s(c,"[ /]"+t+">",e));){const s=c.substring(e,u+1);if(i+=n(s,"<"+t+"[ \n\t>]"),r+=n(s,""),r>=i)break;e=u}}else u=s(c,"[ /]"+t+">",0);const g=h+t.length+u+1;if(o&&console.log("[xml-utils] end:",g),-1===g)return;const d=e.slice(h,g);let p;return p=f?null:d.slice(d.indexOf(">")+1,d.lastIndexOf("<")),{inner:p,outer:d,start:h,end:g}}e.exports=o,e.exports.default=o},563:(e,t,i)=>{const r=i(8556);function s(e,t,i){const s=[],n=i&&i.debug||!1,o=!i||"boolean"!=typeof i.nested||i.nested;let a,l=i&&i.startIndex||0;for(;a=r(e,t,{debug:n,startIndex:l});)l=o?a.start+1+t.length:a.end,s.push(a);return n&&console.log("findTagsByName found",s.length,"tags"),s}e.exports=s,e.exports.default=s},7379:e=>{function t(e,t,i){const r=i&&i.debug||!1;r&&console.log("[xml-utils] getting "+t+" in "+e);const s="object"==typeof e?e.outer:e,n=s.slice(0,s.indexOf(">")+1),o=['"',"'"];for(let e=0;e{function t(e,t,i){const r=new RegExp(t).exec(e.slice(i));return r?i+r.index+r[0].length-1:-1}e.exports=t,e.exports.default=t},3614:e=>{function t(e,t,i){const r=new RegExp(t).exec(e.slice(i));return r?i+r.index:-1}e.exports=t,e.exports.default=t},8622:(e,t,i)=>{"use strict";i.d(t,{$:()=>r,AC:()=>h,Hm:()=>f,NZ:()=>n,S3:()=>u,TZ:()=>c,s$:()=>a,ub:()=>l});const r={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},s={};for(const e in r)r.hasOwnProperty(e)&&(s[r[e]]=parseInt(e,10));const n=[s.BitsPerSample,s.ExtraSamples,s.SampleFormat,s.StripByteCounts,s.StripOffsets,s.StripRowCounts,s.TileByteCounts,s.TileOffsets,s.SubIFDs],o={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},a={};for(const e in o)o.hasOwnProperty(e)&&(a[o[e]]=parseInt(e,10));const l={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},h={Unspecified:0,Assocalpha:1,Unassalpha:2},c={Version:0,AddCompression:1},u={None:0,Deflate:1,Zstandard:2},f={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},g={};for(const e in f)f.hasOwnProperty(e)&&(g[f[e]]=parseInt(e,10))},6946:(e,t,i)=>{"use strict";i.d(t,{A:()=>Nt});var r=i(7607),s=i(6837),n=i(8596),o=i(61),a=i(8469),l=i(6017),h=i(1078),c=i(4863),u=i(3407),f=i(186),g=i(4087),d=i(4238),p=i(4401);class y extends l.A{constructor(e){const t=void 0===e.projection?"EPSG:3857":e.projection;let i=e.tileGrid;void 0===i&&t&&(i=(0,c.EN)({extent:(0,c.kZ)(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize})),super({cacheSize:.1,attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:t,tileGrid:i,opaque:e.opaque,state:e.state,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate}),this.gutter_=void 0!==e.gutter?e.gutter:0,this.tileSize_=e.tileSize?(0,p.xq)(e.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=e.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===e.bandCount?4:e.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={}}setTileSizes(e){this.tileSizes_=e}getTileSize(e){if(this.tileSizes_)return this.tileSizes_[e];if(this.tileSize_)return this.tileSize_;const t=this.getTileGrid();return t?(0,p.xq)(t.getTileSize(e)):[256,256]}getGutterForProjection(e){const t=this.getProjection();return!t||(0,u.tI)(t,e)?this.gutter_:0}setLoader(e){this.loader_=e}getReprojTile_(e,t,i,r,s){const o=this.getTileCacheForProjection(r),a=(0,f.dp)(e,t,i);if(o.containsKey(a)){const e=o.get(a);if(e&&e.key==this.getKey())return e}const l=this.getTileGrid(),h=Math.max.apply(null,l.getResolutions().map(((e,t)=>{const i=(0,p.xq)(l.getTileSize(t)),r=this.getTileSize(t);return Math.max(r[0]/i[0],r[1]/i[1])}))),c=this.getTileGridForProjection(s),u=this.getTileGridForProjection(r),g=[e,t,i],d=this.getTileCoordForTileUrlFunction(g,r),y=Object.assign({sourceProj:s,sourceTileGrid:c,targetProj:r,targetTileGrid:u,tileCoord:g,wrappedTileCoord:d,pixelRatio:h,gutter:this.getGutterForProjection(s),getTileFunction:(e,t,i,r)=>this.getTile(e,t,i,r,s)},this.tileOptions),w=new n.A(y);return w.key=this.getKey(),w}getTile(e,t,i,n,o){const a=this.getProjection();if(a&&o&&!(0,u.tI)(a,o))return this.getReprojTile_(e,t,i,o,a);const l=this.getTileSize(e),h=(0,f.dp)(e,t,i);if(this.tileCache.containsKey(h))return this.tileCache.get(h);const c=this.loader_,g=Object.assign({tileCoord:[e,t,i],loader:function(){return(0,d.hq)((function(){return c(e,t,i)}))},size:l},this.tileOptions),p=new r.Ay(g);return p.key=this.getKey(),p.addEventListener(s.A.CHANGE,this.handleTileChange_),this.tileCache.set(h,p),p}handleTileChange_(e){const t=e.target,i=(0,g.v6)(t),r=t.getState();let s;r==h.A.LOADING?(this.tileLoadingKeys_[i]=!0,s=a.A.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=r==h.A.ERROR?a.A.TILELOADERROR:r==h.A.LOADED?a.A.TILELOADEND:void 0),s&&this.dispatchEvent(new l.c(s,t))}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||(0,u.tI)(t,e)))return this.tileGrid;const i=(0,g.v6)(e);return i in this.tileGridForProjection_||(this.tileGridForProjection_[i]=(0,c.pr)(e)),this.tileGridForProjection_[i]}setTileGridForProjection(e,t){const i=(0,u.Jt)(e);if(i){const e=(0,g.v6)(i);e in this.tileGridForProjection_||(this.tileGridForProjection_[e]=t)}}getTileCacheForProjection(e){const t=this.getProjection();if(!t||(0,u.tI)(t,e))return this.tileCache;const i=(0,g.v6)(e);return i in this.tileCacheForProjection_||(this.tileCacheForProjection_[i]=new o.A(.1)),this.tileCacheForProjection_[i]}expireCache(e,t){const i=this.getTileCacheForProjection(e);this.tileCache.expireCache(this.tileCache==i?t:{});for(const e in this.tileCacheForProjection_){const r=this.tileCacheForProjection_[e];r.expireCache(r==i?t:{})}}clear(){super.clear();for(const e in this.tileCacheForProjection_)this.tileCacheForProjection_[e].clear()}}const w=y;var m=i(6758),b=i(8622);const S=new Map;function A(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>S.set(e,t)))}async function _(e){const t=S.get(e.Compression);if(!t)throw new Error(`Unknown compression method identifier: ${e.Compression}`);return new(await t())(e)}A([void 0,1],(()=>i.e(5121).then(i.bind(i,5121)).then((e=>e.default)))),A(5,(()=>i.e(2764).then(i.bind(i,2764)).then((e=>e.default)))),A(6,(()=>{throw new Error("old style JPEG compression is not supported.")})),A(7,(()=>i.e(6457).then(i.bind(i,6457)).then((e=>e.default)))),A([8,32946],(()=>Promise.all([i.e(3075),i.e(424)]).then(i.bind(i,424)).then((e=>e.default)))),A(32773,(()=>i.e(1030).then(i.bind(i,1030)).then((e=>e.default)))),A(34887,(()=>Promise.all([i.e(3075),i.e(1414)]).then(i.bind(i,1414)).then((async e=>(await e.zstd.init(),e))).then((e=>e.default)))),A(50001,(()=>i.e(6568).then(i.bind(i,6568)).then((e=>e.default))));const I="undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,T=class{constructor(e=I,t){this.workers=null,this._awaitingDecoder=null,this.size=e,this.messageId=0,e&&(this._awaitingDecoder=t?Promise.resolve(t):new Promise((e=>{i.e(2098).then(i.bind(i,2098)).then((t=>{e(t.create)}))})),this._awaitingDecoder.then((t=>{this._awaitingDecoder=null,this.workers=[];for(let i=0;ii.decode(e,t))):new Promise((i=>{const r=this.workers.find((e=>e.idle))||this.workers[Math.floor(Math.random()*this.size)];r.idle=!1;const s=this.messageId++,n=e=>{e.data.id===s&&(r.idle=!0,i(e.data.decoded),r.worker.removeEventListener("message",n))};r.worker.addEventListener("message",n),r.worker.postMessage({fileDirectory:e,buffer:t,id:s},[t])}))}destroy(){this.workers&&(this.workers.forEach((e=>{e.worker.terminate()})),this.workers=null)}};function P(e){return(t,...i)=>E(e,t,i)}function x(e,t){return P(M(e,t).get)}const{apply:E,construct:C,defineProperty:D,get:F,getOwnPropertyDescriptor:M,getPrototypeOf:G,has:k,ownKeys:R,set:O,setPrototypeOf:v}=Reflect,{EPSILON:U,MAX_SAFE_INTEGER:L,isFinite:z,isNaN:j}=Number,{iterator:B,species:N,toStringTag:K,for:$}=Symbol,V=Object,{create:q,defineProperty:H,freeze:W,is:Y}=V,X=V.prototype,Z=(X.__lookupGetter__&&P(X.__lookupGetter__),V.hasOwn||P(X.hasOwnProperty),Array),J=(Z.isArray,Z.prototype),Q=(P(J.join),P(J.push),P(J.toLocaleString),J[B]),ee=P(Q),{abs:te,trunc:ie}=Math,re=ArrayBuffer,se=(re.isView,re.prototype),ne=(P(se.slice),x(se,"byteLength"),"undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:null),oe=(ne&&x(ne.prototype,"byteLength"),G(Uint8Array)),ae=(oe.from,oe.prototype),le=(ae[B],P(ae.keys),P(ae.values),P(ae.entries),P(ae.set),P(ae.reverse),P(ae.fill),P(ae.copyWithin),P(ae.sort),P(ae.slice),P(ae.subarray),x(ae,"buffer"),x(ae,"byteOffset"),x(ae,"length"),x(ae,K),Uint8Array),he=Uint16Array,ce=Uint32Array,ue=Float32Array,fe=G([][B]()),ge=P(fe.next),de=P(function*(){}().next),pe=G(fe),ye=DataView.prototype,we=P(ye.getUint16),me=(P(ye.setUint16),TypeError,WeakSet.prototype),be=(P(me.add),P(me.has),WeakMap),Se=be.prototype,Ae=P(Se.get),_e=(P(Se.has),P(Se.set)),Ie=new be,Te=q(null,{next:{value:function(){const e=Ae(Ie,this);return ge(e)}},[B]:{value:function(){return this}}}),Pe=new be,xe=q(pe,{next:{value:function(){const e=Ae(Pe,this);return de(e)},writable:!0,configurable:!0}});for(const e of R(fe))"next"!==e&&H(xe,e,M(fe,e));const Ee=new re(4),Ce=new ue(Ee),De=new ce(Ee),Fe=new he(512),Me=new le(512);for(let e=0;e<256;++e){const t=e-127;t<-24?(Fe[e]=0,Fe[256|e]=32768,Me[e]=24,Me[256|e]=24):t<-14?(Fe[e]=1024>>-t-14,Fe[256|e]=1024>>-t-14|32768,Me[e]=-t-1,Me[256|e]=-t-1):t<=15?(Fe[e]=t+15<<10,Fe[256|e]=t+15<<10|32768,Me[e]=13,Me[256|e]=13):t<128?(Fe[e]=31744,Fe[256|e]=64512,Me[e]=24,Me[256|e]=24):(Fe[e]=31744,Fe[256|e]=64512,Me[e]=13,Me[256|e]=13)}const Ge=new ce(2048);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;!(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,Ge[e]=t|i}for(let e=1024;e<2048;++e)Ge[e]=939524096+(e-1024<<13);const ke=new ce(64);for(let e=1;e<31;++e)ke[e]=e<<23;ke[31]=1199570944,ke[32]=2147483648;for(let e=33;e<63;++e)ke[e]=2147483648+(e-32<<23);ke[63]=3347054592;const Re=new he(64);for(let e=1;e<64;++e)32!==e&&(Re[e]=1024);function Oe(e,t,...i){return function(e){const t=e>>10;return De[0]=Ge[Re[t]+(1023&e)]+ke[t],Ce[0]}(we(e,t,...function(e){if(e[B]===Q&&fe.next===ge)return e;const t=q(Te);return _e(Ie,t,ee(e)),t}(i)))}var ve=i(7379),Ue=i(563);function Le(e,t,i,r=1){return new(Object.getPrototypeOf(e).constructor)(t*i*r)}function ze(e,t,i){return(1-i)*e+i*t}function je(e,t,i){let r=0;for(let s=t;s=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${e} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}getReaderForSample(e){const t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,i=this.fileDirectory.BitsPerSample[e];switch(t){case 1:if(i<=8)return DataView.prototype.getUint8;if(i<=16)return DataView.prototype.getUint16;if(i<=32)return DataView.prototype.getUint32;break;case 2:if(i<=8)return DataView.prototype.getInt8;if(i<=16)return DataView.prototype.getInt16;if(i<=32)return DataView.prototype.getInt32;break;case 3:switch(i){case 16:return function(e,t){return Oe(this,e,t)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(e=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}getBitsPerSample(e=0){return this.fileDirectory.BitsPerSample[e]}getArrayForSample(e,t){return Be(this.getSampleFormat(e),this.getBitsPerSample(e),t)}async getTileOrStrip(e,t,i,r,s){const n=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let a;const{tiles:l}=this;let h,c;1===this.planarConfiguration?a=t*n+e:2===this.planarConfiguration&&(a=i*n*o+t*n+e),this.isTiled?(h=this.fileDirectory.TileOffsets[a],c=this.fileDirectory.TileByteCounts[a]):(h=this.fileDirectory.StripOffsets[a],c=this.fileDirectory.StripByteCounts[a]);const u=(await this.source.fetch([{offset:h,length:c}],s))[0];let f;return null!==l&&l[a]?f=l[a]:(f=(async()=>{let e=await r.decode(this.fileDirectory,u);const i=this.getSampleFormat(),s=this.getBitsPerSample();return function(e,t){return(1!==e&&2!==e||!(t<=32)||t%8!=0)&&(3!==e||16!==t&&32!==t&&64!==t)}(i,s)&&(e=function(e,t,i,r,s,n,o){const a=new DataView(e),l=2===i?1:r,h=Be(t,s,2===i?o*n:o*n*r),c=parseInt("1".repeat(s),2);if(1===t){let e;e=1===i?r*s:s;let t=n*e;7&t&&(t=t+7&-8);for(let e=0;e>8-s-g&c;else if(g+s<=16)h[u]=a.getUint16(f)>>16-s-g&c;else if(g+s<=24){const e=a.getUint16(f)<<8|a.getUint8(f+2);h[u]=e>>24-s-g&c}else h[u]=a.getUint32(f)>>32-s-g&c}}}}return h.buffer}(e,i,this.planarConfiguration,this.getSamplesPerPixel(),s,this.getTileWidth(),this.getBlockHeight(t))),e})(),null!==l&&(l[a]=f)),{x:e,y:t,sample:i,data:await f}}async _readRaster(e,t,i,r,s,n,o,a,l){const h=this.getTileWidth(),c=this.getTileHeight(),u=this.getWidth(),f=this.getHeight(),g=Math.max(Math.floor(e[0]/h),0),d=Math.min(Math.ceil(e[2]/h),Math.ceil(u/h)),p=Math.max(Math.floor(e[1]/c),0),y=Math.min(Math.ceil(e[3]/c),Math.ceil(f/c)),w=e[2]-e[0];let m=this.getBytesPerPixel();const b=[],S=[];for(let e=0;e{const n=s.data,o=new DataView(n),a=this.getBlockHeight(s.y),l=s.y*c,g=s.x*h,p=l+a,y=(s.x+1)*h,A=S[d],I=Math.min(a,a-(p-e[3]),f-l),T=Math.min(h,h-(y-e[2]),u-g);for(let s=Math.max(0,e[1]-l);s{const a=Le(e,r,s);for(let l=0;l{const a=Le(e,r,s);for(let l=0;lh[2]||h[1]>h[3])throw new Error("Invalid subsets");const c=(h[2]-h[0])*(h[3]-h[1]),u=this.getSamplesPerPixel();if(t&&t.length){for(let e=0;e=u)return Promise.reject(new RangeError(`Invalid sample index '${t[e]}'.`))}else for(let e=0;el[2]||l[1]>l[3])throw new Error("Invalid subsets");const h=this.fileDirectory.PhotometricInterpretation;if(h===b.ub.RGB){let l=[0,1,2];if(this.fileDirectory.ExtraSamples!==b.AC.Unspecified&&o){l=[];for(let e=0;e>24)/500+a,h=a-(e[t+2]<<24>>24)/200;l=.95047*(l*l*l>.008856?l*l*l:(l-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),h=1.08883*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),s=3.2406*l+-1.5372*a+-.4986*h,n=-.9689*l+1.8758*a+.0415*h,o=.0557*l+-.204*a+1.057*h,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r[i]=255*Math.max(0,Math.min(1,s)),r[i+1]=255*Math.max(0,Math.min(1,n)),r[i+2]=255*Math.max(0,Math.min(1,o))}return r}(g);break;default:throw new Error("Unsupported photometric interpretation.")}if(!t){const e=new Uint8Array(p.length/3),t=new Uint8Array(p.length/3),i=new Uint8Array(p.length/3);for(let r=0,s=0;rvoid 0===ve(e,"sample"))):r.filter((t=>Number(ve(t,"sample"))===e));for(let e=0;e[n+e*t+r*i,h+o*t+a*i])),u=c.map((e=>e[0])),f=c.map((e=>e[1]));return[Math.min(...u),Math.min(...f),Math.max(...u),Math.max(...f)]}{const e=this.getOrigin(),r=this.getResolution(),s=e[0],n=e[1],o=s+r[0]*i,a=n+r[1]*t;return[Math.min(s,o),Math.min(n,a),Math.max(s,o),Math.max(n,a)]}}};class Ke{constructor(e){this._dataView=new DataView(e)}get buffer(){return this._dataView.buffer}getUint64(e,t){const i=this.getUint32(e,t),r=this.getUint32(e+4,t);let s;if(t){if(s=i+2**32*r,!Number.isSafeInteger(s))throw new Error(`${s} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return s}if(s=2**32*i+r,!Number.isSafeInteger(s))throw new Error(`${s} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return s}getInt64(e,t){let i=0;const r=(128&this._dataView.getUint8(e+(t?7:0)))>0;let s=!0;for(let n=0;n<8;n++){let o=this._dataView.getUint8(e+(t?n:7-n));r&&(s?0!==o&&(o=255&~(o-1),s=!1):o=255&~o),i+=o*256**n}return r&&(i=-i),i}getUint8(e,t){return this._dataView.getUint8(e,t)}getInt8(e,t){return this._dataView.getInt8(e,t)}getUint16(e,t){return this._dataView.getUint16(e,t)}getInt16(e,t){return this._dataView.getInt16(e,t)}getUint32(e,t){return this._dataView.getUint32(e,t)}getInt32(e,t){return this._dataView.getInt32(e,t)}getFloat16(e,t){return Oe(this._dataView,e,t)}getFloat32(e,t){return this._dataView.getFloat32(e,t)}getFloat64(e,t){return this._dataView.getFloat64(e,t)}}class $e{constructor(e,t,i,r){this._dataView=new DataView(e),this._sliceOffset=t,this._littleEndian=i,this._bigTiff=r}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}readUint8(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}readInt8(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}readUint16(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}readInt16(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}readUint32(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}readInt32(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}readFloat32(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}readFloat64(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}readUint64(e){const t=this.readUint32(e),i=this.readUint32(e+4);let r;if(this._littleEndian){if(r=t+2**32*i,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}if(r=2**32*t+i,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}readInt64(e){let t=0;const i=(128&this._dataView.getUint8(e+(this._littleEndian?7:0)))>0;let r=!0;for(let s=0;s<8;s++){let n=this._dataView.getUint8(e+(this._littleEndian?s:7-s));i&&(r?0!==n&&(n=255&~(n-1),r=!1):n=255&~n),t+=n*256**s}return i&&(t=-t),t}readOffset(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}}function Ve(e){if(void 0!==Object.fromEntries)return Object.fromEntries(e);const t={};for(const[i,r]of e)t[i.toLowerCase()]=r;return t}function qe(e){return Ve(e.split("\r\n").map((e=>{const t=e.split(":").map((e=>e.trim()));return t[0]=t[0].toLowerCase(),t})))}function He(e){let t,i,r;return e&&([,t,i,r]=e.match(/bytes (\d+)-(\d+)\/(\d+)/),t=parseInt(t,10),i=parseInt(i,10),r=parseInt(r,10)),{start:t,end:i,total:r}}class We{async fetch(e,t=void 0){return Promise.all(e.map((e=>this.fetchSlice(e,t))))}async fetchSlice(e){throw new Error(`fetching of slice ${e} not possible, not implemented`)}get fileSize(){return null}async close(){}}class Ye extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof e.maxAge&&0===e.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if("function"==typeof this.onEviction)for(const[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return"number"==typeof t.expiry&&t.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(e,t.value),this.delete(e))}_getOrDeleteIfExpired(e,t){if(!1===this._deleteIfExpired(e,t))return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){const i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(const e of this.oldCache){const[t,i]=e;this.cache.has(t)||!1===this._deleteIfExpired(t,i)&&(yield e)}for(const e of this.cache){const[t,i]=e;!1===this._deleteIfExpired(t,i)&&(yield e)}}get(e){if(this.cache.has(e)){const t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);if(!1===this._deleteIfExpired(e,t))return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge}={}){const r="number"==typeof i&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;return this.cache.has(e)?this.cache.set(e,{value:t,expiry:r}):this._set(e,{value:t,expiry:r}),this}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):!!this.oldCache.has(e)&&!this._deleteIfExpired(e,this.oldCache.get(e))}peek(e){return this.cache.has(e)?this._peek(e,this.cache):this.oldCache.has(e)?this._peek(e,this.oldCache):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache){const[t,i]=e;!1===this._deleteIfExpired(t,i)&&(yield[t,i.value])}for(const e of this.oldCache){const[t,i]=e;this.cache.has(t)||!1===this._deleteIfExpired(t,i)&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){const i=e[t],[r,s]=i;!1===this._deleteIfExpired(r,s)&&(yield[r,s.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){const i=e[t],[r,s]=i;this.cache.has(r)||!1===this._deleteIfExpired(r,s)&&(yield[r,s.value])}}*entriesAscending(){for(const[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(const[i,r]of this.entriesAscending())e.call(t,r,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}class Xe extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,Xe),this.name="AbortError"}}class Ze extends Error{constructor(e,t){super(t),this.errors=e,this.message=t,this.name="AggregateError"}}const Je=Ze;class Qe{constructor(e,t,i=null){this.offset=e,this.length=t,this.data=i}get top(){return this.offset+this.length}}class et{constructor(e,t,i){this.offset=e,this.length=t,this.blockIds=i}}class tt extends We{constructor(e,{blockSize:t=65536,cacheSize:i=100}={}){super(),this.source=e,this.blockSize=t,this.blockCache=new Ye({maxSize:i,onEviction:(e,t)=>{this.evictedBlocks.set(e,t)}}),this.evictedBlocks=new Map,this.blockRequests=new Map,this.blockIdsToFetch=new Set,this.abortedBlockIds=new Set}get fileSize(){return this.source.fileSize}async fetch(e,t){const i=[],r=[],s=[];this.evictedBlocks.clear();for(const{offset:t,length:n}of e){let e=t+n;const{fileSize:o}=this;null!==o&&(e=Math.min(e,o));for(let n=Math.floor(t/this.blockSize)*this.blockSize;nsetTimeout(e,undefined)))}(),this.fetchBlocks(t);const n=[];for(const e of r)this.blockRequests.has(e)&&n.push(this.blockRequests.get(e));await Promise.allSettled(i),await Promise.allSettled(n);const o=[],a=s.filter((e=>this.abortedBlockIds.has(e)||!this.blockCache.has(e)));if(a.forEach((e=>this.blockIdsToFetch.add(e))),a.length>0&&t&&!t.aborted){this.fetchBlocks(null);for(const e of a){const t=this.blockRequests.get(e);if(!t)throw new Error(`Block ${e} is not in the block requests`);o.push(t)}await Promise.allSettled(o)}if(t&&t.aborted)throw new Xe("Request was aborted");const l=s.map((e=>this.blockCache.get(e)||this.evictedBlocks.get(e))),h=l.filter((e=>!e));if(h.length)throw new Je(h,"Request failed");const c=new Map(function(e,t){const i=Array.isArray(e)?e:Array.from(e),r=Array.isArray(t)?t:Array.from(t);return i.map(((e,t)=>[e,r[t]]))}(s,l));return this.readSliceData(e,c)}fetchBlocks(e){if(this.blockIdsToFetch.size>0){const t=this.groupBlocks(this.blockIdsToFetch),i=this.source.fetch(t,e);for(let r=0;r{try{const e=(await i)[r],s=t*this.blockSize,n=s-e.offset,o=Math.min(n+this.blockSize,e.data.byteLength),a=e.data.slice(n,o),l=new Qe(s,a.byteLength,a,t);this.blockCache.set(t,l),this.abortedBlockIds.delete(t)}catch(i){if("AbortError"!==i.name)throw i;i.signal=e,this.blockCache.delete(t),this.abortedBlockIds.add(t)}finally{this.blockRequests.delete(t)}})())}this.blockIdsToFetch.clear()}}groupBlocks(e){const t=Array.from(e).sort(((e,t)=>e-t));if(0===t.length)return[];let i=[],r=null;const s=[];for(const e of t)null===r||r+1===e?(i.push(e),r=e):(s.push(new et(i[0]*this.blockSize,i.length*this.blockSize,i)),i=[e],r=e);return s.push(new et(i[0]*this.blockSize,i.length*this.blockSize,i)),s}readSliceData(e,t){return e.map((e=>{let i=e.offset+e.length;null!==this.fileSize&&(i=Math.min(this.fileSize,i));const r=Math.floor(e.offset/this.blockSize),s=Math.floor(i/this.blockSize),n=new ArrayBuffer(e.length),o=new Uint8Array(n);for(let n=r;n<=s;++n){const r=t.get(n),s=r.offset-e.offset;let a,l=0,h=0;s<0?l=-s:s>0&&(h=s),a=r.top-i<0?r.length-l:i-r.offset-l;const c=new Uint8Array(r.data,l,a);o.set(c,h)}return n}))}}class it{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(e){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class rt{constructor(e){this.url=e}async request({headers:e,signal:t}={}){throw new Error("request is not implemented")}}class st extends it{constructor(e){super(),this.response=e}get status(){return this.response.status}getHeader(e){return this.response.headers.get(e)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class nt extends rt{constructor(e,t){super(e),this.credentials=t}async request({headers:e,signal:t}={}){const i=await fetch(this.url,{headers:e,credentials:this.credentials,signal:t});return new st(i)}}class ot extends it{constructor(e,t){super(),this.xhr=e,this.data=t}get status(){return this.xhr.status}getHeader(e){return this.xhr.getResponseHeader(e)}async getData(){return this.data}}class at extends rt{constructRequest(e,t){return new Promise(((i,r)=>{const s=new XMLHttpRequest;s.open("GET",this.url),s.responseType="arraybuffer";for(const[t,i]of Object.entries(e))s.setRequestHeader(t,i);s.onload=()=>{const e=s.response;i(new ot(s,e))},s.onerror=r,s.onabort=()=>r(new Xe("Request aborted")),s.send(),t&&(t.aborted&&s.abort(),t.addEventListener("abort",(()=>s.abort())))}))}async request({headers:e,signal:t}={}){return await this.constructRequest(e,t)}}var lt=i(8625),ht=i(6504),ct=i(6580);class ut extends it{constructor(e,t){super(),this.response=e,this.dataPromise=t}get status(){return this.response.statusCode}getHeader(e){return this.response.headers[e]}async getData(){return await this.dataPromise}}class ft extends rt{constructor(e){super(e),this.parsedUrl=ct.parse(this.url),this.httpApi="http:"===this.parsedUrl.protocol?lt:ht}constructRequest(e,t){return new Promise(((i,r)=>{const s=this.httpApi.get({...this.parsedUrl,headers:e},(e=>{const t=new Promise((t=>{const i=[];e.on("data",(e=>{i.push(e)})),e.on("end",(()=>{const e=Buffer.concat(i).buffer;t(e)})),e.on("error",r)}));i(new ut(e,t))}));s.on("error",r),t&&(t.aborted&&s.destroy(new Xe("Request aborted")),t.addEventListener("abort",(()=>s.destroy(new Xe("Request aborted")))))}))}async request({headers:e,signal:t}={}){return await this.constructRequest(e,t)}}class gt extends We{constructor(e,t,i,r){super(),this.client=e,this.headers=t,this.maxRanges=i,this.allowFullFile=r,this._fileSize=null}async fetch(e,t){return this.maxRanges>=e.length?this.fetchSlices(e,t):(this.maxRanges>0&&e.length,Promise.all(e.map((e=>this.fetchSlice(e,t)))))}async fetchSlices(e,t){const i=await this.client.request({headers:{...this.headers,Range:`bytes=${e.map((({offset:e,length:t})=>`${e}-${e+t}`)).join(",")}`},signal:t});if(i.ok){if(206===i.status){const{type:r,params:s}=function(e){const[t,...i]=e.split(";").map((e=>e.trim()));return{type:t,params:Ve(i.map((e=>e.split("="))))}}(i.getHeader("content-type"));if("multipart/byteranges"===r){const e=function(e,t){let i=null;const r=new TextDecoder("ascii"),s=[],n=`--${t}`,o=`${n}--`;for(let t=0;t<10;++t)r.decode(new Uint8Array(e,t,n.length))===n&&(i=t);if(null===i)throw new Error("Could not find initial boundary");for(;i1){const i=await Promise.all(e.slice(1).map((e=>this.fetchSlice(e,t))));return h.concat(i)}return h}{if(!this.allowFullFile)throw new Error("Server responded with full file");const e=await i.getData();return this._fileSize=e.byteLength,[{data:e,offset:0,length:e.byteLength}]}}throw new Error("Error fetching data.")}async fetchSlice(e,t){const{offset:i,length:r}=e,s=await this.client.request({headers:{...this.headers,Range:`bytes=${i}-${i+r}`},signal:t});if(s.ok){if(206===s.status){const e=await s.getData(),{total:t}=He(s.getHeader("content-range"));return this._fileSize=t||null,{data:e,offset:i,length:r}}{if(!this.allowFullFile)throw new Error("Server responded with full file");const e=await s.getData();return this._fileSize=e.byteLength,{data:e,offset:0,length:e.byteLength}}}throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function dt(e,{blockSize:t,cacheSize:i}){return null===t?e:new tt(e,{blockSize:t,cacheSize:i})}function pt(e,{forceXHR:t=!1,...i}={}){return"function"!=typeof fetch||t?"undefined"!=typeof XMLHttpRequest?function(e,{headers:t={},maxRanges:i=0,allowFullFile:r=!1,...s}={}){const n=new at(e);return dt(new gt(n,t,i,r),s)}(e,i):function(e,{headers:t={},maxRanges:i=0,allowFullFile:r=!1,...s}={}){const n=new ft(e);return dt(new gt(n,t,i,r),s)}(e,i):function(e,{headers:t={},credentials:i,maxRanges:r=0,allowFullFile:s=!1,...n}={}){const o=new nt(e,i);return dt(new gt(o,t,r,s),n)}(e,i)}class yt extends We{constructor(e){super(),this.file=e}async fetchSlice(e,t){return new Promise(((i,r)=>{const s=this.file.slice(e.offset,e.offset+e.length),n=new FileReader;n.onload=e=>i(e.target.result),n.onerror=r,n.onabort=r,n.readAsArrayBuffer(s),t&&t.addEventListener("abort",(()=>n.abort()))}))}}function wt(e){switch(e){case b.s$.BYTE:case b.s$.ASCII:case b.s$.SBYTE:case b.s$.UNDEFINED:return 1;case b.s$.SHORT:case b.s$.SSHORT:return 2;case b.s$.LONG:case b.s$.SLONG:case b.s$.FLOAT:case b.s$.IFD:return 4;case b.s$.RATIONAL:case b.s$.SRATIONAL:case b.s$.DOUBLE:case b.s$.LONG8:case b.s$.SLONG8:case b.s$.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${e}`)}}function mt(e,t,i,r){let s=null,n=null;const o=wt(t);switch(t){case b.s$.BYTE:case b.s$.ASCII:case b.s$.UNDEFINED:s=new Uint8Array(i),n=e.readUint8;break;case b.s$.SBYTE:s=new Int8Array(i),n=e.readInt8;break;case b.s$.SHORT:s=new Uint16Array(i),n=e.readUint16;break;case b.s$.SSHORT:s=new Int16Array(i),n=e.readInt16;break;case b.s$.LONG:case b.s$.IFD:s=new Uint32Array(i),n=e.readUint32;break;case b.s$.SLONG:s=new Int32Array(i),n=e.readInt32;break;case b.s$.LONG8:case b.s$.IFD8:s=new Array(i),n=e.readUint64;break;case b.s$.SLONG8:s=new Array(i),n=e.readInt64;break;case b.s$.RATIONAL:s=new Uint32Array(2*i),n=e.readUint32;break;case b.s$.SRATIONAL:s=new Int32Array(2*i),n=e.readInt32;break;case b.s$.FLOAT:s=new Float32Array(i),n=e.readFloat32;break;case b.s$.DOUBLE:s=new Float64Array(i),n=e.readFloat64;break;default:throw new RangeError(`Invalid field type: ${t}`)}if(t!==b.s$.RATIONAL&&t!==b.s$.SRATIONAL)for(let t=0;te.getWidth()-t.getWidth()));for(let t=0;tr||n&&n>o)break}}let u=t;if(o){const[e,t]=a.getOrigin(),[i,r]=l.getResolution(a);u=[Math.round((o[0]-e)/i),Math.round((o[1]-t)/r),Math.round((o[2]-e)/i),Math.round((o[3]-t)/r)],u=[Math.min(u[0],u[2]),Math.min(u[1],u[3]),Math.max(u[0],u[2]),Math.max(u[1],u[3])]}return l.readRasters({...e,window:u})}}class _t extends At{constructor(e,t,i,r,s={}){super(),this.source=e,this.littleEndian=t,this.bigTiff=i,this.firstIFDOffset=r,this.cache=s.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(e,t){const i=this.bigTiff?4048:1024;return new $e((await this.source.fetch([{offset:e,length:void 0!==t?t:i}]))[0],e,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(e){const t=this.bigTiff?20:12,i=this.bigTiff?8:2;let r=await this.getSlice(e);const s=this.bigTiff?r.readUint64(e):r.readUint16(e),n=s*t+(this.bigTiff?16:6);r.covers(e,n)||(r=await this.getSlice(e,n));const o={};let a=e+(this.bigTiff?8:2);for(let e=0;e{const t=await this.ifdRequests[e-1];if(0===t.nextIFDByteOffset)throw new St(e);return this.parseFileDirectoryAt(t.nextIFDByteOffset)})(),this.ifdRequests[e]}async getImage(e=0){const t=await this.requestIFD(e);return new Ne(t.fileDirectory,t.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let e=0,t=!0;for(;t;)try{await this.requestIFD(e),++e}catch(e){if(!(e instanceof St))throw e;t=!1}return e}async getGhostValues(){const e=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;let t=await this.getSlice(e,130);if("GDAL_STRUCTURAL_METADATA_SIZE="===mt(t,b.s$.ASCII,30,e)){const i=mt(t,b.s$.ASCII,130,e).split("\n")[0],r=Number(i.split("=")[1].split(" ")[0])+i.length;r>130&&(t=await this.getSlice(e,r));const s=mt(t,b.s$.ASCII,r,e);this.ghostValues={},s.split("\n").filter((e=>e.length>0)).map((e=>e.split("="))).forEach((([e,t])=>{this.ghostValues[e]=t}))}return this.ghostValues}static async fromSource(e,t,i){const r=(await e.fetch([{offset:0,length:1024}],i))[0],s=new Ke(r),n=s.getUint16(0,0);let o;if(18761===n)o=!0;else{if(19789!==n)throw new TypeError("Invalid byte order value.");o=!1}const a=s.getUint16(2,o);let l;if(42===a)l=!1;else{if(43!==a)throw new TypeError("Invalid magic number.");if(l=!0,8!==s.getUint16(4,o))throw new Error("Unsupported offset byte-size.")}const h=l?s.getUint64(8,o):s.getUint32(4,o);return new _t(e,o,l,h,t)}close(){return"function"==typeof this.source.close&&this.source.close()}}class It extends At{constructor(e,t){super(),this.mainFile=e,this.overviewFiles=t,this.imageFiles=[e].concat(t),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const e=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((e=>e.parseFileDirectoryAt(e.firstIFDOffset))));return this.fileDirectoriesPerFile=await Promise.all(e),this.fileDirectoriesPerFile}async getImage(e=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let t=0,i=0;for(let r=0;re.getImageCount())));return this.imageCounts=await Promise.all(e),this.imageCount=this.imageCounts.reduce(((e,t)=>e+t),0),this.imageCount}}var Tt=i(1597),Pt=i(915),xt=i(4422),Et=i(8100);function Ct(e,t){if(!e)return!1;if(!0===e)return!0;if(3!==t.getSamplesPerPixel())return!1;const i=t.fileDirectory.PhotometricInterpretation,r=b.ub;return i===r.CMYK||i===r.YCbCr||i===r.CIELab||i===r.ICCLab}const Dt="STATISTICS_MAXIMUM",Ft="STATISTICS_MINIMUM";let Mt;function Gt(){return Mt||(Mt=new T),Mt}function kt(e){try{return e.getBoundingBox()}catch(t){return[0,0,e.getWidth(),e.getHeight()]}}function Rt(e){try{return e.getOrigin().slice(0,2)}catch(t){return[0,e.getHeight()]}}function Ot(e,t){try{return e.getResolution(t)}catch(i){return[t.getWidth()/e.getWidth(),t.getHeight()/e.getHeight()]}}function vt(e){const t=e.geoKeys;if(!t)return null;if(t.ProjectedCSTypeGeoKey&&32767!==t.ProjectedCSTypeGeoKey){const e="EPSG:"+t.ProjectedCSTypeGeoKey;let i=(0,u.Jt)(e);if(!i){const r=(0,Et.q)(t.ProjLinearUnitsGeoKey);r&&(i=new u.MF({code:e,units:r}))}return i}if(t.GeographicTypeGeoKey&&32767!==t.GeographicTypeGeoKey){const e="EPSG:"+t.GeographicTypeGeoKey;let i=(0,u.Jt)(e);if(!i){const r=(0,Et.q)(t.GeogAngularUnitsGeoKey);r&&(i=new u.MF({code:e,units:r}))}return i}return null}function Ut(e){return e.getImageCount().then((function(t){const i=new Array(t);for(let r=0;r_t.fromSource(pt(e,i)))));return new It(s,n)}(e.url,e.overviews,t):async function(e,t={},i){return _t.fromSource(pt(e,t),i)}(e.url,t),i.then(Ut)}function zt(e,t,i,r,s){if(Array.isArray(e)){const n=e.length;if(!Array.isArray(t)||n!=t.length){const e=new Error(r);throw s(e),e}for(let o=0;oi*e)throw new Error(r)}function jt(e){return e instanceof Int8Array?127:e instanceof Uint8Array||e instanceof Uint8ClampedArray?255:e instanceof Int16Array?32767:e instanceof Uint16Array?65535:e instanceof Int32Array?2147483647:e instanceof Uint32Array?4294967295:e instanceof Float32Array?34e37:255}class Bt extends w{constructor(e){super({state:"loading",tileGrid:null,projection:e.projection||null,opaque:e.opaque,transition:e.transition,interpolate:!1!==e.interpolate,wrapX:e.wrapX}),this.sourceInfo_=e.sources;const t=this.sourceInfo_.length;this.sourceOptions_=e.sourceOptions,this.sourceImagery_=new Array(t),this.sourceMasks_=new Array(t),this.resolutionFactors_=new Array(t),this.samplesPerPixel_,this.nodataValues_,this.metadata_,this.normalize_=!1!==e.normalize,this.addAlpha_=!1,this.error_=null,this.convertToRGB_=e.convertToRGB||!1,this.setKey(this.sourceInfo_.map((e=>e.url)).join(","));const i=this,r=new Array(t);for(let e=0;e=0;--e){const i=vt(t[e]);if(i){this.projection=i;break}}}configure_(e){let t,i,r,s,n;const o=new Array(e.length),a=new Array(e.length),l=new Array(e.length);let h=0;const c=e.length;for(let u=0;u{4&~(e.fileDirectory.NewSubfileType||0)?c.push(e):f.push(e)}));const g=c.length;if(f.length>0&&f.length!==g)throw new Error(`Expected one mask per image found ${f.length} masks and ${g} images`);let d,p;const y=new Array(g),w=new Array(g),m=new Array(g);a[u]=new Array(g),l[u]=new Array(g);for(let e=0;em.length&&(h=n.length-m.length);const e=n[n.length-1]/m[m.length-1];this.resolutionFactors_[u]=e;const t=m.map((t=>t*e)),i=`Resolution mismatch for source ${u}, got [${t}] but expected [${n}]`;zt(n.slice(h,n.length),t,.02,i,this.viewRejector)}else n=m,this.resolutionFactors_[u]=1;r?zt(r.slice(h,r.length),w,.01,`Tile size mismatch for source ${u}`,this.viewRejector):r=w,s?zt(s.slice(h,s.length),y,0,`Tile size mismatch for source ${u}`,this.viewRejector):s=y,this.sourceImagery_[u]=c.reverse(),this.sourceMasks_[u]=f.reverse()}for(let e=0,t=this.sourceImagery_.length;e{s.d(t,{E:()=>n,o:()=>l});var r=s(6540),o=s(2627),i=s(1443);const n="_rlayers_handlers";class l extends r.PureComponent{static getOLObject(e,t){let s=t.get(e);return void 0===s&&(s={},t.set(e,s)),s}get handlers(){return l.getOLObject(n,this.ol)}getCurrentEvents(){return Object.keys(this.props).filter((e=>e.startsWith("on"))).map((e=>({event:e.toLowerCase().slice(2),prop:e}))).reduce(((e,t)=>({...e,[t.event]:this.props[t.prop]})),{})}getHandlerProp(e){for(const t of Object.keys(this.props))if(t.toLowerCase()==="on"+e)return t}incrementHandlers(e){}decrementHandlers(e){}attachEventHandlers(){var e;const t=this.handlers,s=Object.keys(null!=t?t:{}),r=null!==(e=this.eventSources)&&void 0!==e?e:[this.ol],o=this.getCurrentEvents(),n=Object.keys(o),l=n.concat(s.filter((e=>!n.includes(e))));for(const e of l){if(void 0!==t[e]&&void 0===o[e]){(0,i.A)("removing previously installed handler",this,e,t[e]);for(const s of r)s.un(e,t[e]);t[e]=void 0,this.decrementHandlers(e)}if(void 0===t[e]&&void 0!==o[e]){(0,i.A)("installing handler",this,e,o[e]);const s=this.getHandlerProp(e);if(!s)throw new Error("Internal error");t[e]=e=>this.props[s].call(this,e);for(const s of r)s.on(e,t[e]);this.incrementHandlers(e)}}}attachOldEventHandlers(e){const t=this.handlers,s=this.getCurrentEvents();for(const r of Object.keys(s))s[r]&&((0,i.A)("reinstalling existing handler",this,r,s[r]),e.on(r,t[r]))}refresh(e){this.attachEventHandlers()}on(e,t){this.ol.on(e,t),this.incrementHandlers(e)}un(e,t){this.decrementHandlers(e),this.ol.un(e,t)}componentDidMount(){(0,i.A)("didMount",this),this.refresh()}propsDiff(e){if(null===this.props||null===e)return this.props!==e&&((0,i.A)("null props differ",this.props,e),!0);for(const t of Object.keys(this.props))if(this.props[t]!==e[t])return(0,i.A)("because of",t,this.props[t],e[t]),!0;return!1}componentDidUpdate(e,t,s){this.props!==e&&((0,i.A)("willRefresh",this,e,this.props),this.refresh(e))}componentWillUnmount(){var e;const t=this.handlers;(0,i.A)("willUnmount",this,t);const s=null!==(e=this.eventSources)&&void 0!==e?e:[this.ol];for(const e of Object.keys(null!=t?t:{}))if((0,i.A)("cleaning up handler",this,e,t[e]),t[e]){for(const r of s)r.un(e,t[e]);t[e]=void 0,this.decrementHandlers(e)}}render(){return null}}l.contextType=o.aU},4114:(e,t,s)=>{s.d(t,{Ay:()=>v});var r=s(6540),o=s(277),i=s(6717),n=s(915),l=s(2627),a=s(7248),c=s(1895),h=s(1169),p=s(1443);class u extends o.A{}class d extends a.o{constructor(e,t){var s,r;if(super(e,t),!(null===(s=null==this?void 0:this.context)||void 0===s?void 0:s.vectorlayer))throw new Error("An RFeature must be part of a vector layer");e.feature?this.ol=e.feature:this.ol=new i.A({...null!==(r=e.properties)&&void 0!==r?r:{},geometry:e.geometry,style:h.Ay.getStyle(e.style)}),d.initEventRelay(this.context.map),this.onchange=()=>this.forceUpdate()}static initEventRelay(e){for(const t of d.pointerEvents)e.on(t,d.eventRelay)}incrementHandlers(e){var t;const s=a.o.getOLObject(c.Y,this.context.vectorlayer);s[e]=(null!==(t=s[e])&&void 0!==t?t:0)+1}decrementHandlers(e){a.o.getOLObject(c.Y,this.context.vectorlayer)[e]--}static dispatchEvent(e,t){var s;if(!e.feature)return!0;if(e.feature.dispatchEvent&&!1===e.feature.dispatchEvent(t))return!1;t.target||(t.target=e.feature);const r=null===(s=e.layer)||void 0===s?void 0:s.get(a.E)[t.type];return!r||r.call(null,t)}static eventRelay(e){const t=[];if(e.map.forEachFeatureAtPixel(e.pixel,((e,s)=>t.push({feature:e,layer:s})&&!1),{hitTolerance:d.hitTolerance,layerFilter:t=>{var s,r,o,i,n;const l=a.o.getOLObject(c.Y,t);switch(e.type){case"click":return l.click>0;case"dblclick":return l.dblclick>0;case"singleclick":return l.singleclick>0;case"pointermove":return(null!==(s=l.pointermove)&&void 0!==s?s:0)+(null!==(r=l.pointerenter)&&void 0!==r?r:0)+(null!==(o=l.pointerleave)&&void 0!==o?o:0)>0;case"pointerdrag":return(null!==(i=l.pointerdrag)&&void 0!==i?i:0)+(null!==(n=l.pointerdragend)&&void 0!==n?n:0)>0}return Object.keys(l).reduce(((e,t)=>e+l[t]),0)>0}}),e.dragging){d.lastFeaturesDragged.length||(d.lastFeaturesDragged=[...t]);for(const e of d.lastFeaturesDragged)t.find((t=>t.feature===e.feature))||t.push(e)}else{for(const t of d.lastFeaturesDragged)if(!1===d.dispatchEvent(t,new u("pointerdragend",e.map,e.originalEvent)))return d.lastFeaturesDragged=[],!1;d.lastFeaturesDragged=[]}if("pointermove"===e.type){for(const s of d.lastFeaturesEntered)if(!t.find((e=>e.feature===s.feature))){const t=d.dispatchEvent(s,new u("pointerleave",e.map,e.originalEvent));if(s.feature=null,s.layer=null,!1===t)return d.lastFeaturesEntered=d.lastFeaturesEntered.filter((e=>e.feature)),!1}d.lastFeaturesEntered=d.lastFeaturesEntered.filter((e=>e.feature));for(const s of t)if(!d.lastFeaturesEntered.find((e=>e.feature===s.feature))){const t=d.dispatchEvent(s,new u("pointerenter",e.map,e.originalEvent));if(d.lastFeaturesEntered.push(s),!1===t)return!1}}for(const s of t)if(!1===d.dispatchEvent(s,new u(e.type,e.map,e.originalEvent)))return!1;return!0}refresh(e){super.refresh(e),void 0!==this.props.feature&&this.props.feature!==this.ol&&((0,p.A)("replacing bound feature",this.ol),this.componentWillUnmount(),this.ol=this.props.feature,this.componentDidMount()),this.props.properties!==(null==e?void 0:e.properties)&&this.ol.setProperties(this.props.properties),this.props.geometry!==(null==e?void 0:e.geometry)&&this.ol.setGeometry(this.props.geometry),this.props.style!==(null==e?void 0:e.style)&&this.ol.setStyle(h.Ay.getStyle(this.props.style))}componentDidMount(){(0,p.A)("didMount",this.ol),super.componentDidMount(),this.ol.on("change",this.onchange),this.context.vectorsource.addFeature(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.ol.un("change",this.onchange),this.context.vectorsource.removeFeature(this.ol)}render(){var e,t;const s=null===(t=null===(e=this.ol)||void 0===e?void 0:e.getGeometry())||void 0===t?void 0:t.getExtent(),o=s&&(0,n.q1)(s);return r.createElement("div",{className:"_rlayers_RFeature"},r.createElement(l.aU.Provider,{value:{...this.context,feature:this.ol,rFeature:this,location:o}},this.props.children))}}d.pointerEvents=["click","pointerdrag","pointermove","singleclick","dblclick"],d.lastFeaturesEntered=[],d.lastFeaturesDragged=[],d.hitTolerance=3;const v=d},2627:(e,t,s)=>{s.d(t,{Xo:()=>i,aU:()=>o});var r=s(6540);const o=r.createContext({});function i(){const e=r.useContext(o);return{map:e.map,layer:e.layer,source:e.source,vectorlayer:e.vectorlayer,vectorsource:e.vectorsource,vectortilelayer:e.vectortilelayer,feature:e.feature,location:e.location,style:e.style,styleArray:e.styleArray}}},1443:(e,t,s)=>{s.d(t,{A:()=>r});const r=()=>{}},7240:(e,t,s)=>{s.d(t,{E6:()=>r,Dp:()=>B.Ay,NI:()=>Ke,vk:()=>o,Am:()=>p.A,od:()=>W,y1:()=>D,KL:()=>N,Xy:()=>U,HS:()=>f,QN:()=>M,Ff:()=>T,dx:()=>q,j9:()=>w,Ji:()=>G,Tw:()=>k,Fd:()=>O,f9:()=>h,ej:()=>A,$g:()=>J,Rv:()=>qe,bz:()=>Je,cq:()=>F,Xo:()=>n.Xo});var r={};s.r(r),s.d(r,{ON:()=>te,Es:()=>le,yO:()=>ue,bc:()=>ae,Ip:()=>he,H4:()=>Q,WP:()=>re,ni:()=>ie});var o={};s.r(o),s.d(o,{M5:()=>xe,Hm:()=>Ee,Nl:()=>Le,dI:()=>Ae});var i=s(7248),n=s(2627),l=s(6540),a=s(2961),c=s(3568);class h extends i.o{constructor(e){super(e),this.updateView=e=>{var t;const s=this.ol.getView();"function"==typeof(null===(t=this.props)||void 0===t?void 0:t.view[1])&&this.props.view[1]({center:s.getCenter(),zoom:s.getZoom(),resolution:s.getResolution()})},this.target=l.createRef(),this.ol=new a.A({controls:e.noDefaultControls?[]:void 0,interactions:e.noDefaultInteractions?[]:void 0,view:new c.Ay({projection:e.projection,center:e.initial.center,zoom:void 0===e.initial.resolution?e.initial.zoom:void 0,resolution:e.initial.resolution,extent:e.extent,minResolution:e.minResolution,maxResolution:e.maxResolution,constrainResolution:e.constrainResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,enableRotation:e.enableRotation,constrainRotation:e.constrainRotation})}),this.props.view&&this.ol.on("moveend",this.updateView)}componentDidMount(){super.componentDidMount(),this.ol.setTarget(this.target.current)}refresh(e){super.refresh(e);const t=this.ol.getView();for(const s of["minZoom","maxZoom","constrainResolution"]){const r=s.charAt(0).toUpperCase()+s.substring(1);e&&this.props[s]===e[s]||t["set"+r](this.props[s])}this.props.view&&(t.setCenter(this.props.view[0].center),void 0===this.props.view[0].resolution?t.setZoom(this.props.view[0].zoom):t.setResolution(this.props.view[0].resolution)),this.props.properties&&this.ol.setProperties(this.props.properties),this.props.view?this.ol.on("moveend",this.updateView):this.ol.un("moveend",this.updateView)}render(){return l.createElement("div",{className:this.props.className,style:{width:this.props.width,height:this.props.height},ref:this.target},l.createElement(n.aU.Provider,{value:{map:this.ol,rMap:this}},this.props.children))}}var p=s(5553),u=s(945),d=s(702),v=s(2662);class f extends v.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){this.source=new d.A({url:this.props.url,interpolate:!this.props.noIterpolation,projection:this.props.projection,tileGrid:this.props.tileGrid,crossOrigin:this.props.crossOrigin}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.tileGrid)===this.props.tileGrid&&(null==e?void 0:e.url)===this.props.url||(this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source))}}var m=s(1895),y=s(2757),g=s(731),x=s(1169);class w extends m.A{createSource(e){return this.source=new g.A({features:this.props.features,url:this.props.url,format:this.props.format,loader:this.props.loader,wrapX:this.props.wrapX,strategy:this.props.strategy}),this.ol=new y.A({...e,style:x.Ay.getStyle(this.props.style),source:this.source}),[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.url)!==this.props.url&&(this.source.setUrl(this.props.url),this.source.refresh())}}var P=s(7896);class A extends v.A{constructor(e,t){super(e,t),this.source=new P.A,this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.ol.setProperties({label:"OpenStreetMap"})}}var S=s(2794),b=s(6067),E=s(1443);class O extends v.A{constructor(e,t){super(e,t),this.ol=new u.A({source:this.source}),this.parser=new b.A}createSource(){return(0,E.A)("createSource",this),fetch(this.props.url).then((e=>e.text())).then((e=>{const t=this.parser.read(e);return this.options=(0,S.t)(t,{layer:this.props.layer}),this.props.attributions&&(this.options.attributions=this.props.attributions),this.options.crossOrigin="",this.props.projection&&(this.options.projection=this.props.projection),this.options.wrapX=!1,this.source=new S.A(this.options),this.ol.setSource(this.source),this.eventSources=[this.ol,this.source],this.props.onCapabilities&&this.props.onCapabilities.call(this,this.options),this.source})).catch((e=>(console.error("failed loading WMTS",this.props.url,this.props.layer,e),this.source=void 0,null)))}refresh(e){super.refresh(),(null==e?void 0:e.url)!==this.props.url||(null==e?void 0:e.layer)!==this.props.layer?this.createSource().then((()=>{this.ol.setSource(this.source),this.attachOldEventHandlers(this.source)})):this.props.onCapabilities&&this.props.onCapabilities.call(this,this.options)}}var R=s(8044),L=s(1011);class k extends v.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new R.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){const{params:e,url:t,crossOrigin:s}=this.props,r={params:e,url:t,crossOrigin:s};this.source=new L.A(r),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source)}}var j=s(8270);class U extends p.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new R.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){const e={url:this.props.url,projection:this.props.projection,imageExtent:this.props.extent,imageSize:this.props.size};this.source=new j.A(e),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.props.url&&(null==e?void 0:e.url)!==this.props.url&&(this.createSource(),this.ol.setSource(this.source),this.eventSources=[this.ol,this.source],this.attachOldEventHandlers(this.source))}}var C=s(517),F=s(5111);class D extends p.A{constructor(e,t){super(e,t),this.createSource()}createSource(){var e,t,s,r,o,i;const n=null===(t=null===(e=F.RStyle.getStyleStatic(this.props.strokeStyle))||void 0===e?void 0:e.getStroke)||void 0===t?void 0:t.call(e),l=null===(r=null===(s=F.RStyle.getStyleStatic(this.props.lonLabelStyle))||void 0===s?void 0:s.getText)||void 0===r?void 0:r.call(s),a=null===(i=null===(o=F.RStyle.getStyleStatic(this.props.latLabelStyle))||void 0===o?void 0:o.getText)||void 0===i?void 0:i.call(o);this.ol=new C.A({...this.props,strokeStyle:n,lonLabelStyle:l,latLabelStyle:a}),this.eventSources=[this.ol]}refresh(e){super.refresh(e);const t=this.context.map.removeLayer(this.ol);this.createSource(),this.attachOldEventHandlers(this.ol),t&&this.context.map.addLayer(this.ol)}}var z=s(4218);class M extends v.A{constructor(e,t){super(e,t),this.source=new z.A({url:this.props.url,tileSize:this.props.tileSize}),this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.props.url&&(null==e?void 0:e.url)!==this.props.url&&(this.source.setUrl(this.props.url),this.source.refresh())}}var I=s(2728);class T extends v.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){const{params:e,url:t,projection:s}=this.props,r={params:e,url:t,projection:s};this.source=new I.A(r),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source)}}var _=s(1905);class N extends m.A{createSource(e){return this.source=new g.A({features:this.props.features,url:this.props.url,format:this.props.format,loader:this.props.loader,wrapX:this.props.wrapX,strategy:this.props.strategy}),this.ol=new _.A({...e,source:this.source}),[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.blur)!==this.props.blur&&this.ol.setBlur(this.props.blur),(null==e?void 0:e.radius)!==this.props.radius&&this.ol.setRadius(this.props.radius)}}var H=s(6203);class W extends m.A{createSource(e){return this.cluster=new g.A({features:this.props.features,url:this.props.url,format:this.props.format,loader:this.props.loader,wrapX:this.props.wrapX,strategy:this.props.strategy}),this.source=new H.A({source:this.cluster,distance:this.props.distance}),this.ol=new y.A({...e,source:this.source,style:x.Ay.getStyle(e.style)}),[this.ol,this.source,this.cluster]}refresh(e){super.refresh(e),(null==e?void 0:e.distance)!==this.props.distance&&this.source.setDistance(this.props.distance),(null==e?void 0:e.url)!==this.props.url&&(this.cluster.setUrl(this.props.url),this.cluster.refresh())}render(){return l.createElement("div",{className:"_rlayers_RLayerCluster"},l.createElement(n.aU.Provider,{value:{...this.context,layer:this.ol,source:this.cluster,vectorlayer:this.ol,vectorsource:this.cluster,rLayer:this,rLayerVector:this}},this.props.children))}}var V=s(8063),X=s(5620),B=s(4114);class G extends p.A{constructor(e,t){super(e,t),this.source=new X.A({url:this.props.url,format:this.props.format,projection:this.props.projection,cacheSize:this.props.cacheSize,extent:this.props.extent,overlaps:this.props.overlaps,state:this.props.state,tileClass:this.props.tileClass,tileSize:this.props.tileSize,tileGrid:this.props.tileGrid,tileLoadFunction:this.props.tileLoadFunction,tileUrlFunction:this.props.tileUrlFunction,transition:this.props.transition,wrapX:this.props.wrapX,zDirection:this.props.zDirection}),this.ol=new V.A({style:x.Ay.getStyle(this.props.style),source:this.source,renderBuffer:this.props.renderBuffer}),this.eventSources=[this.ol,this.source],B.Ay.initEventRelay(this.context.map)}incrementHandlers(e){var t;const s=i.o.getOLObject(m.Y,this.ol);s[e]=(null!==(t=s[e])&&void 0!==t?t:0)+1}decrementHandlers(e){i.o.getOLObject(m.Y,this.ol)[e]--}refresh(e){super.refresh(e);const t=Object.keys(this.props).filter((e=>e.startsWith("on"))).reduce(((e,t)=>({...e,["_"+t.toLowerCase()]:this.props[t]})),{});this.ol.setProperties(t),(null==e?void 0:e.style)!==this.props.style&&this.ol.setStyle(x.Ay.getStyle(this.props.style)),(null==e?void 0:e.url)!==this.props.url&&(this.source.setUrl(this.props.url),this.source.refresh())}render(){return l.createElement("div",{className:"_rlayers_RLayerVectorTile"},l.createElement(n.aU.Provider,{value:{...this.context,layer:this.ol,vectortilelayer:this.ol,rLayer:this,rLayerVectorTile:this}},this.props.children))}}var Z=s(114);class Y extends v.A{}class q extends Y{constructor(e,t){super(e,t),this.createSource(),this.ol=new Z.A({opacity:.9,source:this.source,cacheSize:e.cacheSize}),this.eventSources=[this.ol,this.source]}createSource(){this.source=new d.A({url:this.props.url,interpolate:!this.props.noIterpolation,projection:this.props.projection,tileGrid:this.props.tileGrid,crossOrigin:"anonymous"}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.tileGrid)===this.props.tileGrid&&(null==e?void 0:e.url)===this.props.url||(this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source))}}class J extends Y{constructor(e,t){super(e,t),this.source=new P.A,this.ol=new Z.A({source:this.source,cacheSize:e.cacheSize}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.ol.setProperties({label:"OpenStreetMap"})}}var $=s(3965);class K extends i.o{constructor(e,t){var s;if(super(e,t),!(null===(s=this.context)||void 0===s?void 0:s.map))throw new Error("A control must be part of a map")}toOLProps(e){var t;return{className:e.className,target:null===(t=e.target)||void 0===t?void 0:t.current}}refresh(e){super.refresh(e),this.ol.setProperties(this.toOLProps(this.props))}componentDidMount(){super.componentDidMount(),this.context.map.addControl(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeControl(this.ol)}}class Q extends K{constructor(e,t){super(e,t),this.ol=new $.A(this.toOLProps(e))}toOLProps(e){var t;return{...super.toOLProps(e),minWidth:e.minWidth,bar:e.bar,text:e.text,units:null!==(t=e.units)&&void 0!==t?t:"metric"}}}var ee=s(7456);class te extends K{constructor(e,t){super(e,t),this.ol=new ee.A(this.toOLProps(e))}refresh(e){super.refresh(e),(null==e?void 0:e.collapsed)!==this.props.collapsed&&this.ol.setCollapsed(this.props.collapsed)}toOLProps(e){var t;return{...super.toOLProps(e),collapsible:null===(t=e.collapsible)||void 0===t||t,collapsed:e.collapsed}}}var se=s(9186);class re extends K{constructor(e,t){super(e,t),this.ol=new se.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),duration:e.duration,zoomInLabel:e.zoomInLabel,zoomOutLabel:e.zoomOutLabel,zoomInTipLabel:e.zoomInTipLabel,zoomOutTipLabel:e.zoomOutTipLabel,delta:e.delta}}}var oe=s(9439);class ie extends K{constructor(e,t){super(e,t),this.ol=new oe.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),duration:e.duration}}}s(2898);var ne=s(972);class le extends K{constructor(e,t){super(e,t),this.targetRef=l.createRef()}componentDidMount(){this.ol=new ne.A(this.toOLProps(this.props)),super.componentDidMount()}toOLProps(e){var t;return{...super.toOLProps(e),element:null===(t=this.targetRef)||void 0===t?void 0:t.current}}render(){return l.createElement("div",{className:["ol-control",this.props.className].join(" "),ref:this.targetRef},this.props.children)}}class ae extends K{constructor(e,t){super(e,t),this.onchange=()=>this.forceUpdate(),this.clickCollapse=()=>{this.setState({collapsed:!this.state.collapsed})},this.targetRef=l.createRef(),this.state={collapsed:!0,visible:[!0]}}componentDidMount(){this.ol=new ne.A(this.toOLProps(this.props)),super.componentDidMount(),this.context.map.on("change",this.onchange),this.forceUpdate()}componentWillUnmount(){super.componentWillUnmount(),this.context.map.un("change",this.onchange)}toOLProps(e){var t;return{...super.toOLProps(e),element:null===(t=this.targetRef)||void 0===t?void 0:t.current}}render(){var e,t;const s=l.Children.map(this.props.children,((e,t)=>{var s;if(l.isValidElement(e))return null!==(s=this.state.visible[t])&&void 0!==s&&s})),r=l.Children.map(this.props.children,(e=>{var t,s;if(l.isValidElement(e))return null!==(s=null===(t=e.props.properties)||void 0===t?void 0:t.label)&&void 0!==s?s:"no label"}));return l.createElement(l.Fragment,null,l.createElement("div",{className:["ol-control",null!==(e=this.props.className)&&void 0!==e?e:"ol-layers-control"].join(" "),ref:this.targetRef},l.createElement("span",{onClick:this.clickCollapse},null!==(t=this.props.element)&&void 0!==t?t:l.createElement("button",null,"=")),this.state.collapsed?null:l.createElement("div",null,r.map(((e,t)=>l.createElement("div",{key:t},l.createElement("input",{type:"radio",id:t.toString(),name:e,value:t.toString(),checked:s[t],onChange:()=>{for(const e in s)s[e]=!1;s[t]=!0,this.setState({visible:[...s],collapsed:!0})}}),l.createElement("label",{htmlFor:t.toString()},e)))))),l.Children.map(this.props.children,((e,t)=>l.isValidElement(e)?l.cloneElement(e,{visible:s[t]}):e)))}}var ce=s(6950);class he extends K{constructor(e,t){super(e,t),this.ol=new ce.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),collapsible:e.collapsible,collapsed:e.collapsed,label:e.label,collapseLabel:e.collapseLabel}}refresh(e){super.refresh(e),(null==e?void 0:e.collapsed)!==this.props.collapsed&&this.ol.setCollapsed(this.props.collapsed)}render(){return l.createElement("div",{className:this.props.className,style:{width:this.props.width,height:this.props.height}},l.createElement(n.aU.Provider,{value:{map:this.ol.getOverviewMap()}},this.props.children))}}var pe=s(7364);class ue extends K{constructor(e,t){super(e,t),this.ol=new pe.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),source:e.source,label:e.label,labelActive:e.labelActive,tipLabel:e.tipLabel}}}s(2977),s(1727);class de extends i.o{constructor(e,t){var s,r;if(super(e,t),!(null===(r=null===(s=this.context)||void 0===s?void 0:s.map)||void 0===r?void 0:r.addInteraction))throw new Error("An interaction must be part of a map");this.ol=this.createOL(e)}createOL(e){throw new Error("RBaseInteraction should not be directly instantiated")}refresh(e){for(const t of this.classProps)if(e&&e[t]!==this.props[t]){(0,E.A)("Replacing interaction",this,e),this.componentWillUnmount(),this.ol=this.createOL(this.props),this.componentDidMount();break}super.refresh(e)}componentDidMount(){super.componentDidMount(),this.context.map.addInteraction(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeInteraction(this.ol)}}de.classProps=[];const ve=de;class fe extends ve{}fe.classProps=["handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent"];const me=fe;var ye=s(422);class ge extends me{createOL(e){return this.classProps=ge.classProps,new ye.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}ge.classProps=["className","condition","minArea","boxEndCondition"];const xe=ge;var we=s(4458);class Pe extends me{createOL(e){return this.classProps=Pe.classProps,new we.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Pe.classProps=["features","layers","filter","hitTolerance"];const Ae=Pe;var Se=s(9964);class be extends me{createOL(e){var t;if(!(null===(t=null==this?void 0:this.context)||void 0===t?void 0:t.vectorsource))throw new Error("A Draw interaction must be part of a vector layer");return this.classProps=be.classProps,new Se.Ay({type:e.type,source:this.context.vectorsource,...Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{})})}}be.classProps=["condition","finishCondition","freehandCondition","style","stopClick","maxPoints","minPoints","snapTolerance"];const Ee=be;var Oe=s(9132);class Re extends me{createOL(e){var t;if(!(null===(t=null==this?void 0:this.context)||void 0===t?void 0:t.vectorsource))throw new Error("A Modify interaction must be part of a vector layer");return this.classProps=Re.classProps,new Oe.A({source:this.context.vectorsource,...Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{})})}}Re.classProps=["condition","deleteCondition","insertVertexCondition","style","pixelTolerance","hitDetection"];const Le=Re;var ke=s(6068);class je extends ve{createOL(e){return this.classProps=je.classProps,new ke.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}je.classProps=["duration","delta"];var Ue=s(4473);class Ce extends ve{createOL(e){return this.classProps=Ce.classProps,new Ue.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ce.classProps=["condition","kinetic"];var Fe=s(4051);class De extends ve{createOL(e){return this.classProps=De.classProps,new Fe.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}De.classProps=["condition","duration"];var ze=s(4423);class Me extends ve{createOL(e){return this.classProps=Me.classProps,new ze.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Me.classProps=["className","condition","duration","out","minArea"];var Ie=s(8751);class Te extends ve{createOL(e){return this.classProps=Te.classProps,new Ie.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Te.classProps=["condition","maxDelta","duration","useAnchor","constrainResolution"];var _e=s(3711);class Ne extends ve{createOL(e){return this.classProps=Ne.classProps,new _e.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ne.classProps=["threshold","duration"];var He=s(5243);class We extends ve{createOL(e){return this.classProps=We.classProps,new He.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}We.classProps=["duration"];var Ve=s(9888);class Xe extends ve{createOL(e){return this.classProps=Xe.classProps,new Ve.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Xe.classProps=["condition","duration","pixelDelta"];var Be=s(6856);class Ge extends ve{createOL(e){return this.classProps=Ge.classProps,new Be.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ge.classProps=["condition","duration","delta"];var Ze=s(1795);class Ye extends i.o{constructor(e,t){var s;if(super(e,t),!(null===(s=this.context)||void 0===s?void 0:s.location))throw new Error("An overlay must be part of a location provider (ie RFeature)");this.ol=new Ze.A({autoPan:e.autoPan,offset:e.offset,positioning:e.positioning}),this.containerRef=l.createRef()}setPosition(){var e;if(this.ol.setPosition(this.context.location),this.props.autoPosition&&(null===(e=this.containerRef)||void 0===e?void 0:e.current)){this.containerRef.current.style.position="absolute";const e=this.context.map.getPixelFromCoordinate(this.context.location),t=this.context.map.getSize();e[0]>t[0]/2?(this.containerRef.current.style.left=null,this.containerRef.current.style.right="0px"):(this.containerRef.current.style.left="0px",this.containerRef.current.style.right=null),e[1]>t[1]/2?(this.containerRef.current.style.top=null,this.containerRef.current.style.bottom="0px"):(this.containerRef.current.style.top="0px",this.containerRef.current.style.bottom=null)}}refresh(e){super.refresh(e),this.ol.setElement(this.containerRef.current),this.setPosition(),this.props.offset!==(null==e?void 0:e.offset)&&this.ol.setOffset(this.props.offset),this.props.positioning!==(null==e?void 0:e.positioning)&&this.ol.setPositioning(this.props.positioning)}componentDidMount(){super.componentDidMount(),this.context.map.addOverlay(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeOverlay(this.ol)}render(){return this.setPosition(),l.createElement("div",{className:"_rlayers_ROverlay"},l.createElement("div",{ref:this.containerRef,className:this.props.className,onClick:this.props.onClick},this.props.children))}}class qe extends Ye{}class Je extends Ye{constructor(e,t){super(e,t),this.toggle=()=>{this.visible=!this.visible,this.setPosition()},this.show=()=>{var e,t;this.showing||(this.hiding&&window.clearTimeout(this.hiding),this.showing=window.setTimeout((()=>{this.visible=!0,this.setPosition(),this.hiding=this.showing=void 0}),null!==(t=null===(e=this.props.delay)||void 0===e?void 0:e.show)&&void 0!==t?t:250))},this.hide=()=>{var e,t;this.hiding||(this.showing&&window.clearTimeout(this.showing),this.hiding=window.setTimeout((()=>{this.visible=!1,this.setPosition(),this.hiding=this.showing=void 0}),null!==(t=null===(e=this.props.delay)||void 0===e?void 0:e.hide)&&void 0!==t?t:50))},this.visible=!1}componentWillUnmount(){super.componentWillUnmount(),this.unregister()}setPosition(){this.ol.setPosition(this.visible?this.context.location:void 0)}unregister(e){if(e)switch(e.trigger){default:case"click":this.context.rFeature.un("click",this.toggle);break;case"hover":this.context.rFeature.un("pointerenter",this.show),this.context.rFeature.un("pointerhide",this.hide)}}refresh(e){if(this.ol.setElement(this.containerRef.current),(null==e?void 0:e.trigger)!==this.props.trigger)switch(this.unregister(e),this.props.trigger){default:case"click":"hover"===(null==e?void 0:e.trigger)&&(this.context.rFeature.un("pointerenter",this.show),this.context.rFeature.un("pointerhide",this.hide)),this.context.rFeature.on("click",this.toggle);break;case"hover":"click"===(null==e?void 0:e.trigger)&&this.context.rFeature.un("click",this.toggle),this.context.rFeature.on("pointerenter",this.show),this.context.rFeature.on("pointerleave",this.hide)}this.setPosition()}}var $e=s(5213);class Ke extends i.o{constructor(e,t){var s,r;if(super(e,t),!(null===(s=null==this?void 0:this.context)||void 0===s?void 0:s.map))throw new Error("A Geolocation must be part of a map");const o=null!==(r=e.projection)&&void 0!==r?r:this.context.map.getView().getProjection();this.ol=new $e.A({...e,projection:o})}}},5553:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(6540),o=s(2627),i=s(7248);class n extends i.o{constructor(e,t){var s,r;if(super(e,t),!(null===(r=null===(s=this.context)||void 0===s?void 0:s.map)||void 0===r?void 0:r.addLayer))throw new Error("A layer must be part of a map")}refresh(e){super.refresh(e);for(const t of["visible","opacity","zIndex","minResolution","maxResolution","minZoom","maxZoom"]){const s=t.charAt(0).toUpperCase()+t.substring(1);this.props[t]!==(e&&e[t])&&this.ol["set"+s](this.props[t])}this.source&&this.props.attributions&&this.source.setAttributions(this.props.attributions),this.props.properties&&this.ol.setProperties(this.props.properties)}componentDidMount(){super.componentDidMount(),this.context.map.addLayer(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeLayer(this.ol)}render(){return r.createElement("div",{className:"_rlayers_RLayer"},r.createElement(o.aU.Provider,{value:{...this.context,layer:this.ol,source:this.source,rLayer:this}},this.props.children))}}},1895:(e,t,s)=>{s.d(t,{A:()=>h,Y:()=>c});var r=s(6540),o=s(2627),i=s(5553),n=s(4114),l=s(1169),a=s(7248);const c="_rlayers_feature_handlers";class h extends i.A{constructor(e,t){super(e,t),n.Ay.initEventRelay(this.context.map),this.eventSources=this.createSource(e),super.refresh()}createSource(e){throw new Error("RLayerBaseVector is an abstract class")}refresh(e){super.refresh(e),(null==e?void 0:e.style)!==this.props.style&&this.ol.setStyle(l.Ay.getStyle(this.props.style))}incrementHandlers(e){var t;const s=a.o.getOLObject(c,this.ol);s[e]=(null!==(t=s[e])&&void 0!==t?t:0)+1}decrementHandlers(e){a.o.getOLObject(c,this.ol)[e]--}render(){return r.createElement("div",{className:"_rlayers_RLayerVector"},r.createElement(o.aU.Provider,{value:{...this.context,layer:this.ol,source:this.source,vectorlayer:this.ol,vectorsource:this.source,rLayer:this,rLayerVector:this}},this.props.children))}}},2662:(e,t,s)=>{s.d(t,{A:()=>o});var r=s(5553);class o extends r.A{}},1169:(e,t,s)=>{s.d(t,{Ay:()=>u,M2:()=>h,VX:()=>c});var r=s(6540),o=s(5338),i=s(9303),n=s(9276),l=s(2627),a=s(1443);const c=()=>r.useRef(),h=()=>r.createRef();class p extends r.PureComponent{constructor(e,t){super(e,t),this.style=(e,t)=>{if(this.ol!==this.style)return this.ol;let s;if(this.cache){s=this.props.cacheId(e,t);const r=this.cache.get(s);if(r)return r}const i=new n.Ay({zIndex:this.props.zIndex}),a=r.createElement(l.aU.Provider,{value:{...this.context,style:i}},this.props.render(e,t));return(0,o.createRoot)(document.createElement("div")).render(a),this.cache&&this.cache.set(s,i),i},e.render?this.ol=this.style:this.ol=new n.Ay({zIndex:e.zIndex}),e.render&&e.cacheSize&&e.cacheId&&(this.cache=new i.q({max:e.cacheSize}))}componentDidMount(){this.refresh()}componentDidUpdate(e,t,s){this.props!==e&&((0,a.A)("willRefresh",this,e,this.props),this.refresh(e))}refresh(e){var t,s,r,o,i,l,a;if(!e||(null==e?void 0:e.render)!==this.props.render){if(null===(t=this.context)||void 0===t?void 0:t.styleArray){if(this.ol===this.style)throw new Error("An RStyleArray must contain only static RStyles");this.context.styleArray.includes(this.ol)||this.context.styleArray.push(this.ol)}else(null===(r=null===(s=this.context)||void 0===s?void 0:s.feature)||void 0===r?void 0:r.setStyle)?this.context.feature.setStyle(this.ol):(null===(i=null===(o=this.context)||void 0===o?void 0:o.vectorlayer)||void 0===i?void 0:i.setStyle)?this.context.vectorlayer.setStyle(this.ol):(null===(a=null===(l=this.context)||void 0===l?void 0:l.vectortilelayer)||void 0===a?void 0:a.setStyle)&&this.context.vectortilelayer.setStyle(this.ol);this.cache&&this.cache.clear()}this.ol instanceof n.Ay&&(!e||e.zIndex!==this.props.zIndex)&&this.ol.setZIndex(this.props.zIndex)}render(){return this.props.render?null:r.createElement("div",{className:"_rlayers_RStyle"},r.createElement(l.aU.Provider,{value:{...this.context,style:this.ol}},this.props.children))}static getStyle(e){return null==e?e:"function"==typeof e.style?(t,s)=>e.style(t,s):Object.keys(e).includes("current")?(t,s)=>e.current.style(t,s):e}static getStyleStatic(e){if(null==e)return e;let t;if("function"==typeof e.style&&(t=e),!Object.keys(e).includes("current")||(t=e.current,null!=t)){if(t){if(void 0!==t.ol&&"function"!=typeof t.ol)return t.ol;throw new TypeError("RStyle is dynamic and cannot be converted to Style")}if("function"==typeof e)throw new TypeError("StyleLike is dynamic and cannot be converted to Style");return e}}}p.contextType=l.aU;const u=p},5111:(e,t,s)=>{s.r(t),s.d(t,{RBackground:()=>C,RBaseStyle:()=>a,RBaseStyleProps:()=>r.RBaseStyleProps,RCircle:()=>b,RFill:()=>y,RIcon:()=>z,RRegularShape:()=>R,RStroke:()=>v,RStyle:()=>c.Ay,RStyleArray:()=>p,RStyleLike:()=>c.RStyleLike,RStyleRef:()=>c.RStyleRef,RText:()=>j,createRStyle:()=>c.M2,useRStyle:()=>c.VX});var r={};s.r(r),s.d(r,{A:()=>a});var o=s(6540),i=s(2627),n=s(1443);class l extends o.PureComponent{constructor(e,t){if(super(e,t),!this.context)throw new Error("A style property must be part of a style");this.ol=this.create(e)}create(e){throw new Error("RBaseStyle is an abstract class")}refresh(e){if((0,n.A)("refreshStyle",this),e)for(const t of this.classProps){const s=t.charAt(0).toUpperCase()+t.substring(1);(e&&e[t])!==this.props[t]&&(this.ol["set"+s]?this.ol["set"+s](this.props[t]):console.error(`Underlying OpenLayers object does not support updating of ${t} after object creation. If you are using an anonymous constant array or object, consider assigning its value to a constant and then passing the constant or use React.useMemo() to avoid this warning and improve performance.`))}}set(e){}componentDidMount(){this.set(this.ol)}componentDidUpdate(e,t,s){e!==this.props&&this.refresh(e)}componentWillUnmount(){this.set(null)}render(){return null}}l.contextType=i.aU,l.classProps=[];const a=l;var c=s(1169),h=s(5338);class p extends c.Ay{constructor(e,t){super(e,t),this.style=(e,t)=>{if(this.props.render){const s=this.props.render(e,t);o.Children.map(s.props.children,(e=>{if(o.isValidElement(e)&&e.type!==c.Ay)throw new TypeError("An RStyleArray should contain only RStyle elements")}));const r=[],n=o.createElement(i.aU.Provider,{value:{...this.context,styleArray:r}},s.props.children);return(0,h.createRoot)(document.createElement("div")).render(n),r}return this.ol},this.childRefs=[],e.render?this.ol=this.style:this.ol=[]}refresh(e){super.refresh(e)}render(){return o.Children.map(this.props.children,(e=>{if(o.isValidElement(e)&&e.type!==c.Ay)throw new TypeError("An RStyleArray should contain only RStyle elements")})),this.props.render?o.createElement(o.Fragment,null):o.createElement("div",{className:"_rlayers_RStyleArray"},o.createElement(i.aU.Provider,{value:{...this.context,styleArray:this.ol}},this.props.children))}}var u=s(953);class d extends a{create(e){return this.classProps=d.classProps,new u.A(e)}set(e){if(this.context.style.setStroke)return this.context.style.setStroke(e);throw new Error("Parent element does not support a stroke")}}d.classProps=["color","width","lineCap","lineJoin","lineDash"];const v=d;var f=s(3628);class m extends a{create(e){return this.classProps=m.classProps,new f.A(e)}set(e){if(this.context.style.setFill)return this.context.style.setFill(e);throw new Error("Parent element does not support a fill")}}m.classProps=["color"];const y=m;var g=s(7733);class x extends a{create(e){throw new Error("RImage is an abstract class")}set(e){if(!this.context.style.setImage)throw new Error("Parent element does not support an image");this.context.style.setImage(e)}}x.classProps=["opacity","rotateWithView","rotation","scale","displacement"];const w=x;class P extends w{create(e){throw new Error("RImage is an abstract class")}setStroke(e){this.stroke=e,this.ol=this.create(this.props),super.set(this.ol)}setFill(e){this.fill=e,this.ol=this.create(this.props),super.set(this.ol)}render(){return o.createElement("div",{className:"_rlayers_RStyle"},o.createElement(i.aU.Provider,{value:{...this.context,style:this}},this.props.children))}}P.classProps=w.classProps.concat(["radius"]);const A=P;class S extends A{create(e){return this.classProps=S.classProps,new g.A({...e,stroke:this.stroke,fill:this.fill})}}S.classProps=A.classProps.concat(["radius"]);const b=S;var E=s(6936);class O extends A{create(e){return this.classProps=O.classProps,new E.A({...e,stroke:this.stroke,fill:this.fill})}}O.classProps=A.classProps.concat(["radius1","radius2","points","angle"]);const R=O;var L=s(1426);class k extends a{create(e){return this.classProps=k.classProps,new L.A(e)}set(e){if(!this.context.style.setText)throw new Error("Parent element does not support a text");this.context.style.setText(e)}render(){return o.createElement("div",{className:"_rlayers_RStyle_RText"},o.createElement(i.aU.Provider,{value:{...this.context,style:this.ol}},this.props.children))}}k.classProps=["text","font","offsetY","offsetX","overflow","scale","rotation","textAlign","padding","placement","textBaseline"];const j=k;class U extends a{create(e){this.classProps=U.classProps;const t=this.context.style;if(!t.setBackgroundFill||!t.setBackgroundStroke)throw new Error("Parent element does not support a background");return{setFill:t.setBackgroundFill.bind(t),setStroke:t.setBackgroundStroke.bind(t)}}render(){return o.createElement("div",{className:"_rlayers_RStyle_RBackground"},o.createElement(i.aU.Provider,{value:{...this.context,style:this.ol}},this.props.children))}}U.classProps=[];const C=U;var F=s(9700);class D extends w{create(e){return this.classProps=D.classProps,new F.A(e)}}D.classProps=w.classProps.concat(["anchor","anchorXUnits","anchorYUnits","color","crossOrigin","img","offset","offsetOrigin","size","imgSize","src"]);const z=D}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7240],{7248:(e,t,s)=>{s.d(t,{E:()=>n,o:()=>l});var r=s(6540),o=s(2627),i=s(1443);const n="_rlayers_handlers";class l extends r.PureComponent{static getOLObject(e,t){let s=t.get(e);return void 0===s&&(s={},t.set(e,s)),s}get handlers(){return l.getOLObject(n,this.ol)}getCurrentEvents(){return Object.keys(this.props).filter((e=>e.startsWith("on"))).map((e=>({event:e.toLowerCase().slice(2),prop:e}))).reduce(((e,t)=>({...e,[t.event]:this.props[t.prop]})),{})}getHandlerProp(e){for(const t of Object.keys(this.props))if(t.toLowerCase()==="on"+e)return t}incrementHandlers(e){}decrementHandlers(e){}attachEventHandlers(){var e;const t=this.handlers,s=Object.keys(null!=t?t:{}),r=null!==(e=this.eventSources)&&void 0!==e?e:[this.ol],o=this.getCurrentEvents(),n=Object.keys(o),l=n.concat(s.filter((e=>!n.includes(e))));for(const e of l){if(void 0!==t[e]&&void 0===o[e]){(0,i.A)("removing previously installed handler",this,e,t[e]);for(const s of r)s.un(e,t[e]);t[e]=void 0,this.decrementHandlers(e)}if(void 0===t[e]&&void 0!==o[e]){(0,i.A)("installing handler",this,e,o[e]);const s=this.getHandlerProp(e);if(!s)throw new Error("Internal error");t[e]=e=>this.props[s].call(this,e);for(const s of r)s.on(e,t[e]);this.incrementHandlers(e)}}}attachOldEventHandlers(e){const t=this.handlers,s=this.getCurrentEvents();for(const r of Object.keys(s))s[r]&&((0,i.A)("reinstalling existing handler",this,r,s[r]),e.on(r,t[r]))}refresh(e){this.attachEventHandlers()}on(e,t){this.ol.on(e,t),this.incrementHandlers(e)}un(e,t){this.decrementHandlers(e),this.ol.un(e,t)}componentDidMount(){(0,i.A)("didMount",this),this.refresh()}propsDiff(e){if(null===this.props||null===e)return this.props!==e&&((0,i.A)("null props differ",this.props,e),!0);for(const t of Object.keys(this.props))if(this.props[t]!==e[t])return(0,i.A)("because of",t,this.props[t],e[t]),!0;return!1}componentDidUpdate(e,t,s){this.props!==e&&((0,i.A)("willRefresh",this,e,this.props),this.refresh(e))}componentWillUnmount(){var e;const t=this.handlers;(0,i.A)("willUnmount",this,t);const s=null!==(e=this.eventSources)&&void 0!==e?e:[this.ol];for(const e of Object.keys(null!=t?t:{}))if((0,i.A)("cleaning up handler",this,e,t[e]),t[e]){for(const r of s)r.un(e,t[e]);t[e]=void 0,this.decrementHandlers(e)}}render(){return null}}l.contextType=o.aU},4114:(e,t,s)=>{s.d(t,{Ay:()=>v});var r=s(6540),o=s(277),i=s(6717),n=s(915),l=s(2627),a=s(7248),c=s(1895),h=s(1169),p=s(1443);class u extends o.A{}class d extends a.o{constructor(e,t){var s,r;if(super(e,t),!(null===(s=null==this?void 0:this.context)||void 0===s?void 0:s.vectorlayer))throw new Error("An RFeature must be part of a vector layer");e.feature?this.ol=e.feature:this.ol=new i.A({...null!==(r=e.properties)&&void 0!==r?r:{},geometry:e.geometry,style:h.Ay.getStyle(e.style)}),d.initEventRelay(this.context.map),this.onchange=()=>this.forceUpdate()}static initEventRelay(e){for(const t of d.pointerEvents)e.on(t,d.eventRelay)}incrementHandlers(e){var t;const s=a.o.getOLObject(c.Y,this.context.vectorlayer);s[e]=(null!==(t=s[e])&&void 0!==t?t:0)+1}decrementHandlers(e){a.o.getOLObject(c.Y,this.context.vectorlayer)[e]--}static dispatchEvent(e,t){var s;if(!e.feature)return!0;if(e.feature.dispatchEvent&&!1===e.feature.dispatchEvent(t))return!1;t.target||(t.target=e.feature);const r=null===(s=e.layer)||void 0===s?void 0:s.get(a.E)[t.type];return!r||r.call(null,t)}static eventRelay(e){const t=[];if(e.map.forEachFeatureAtPixel(e.pixel,((e,s)=>t.push({feature:e,layer:s})&&!1),{hitTolerance:d.hitTolerance,layerFilter:t=>{var s,r,o,i,n;const l=a.o.getOLObject(c.Y,t);switch(e.type){case"click":return l.click>0;case"dblclick":return l.dblclick>0;case"singleclick":return l.singleclick>0;case"pointermove":return(null!==(s=l.pointermove)&&void 0!==s?s:0)+(null!==(r=l.pointerenter)&&void 0!==r?r:0)+(null!==(o=l.pointerleave)&&void 0!==o?o:0)>0;case"pointerdrag":return(null!==(i=l.pointerdrag)&&void 0!==i?i:0)+(null!==(n=l.pointerdragend)&&void 0!==n?n:0)>0}return Object.keys(l).reduce(((e,t)=>e+l[t]),0)>0}}),e.dragging){d.lastFeaturesDragged.length||(d.lastFeaturesDragged=[...t]);for(const e of d.lastFeaturesDragged)t.find((t=>t.feature===e.feature))||t.push(e)}else{for(const t of d.lastFeaturesDragged)if(!1===d.dispatchEvent(t,new u("pointerdragend",e.map,e.originalEvent)))return d.lastFeaturesDragged=[],!1;d.lastFeaturesDragged=[]}if("pointermove"===e.type){for(const s of d.lastFeaturesEntered)if(!t.find((e=>e.feature===s.feature))){const t=d.dispatchEvent(s,new u("pointerleave",e.map,e.originalEvent));if(s.feature=null,s.layer=null,!1===t)return d.lastFeaturesEntered=d.lastFeaturesEntered.filter((e=>e.feature)),!1}d.lastFeaturesEntered=d.lastFeaturesEntered.filter((e=>e.feature));for(const s of t)if(!d.lastFeaturesEntered.find((e=>e.feature===s.feature))){const t=d.dispatchEvent(s,new u("pointerenter",e.map,e.originalEvent));if(d.lastFeaturesEntered.push(s),!1===t)return!1}}for(const s of t)if(!1===d.dispatchEvent(s,new u(e.type,e.map,e.originalEvent)))return!1;return!0}refresh(e){super.refresh(e),void 0!==this.props.feature&&this.props.feature!==this.ol&&((0,p.A)("replacing bound feature",this.ol),this.componentWillUnmount(),this.ol=this.props.feature,this.componentDidMount()),this.props.properties!==(null==e?void 0:e.properties)&&this.ol.setProperties(this.props.properties),this.props.geometry!==(null==e?void 0:e.geometry)&&this.ol.setGeometry(this.props.geometry),this.props.style!==(null==e?void 0:e.style)&&this.ol.setStyle(h.Ay.getStyle(this.props.style))}componentDidMount(){(0,p.A)("didMount",this.ol),super.componentDidMount(),this.ol.on("change",this.onchange),this.context.vectorsource.addFeature(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.ol.un("change",this.onchange),this.context.vectorsource.removeFeature(this.ol)}render(){var e,t;const s=null===(t=null===(e=this.ol)||void 0===e?void 0:e.getGeometry())||void 0===t?void 0:t.getExtent(),o=s&&(0,n.q1)(s);return r.createElement("div",{className:"_rlayers_RFeature"},r.createElement(l.aU.Provider,{value:{...this.context,feature:this.ol,rFeature:this,location:o}},this.props.children))}}d.pointerEvents=["click","pointerdrag","pointermove","singleclick","dblclick"],d.lastFeaturesEntered=[],d.lastFeaturesDragged=[],d.hitTolerance=3;const v=d},2627:(e,t,s)=>{s.d(t,{Xo:()=>i,aU:()=>o});var r=s(6540);const o=r.createContext({});function i(){const e=r.useContext(o);return{map:e.map,layer:e.layer,source:e.source,vectorlayer:e.vectorlayer,vectorsource:e.vectorsource,vectortilelayer:e.vectortilelayer,feature:e.feature,location:e.location,style:e.style,styleArray:e.styleArray}}},1443:(e,t,s)=>{s.d(t,{A:()=>r});const r=()=>{}},7240:(e,t,s)=>{s.d(t,{E6:()=>r,Dp:()=>B.Ay,NI:()=>Qe,vk:()=>o,Am:()=>p.A,od:()=>W,y1:()=>D,KL:()=>N,Xy:()=>U,HS:()=>f,QN:()=>M,Ff:()=>T,dx:()=>J,j9:()=>w,Ji:()=>G,Tw:()=>k,Fd:()=>O,f9:()=>h,ej:()=>A,$g:()=>$,Rv:()=>Je,bz:()=>$e,cq:()=>F,Xo:()=>n.Xo});var r={};s.r(r),s.d(r,{ON:()=>se,Es:()=>ae,yO:()=>de,bc:()=>ce,Ip:()=>pe,H4:()=>ee,WP:()=>oe,ni:()=>ne});var o={};s.r(o),s.d(o,{M5:()=>we,Hm:()=>Oe,Nl:()=>ke,dI:()=>Se});var i=s(7248),n=s(2627),l=s(6540),a=s(2961),c=s(3568);class h extends i.o{constructor(e){super(e),this.updateView=e=>{var t;const s=this.ol.getView();"function"==typeof(null===(t=this.props)||void 0===t?void 0:t.view[1])&&this.props.view[1]({center:s.getCenter(),zoom:s.getZoom(),resolution:s.getResolution()})},this.target=l.createRef(),this.ol=new a.A({controls:e.noDefaultControls?[]:void 0,interactions:e.noDefaultInteractions?[]:void 0,view:new c.Ay({projection:e.projection,center:e.initial.center,zoom:void 0===e.initial.resolution?e.initial.zoom:void 0,resolution:e.initial.resolution,extent:e.extent,minResolution:e.minResolution,maxResolution:e.maxResolution,constrainResolution:e.constrainResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,enableRotation:e.enableRotation,constrainRotation:e.constrainRotation})}),this.props.view&&this.ol.on("moveend",this.updateView)}componentDidMount(){super.componentDidMount(),this.ol.setTarget(this.target.current)}refresh(e){super.refresh(e);const t=this.ol.getView();for(const s of["minZoom","maxZoom","constrainResolution"]){const r=s.charAt(0).toUpperCase()+s.substring(1);e&&this.props[s]===e[s]||t["set"+r](this.props[s])}this.props.view&&(t.setCenter(this.props.view[0].center),void 0===this.props.view[0].resolution?t.setZoom(this.props.view[0].zoom):t.setResolution(this.props.view[0].resolution)),this.props.properties&&this.ol.setProperties(this.props.properties),this.props.view?this.ol.on("moveend",this.updateView):this.ol.un("moveend",this.updateView)}render(){return l.createElement("div",{className:this.props.className,style:{width:this.props.width,height:this.props.height},ref:this.target},l.createElement(n.aU.Provider,{value:{map:this.ol,rMap:this}},this.props.children))}}var p=s(5553),u=s(945),d=s(702),v=s(2662);class f extends v.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){this.source=new d.A({url:this.props.url,interpolate:!this.props.noIterpolation,projection:this.props.projection,tileGrid:this.props.tileGrid,crossOrigin:this.props.crossOrigin}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.tileGrid)===this.props.tileGrid&&(null==e?void 0:e.url)===this.props.url||(this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source))}}var m=s(1895),y=s(2757),g=s(731),x=s(1169);class w extends m.A{createSource(e){return this.source=new g.A({features:this.props.features,url:this.props.url,format:this.props.format,loader:this.props.loader,wrapX:this.props.wrapX,strategy:this.props.strategy}),this.ol=new y.A({...e,style:x.Ay.getStyle(this.props.style),source:this.source}),[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.url)!==this.props.url&&(this.source.setUrl(this.props.url),this.source.refresh())}}var P=s(7896);class A extends v.A{constructor(e,t){super(e,t),this.source=new P.A,this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.ol.setProperties({label:"OpenStreetMap"})}}var S=s(2794),b=s(6067),E=s(1443);class O extends v.A{constructor(e,t){super(e,t),this.ol=new u.A({source:this.source}),this.parser=new b.A}createSource(){return(0,E.A)("createSource",this),fetch(this.props.url).then((e=>e.text())).then((e=>{const t=this.parser.read(e);return this.options=(0,S.t)(t,{layer:this.props.layer}),this.props.attributions&&(this.options.attributions=this.props.attributions),this.options.crossOrigin="",this.props.projection&&(this.options.projection=this.props.projection),this.options.wrapX=!1,this.source=new S.A(this.options),this.ol.setSource(this.source),this.eventSources=[this.ol,this.source],this.props.onCapabilities&&this.props.onCapabilities.call(this,this.options),this.source})).catch((e=>(console.error("failed loading WMTS",this.props.url,this.props.layer,e),this.source=void 0,null)))}refresh(e){super.refresh(),(null==e?void 0:e.url)!==this.props.url||(null==e?void 0:e.layer)!==this.props.layer?this.createSource().then((()=>{this.ol.setSource(this.source),this.attachOldEventHandlers(this.source)})):this.props.onCapabilities&&this.props.onCapabilities.call(this,this.options)}}var R=s(8044),L=s(1011);class k extends v.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new R.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){const{params:e,url:t,crossOrigin:s}=this.props,r={params:e,url:t,crossOrigin:s};this.source=new L.A(r),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source)}}var j=s(8270);class U extends p.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new R.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){const e={url:this.props.url,projection:this.props.projection,imageExtent:this.props.extent,imageSize:this.props.size};this.source=new j.A(e),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.props.url&&(null==e?void 0:e.url)!==this.props.url&&(this.createSource(),this.ol.setSource(this.source),this.eventSources=[this.ol,this.source],this.attachOldEventHandlers(this.source))}}var C=s(517),F=s(5111);class D extends p.A{constructor(e,t){super(e,t),this.createSource()}createSource(){var e,t,s,r,o,i;const n=null===(t=null===(e=F.RStyle.getStyleStatic(this.props.strokeStyle))||void 0===e?void 0:e.getStroke)||void 0===t?void 0:t.call(e),l=null===(r=null===(s=F.RStyle.getStyleStatic(this.props.lonLabelStyle))||void 0===s?void 0:s.getText)||void 0===r?void 0:r.call(s),a=null===(i=null===(o=F.RStyle.getStyleStatic(this.props.latLabelStyle))||void 0===o?void 0:o.getText)||void 0===i?void 0:i.call(o);this.ol=new C.A({...this.props,strokeStyle:n,lonLabelStyle:l,latLabelStyle:a}),this.eventSources=[this.ol]}refresh(e){super.refresh(e);const t=this.context.map.removeLayer(this.ol);this.createSource(),this.attachOldEventHandlers(this.ol),t&&this.context.map.addLayer(this.ol)}}var z=s(4218);class M extends v.A{constructor(e,t){super(e,t),this.source=new z.A({url:this.props.url,tileSize:this.props.tileSize}),this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.props.url&&(null==e?void 0:e.url)!==this.props.url&&(this.source.setUrl(this.props.url),this.source.refresh())}}var I=s(2728);class T extends v.A{constructor(e,t){super(e,t),this.createSource(),this.ol=new u.A({source:this.source}),this.eventSources=[this.ol,this.source]}createSource(){const{params:e,url:t,projection:s}=this.props,r={params:e,url:t,projection:s};this.source=new I.A(r),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source)}}var _=s(1905);class N extends m.A{createSource(e){return this.source=new g.A({features:this.props.features,url:this.props.url,format:this.props.format,loader:this.props.loader,wrapX:this.props.wrapX,strategy:this.props.strategy}),this.ol=new _.A({...e,source:this.source}),[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.blur)!==this.props.blur&&this.ol.setBlur(this.props.blur),(null==e?void 0:e.radius)!==this.props.radius&&this.ol.setRadius(this.props.radius)}}var H=s(6203);class W extends m.A{createSource(e){return this.cluster=new g.A({features:this.props.features,url:this.props.url,format:this.props.format,loader:this.props.loader,wrapX:this.props.wrapX,strategy:this.props.strategy}),this.source=new H.A({source:this.cluster,distance:this.props.distance}),this.ol=new y.A({...e,source:this.source,style:x.Ay.getStyle(e.style)}),[this.ol,this.source,this.cluster]}refresh(e){super.refresh(e),(null==e?void 0:e.distance)!==this.props.distance&&this.source.setDistance(this.props.distance),(null==e?void 0:e.url)!==this.props.url&&(this.cluster.setUrl(this.props.url),this.cluster.refresh())}render(){return l.createElement("div",{className:"_rlayers_RLayerCluster"},l.createElement(n.aU.Provider,{value:{...this.context,layer:this.ol,source:this.cluster,vectorlayer:this.ol,vectorsource:this.cluster,rLayer:this,rLayerVector:this}},this.props.children))}}var V=s(8063),X=s(5620),B=s(4114);class G extends p.A{constructor(e,t){super(e,t),this.source=new X.A({url:this.props.url,format:this.props.format,projection:this.props.projection,cacheSize:this.props.cacheSize,extent:this.props.extent,overlaps:this.props.overlaps,state:this.props.state,tileClass:this.props.tileClass,tileSize:this.props.tileSize,tileGrid:this.props.tileGrid,tileLoadFunction:this.props.tileLoadFunction,tileUrlFunction:this.props.tileUrlFunction,transition:this.props.transition,wrapX:this.props.wrapX,zDirection:this.props.zDirection}),this.ol=new V.A({style:x.Ay.getStyle(this.props.style),source:this.source,renderBuffer:this.props.renderBuffer}),this.eventSources=[this.ol,this.source],B.Ay.initEventRelay(this.context.map)}incrementHandlers(e){var t;const s=i.o.getOLObject(m.Y,this.ol);s[e]=(null!==(t=s[e])&&void 0!==t?t:0)+1}decrementHandlers(e){i.o.getOLObject(m.Y,this.ol)[e]--}refresh(e){super.refresh(e);const t=Object.keys(this.props).filter((e=>e.startsWith("on"))).reduce(((e,t)=>({...e,["_"+t.toLowerCase()]:this.props[t]})),{});this.ol.setProperties(t),(null==e?void 0:e.style)!==this.props.style&&this.ol.setStyle(x.Ay.getStyle(this.props.style)),(null==e?void 0:e.url)!==this.props.url&&(this.source.setUrl(this.props.url),this.source.refresh())}render(){return l.createElement("div",{className:"_rlayers_RLayerVectorTile"},l.createElement(n.aU.Provider,{value:{...this.context,layer:this.ol,vectortilelayer:this.ol,rLayer:this,rLayerVectorTile:this}},this.props.children))}}var Z=s(114),Y=s(3080);class q extends v.A{}class J extends q{constructor(e,t){super(e,t),this.createSource(),this.ol=new Z.A({opacity:.9,source:this.source,cacheSize:e.cacheSize}),this.eventSources=[this.ol,this.source]}createSource(){this.source=new Y.A({url:this.props.url,interpolate:!this.props.noIterpolation,projection:this.props.projection,tileGrid:this.props.tileGrid,crossOrigin:"anonymous"}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),(null==e?void 0:e.tileGrid)===this.props.tileGrid&&(null==e?void 0:e.url)===this.props.url||(this.createSource(),this.ol.setSource(this.source),this.attachOldEventHandlers(this.source))}}class $ extends q{constructor(e,t){super(e,t),this.source=new P.A,this.ol=new Z.A({source:this.source,cacheSize:e.cacheSize}),this.eventSources=[this.ol,this.source]}refresh(e){super.refresh(e),this.ol.setProperties({label:"OpenStreetMap"})}}var K=s(3965);class Q extends i.o{constructor(e,t){var s;if(super(e,t),!(null===(s=this.context)||void 0===s?void 0:s.map))throw new Error("A control must be part of a map")}toOLProps(e){var t;return{className:e.className,target:null===(t=e.target)||void 0===t?void 0:t.current}}refresh(e){super.refresh(e),this.ol.setProperties(this.toOLProps(this.props))}componentDidMount(){super.componentDidMount(),this.context.map.addControl(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeControl(this.ol)}}class ee extends Q{constructor(e,t){super(e,t),this.ol=new K.A(this.toOLProps(e))}toOLProps(e){var t;return{...super.toOLProps(e),minWidth:e.minWidth,bar:e.bar,text:e.text,units:null!==(t=e.units)&&void 0!==t?t:"metric"}}}var te=s(7456);class se extends Q{constructor(e,t){super(e,t),this.ol=new te.A(this.toOLProps(e))}refresh(e){super.refresh(e),(null==e?void 0:e.collapsed)!==this.props.collapsed&&this.ol.setCollapsed(this.props.collapsed)}toOLProps(e){var t;return{...super.toOLProps(e),collapsible:null===(t=e.collapsible)||void 0===t||t,collapsed:e.collapsed}}}var re=s(9186);class oe extends Q{constructor(e,t){super(e,t),this.ol=new re.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),duration:e.duration,zoomInLabel:e.zoomInLabel,zoomOutLabel:e.zoomOutLabel,zoomInTipLabel:e.zoomInTipLabel,zoomOutTipLabel:e.zoomOutTipLabel,delta:e.delta}}}var ie=s(9439);class ne extends Q{constructor(e,t){super(e,t),this.ol=new ie.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),duration:e.duration}}}s(2898);var le=s(972);class ae extends Q{constructor(e,t){super(e,t),this.targetRef=l.createRef()}componentDidMount(){this.ol=new le.A(this.toOLProps(this.props)),super.componentDidMount()}toOLProps(e){var t;return{...super.toOLProps(e),element:null===(t=this.targetRef)||void 0===t?void 0:t.current}}render(){return l.createElement("div",{className:["ol-control",this.props.className].join(" "),ref:this.targetRef},this.props.children)}}class ce extends Q{constructor(e,t){super(e,t),this.onchange=()=>this.forceUpdate(),this.clickCollapse=()=>{this.setState({collapsed:!this.state.collapsed})},this.targetRef=l.createRef(),this.state={collapsed:!0,visible:[!0]}}componentDidMount(){this.ol=new le.A(this.toOLProps(this.props)),super.componentDidMount(),this.context.map.on("change",this.onchange),this.forceUpdate()}componentWillUnmount(){super.componentWillUnmount(),this.context.map.un("change",this.onchange)}toOLProps(e){var t;return{...super.toOLProps(e),element:null===(t=this.targetRef)||void 0===t?void 0:t.current}}render(){var e,t;const s=l.Children.map(this.props.children,((e,t)=>{var s;if(l.isValidElement(e))return null!==(s=this.state.visible[t])&&void 0!==s&&s})),r=l.Children.map(this.props.children,(e=>{var t,s;if(l.isValidElement(e))return null!==(s=null===(t=e.props.properties)||void 0===t?void 0:t.label)&&void 0!==s?s:"no label"}));return l.createElement(l.Fragment,null,l.createElement("div",{className:["ol-control",null!==(e=this.props.className)&&void 0!==e?e:"ol-layers-control"].join(" "),ref:this.targetRef},l.createElement("span",{onClick:this.clickCollapse},null!==(t=this.props.element)&&void 0!==t?t:l.createElement("button",null,"=")),this.state.collapsed?null:l.createElement("div",null,r.map(((e,t)=>l.createElement("div",{key:t},l.createElement("input",{type:"radio",id:t.toString(),name:e,value:t.toString(),checked:s[t],onChange:()=>{for(const e in s)s[e]=!1;s[t]=!0,this.setState({visible:[...s],collapsed:!0})}}),l.createElement("label",{htmlFor:t.toString()},e)))))),l.Children.map(this.props.children,((e,t)=>l.isValidElement(e)?l.cloneElement(e,{visible:s[t]}):e)))}}var he=s(6950);class pe extends Q{constructor(e,t){super(e,t),this.ol=new he.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),collapsible:e.collapsible,collapsed:e.collapsed,label:e.label,collapseLabel:e.collapseLabel}}refresh(e){super.refresh(e),(null==e?void 0:e.collapsed)!==this.props.collapsed&&this.ol.setCollapsed(this.props.collapsed)}render(){return l.createElement("div",{className:this.props.className,style:{width:this.props.width,height:this.props.height}},l.createElement(n.aU.Provider,{value:{map:this.ol.getOverviewMap()}},this.props.children))}}var ue=s(7364);class de extends Q{constructor(e,t){super(e,t),this.ol=new ue.A(this.toOLProps(e))}toOLProps(e){return{...super.toOLProps(e),source:e.source,label:e.label,labelActive:e.labelActive,tipLabel:e.tipLabel}}}s(2977),s(1727);class ve extends i.o{constructor(e,t){var s,r;if(super(e,t),!(null===(r=null===(s=this.context)||void 0===s?void 0:s.map)||void 0===r?void 0:r.addInteraction))throw new Error("An interaction must be part of a map");this.ol=this.createOL(e)}createOL(e){throw new Error("RBaseInteraction should not be directly instantiated")}refresh(e){for(const t of this.classProps)if(e&&e[t]!==this.props[t]){(0,E.A)("Replacing interaction",this,e),this.componentWillUnmount(),this.ol=this.createOL(this.props),this.componentDidMount();break}super.refresh(e)}componentDidMount(){super.componentDidMount(),this.context.map.addInteraction(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeInteraction(this.ol)}}ve.classProps=[];const fe=ve;class me extends fe{}me.classProps=["handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent"];const ye=me;var ge=s(422);class xe extends ye{createOL(e){return this.classProps=xe.classProps,new ge.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}xe.classProps=["className","condition","minArea","boxEndCondition"];const we=xe;var Pe=s(4458);class Ae extends ye{createOL(e){return this.classProps=Ae.classProps,new Pe.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ae.classProps=["features","layers","filter","hitTolerance"];const Se=Ae;var be=s(9964);class Ee extends ye{createOL(e){var t;if(!(null===(t=null==this?void 0:this.context)||void 0===t?void 0:t.vectorsource))throw new Error("A Draw interaction must be part of a vector layer");return this.classProps=Ee.classProps,new be.Ay({type:e.type,source:this.context.vectorsource,...Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{})})}}Ee.classProps=["condition","finishCondition","freehandCondition","style","stopClick","maxPoints","minPoints","snapTolerance"];const Oe=Ee;var Re=s(9132);class Le extends ye{createOL(e){var t;if(!(null===(t=null==this?void 0:this.context)||void 0===t?void 0:t.vectorsource))throw new Error("A Modify interaction must be part of a vector layer");return this.classProps=Le.classProps,new Re.A({source:this.context.vectorsource,...Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{})})}}Le.classProps=["condition","deleteCondition","insertVertexCondition","style","pixelTolerance","hitDetection"];const ke=Le;var je=s(6068);class Ue extends fe{createOL(e){return this.classProps=Ue.classProps,new je.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ue.classProps=["duration","delta"];var Ce=s(4473);class Fe extends fe{createOL(e){return this.classProps=Fe.classProps,new Ce.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Fe.classProps=["condition","kinetic"];var De=s(4051);class ze extends fe{createOL(e){return this.classProps=ze.classProps,new De.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}ze.classProps=["condition","duration"];var Me=s(4423);class Ie extends fe{createOL(e){return this.classProps=Ie.classProps,new Me.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ie.classProps=["className","condition","duration","out","minArea"];var Te=s(8751);class _e extends fe{createOL(e){return this.classProps=_e.classProps,new Te.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}_e.classProps=["condition","maxDelta","duration","useAnchor","constrainResolution"];var Ne=s(3711);class He extends fe{createOL(e){return this.classProps=He.classProps,new Ne.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}He.classProps=["threshold","duration"];var We=s(5243);class Ve extends fe{createOL(e){return this.classProps=Ve.classProps,new We.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ve.classProps=["duration"];var Xe=s(9888);class Be extends fe{createOL(e){return this.classProps=Be.classProps,new Xe.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Be.classProps=["condition","duration","pixelDelta"];var Ge=s(6856);class Ze extends fe{createOL(e){return this.classProps=Ze.classProps,new Ge.A(Object.keys(e).filter((e=>this.classProps.includes(e))).reduce(((t,s)=>({...t,[s]:e[s]})),{}))}}Ze.classProps=["condition","duration","delta"];var Ye=s(1795);class qe extends i.o{constructor(e,t){var s;if(super(e,t),!(null===(s=this.context)||void 0===s?void 0:s.location))throw new Error("An overlay must be part of a location provider (ie RFeature)");this.ol=new Ye.A({autoPan:e.autoPan,offset:e.offset,positioning:e.positioning}),this.containerRef=l.createRef()}setPosition(){var e;if(this.ol.setPosition(this.context.location),this.props.autoPosition&&(null===(e=this.containerRef)||void 0===e?void 0:e.current)){this.containerRef.current.style.position="absolute";const e=this.context.map.getPixelFromCoordinate(this.context.location),t=this.context.map.getSize();e[0]>t[0]/2?(this.containerRef.current.style.left=null,this.containerRef.current.style.right="0px"):(this.containerRef.current.style.left="0px",this.containerRef.current.style.right=null),e[1]>t[1]/2?(this.containerRef.current.style.top=null,this.containerRef.current.style.bottom="0px"):(this.containerRef.current.style.top="0px",this.containerRef.current.style.bottom=null)}}refresh(e){super.refresh(e),this.ol.setElement(this.containerRef.current),this.setPosition(),this.props.offset!==(null==e?void 0:e.offset)&&this.ol.setOffset(this.props.offset),this.props.positioning!==(null==e?void 0:e.positioning)&&this.ol.setPositioning(this.props.positioning)}componentDidMount(){super.componentDidMount(),this.context.map.addOverlay(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeOverlay(this.ol)}render(){return this.setPosition(),l.createElement("div",{className:"_rlayers_ROverlay"},l.createElement("div",{ref:this.containerRef,className:this.props.className,onClick:this.props.onClick},this.props.children))}}class Je extends qe{}class $e extends qe{constructor(e,t){super(e,t),this.toggle=()=>{this.visible=!this.visible,this.setPosition()},this.show=()=>{var e,t;this.showing||(this.hiding&&window.clearTimeout(this.hiding),this.showing=window.setTimeout((()=>{this.visible=!0,this.setPosition(),this.hiding=this.showing=void 0}),null!==(t=null===(e=this.props.delay)||void 0===e?void 0:e.show)&&void 0!==t?t:250))},this.hide=()=>{var e,t;this.hiding||(this.showing&&window.clearTimeout(this.showing),this.hiding=window.setTimeout((()=>{this.visible=!1,this.setPosition(),this.hiding=this.showing=void 0}),null!==(t=null===(e=this.props.delay)||void 0===e?void 0:e.hide)&&void 0!==t?t:50))},this.visible=!1}componentWillUnmount(){super.componentWillUnmount(),this.unregister()}setPosition(){this.ol.setPosition(this.visible?this.context.location:void 0)}unregister(e){if(e)switch(e.trigger){default:case"click":this.context.rFeature.un("click",this.toggle);break;case"hover":this.context.rFeature.un("pointerenter",this.show),this.context.rFeature.un("pointerhide",this.hide)}}refresh(e){if(this.ol.setElement(this.containerRef.current),(null==e?void 0:e.trigger)!==this.props.trigger)switch(this.unregister(e),this.props.trigger){default:case"click":"hover"===(null==e?void 0:e.trigger)&&(this.context.rFeature.un("pointerenter",this.show),this.context.rFeature.un("pointerhide",this.hide)),this.context.rFeature.on("click",this.toggle);break;case"hover":"click"===(null==e?void 0:e.trigger)&&this.context.rFeature.un("click",this.toggle),this.context.rFeature.on("pointerenter",this.show),this.context.rFeature.on("pointerleave",this.hide)}this.setPosition()}}var Ke=s(5213);class Qe extends i.o{constructor(e,t){var s,r;if(super(e,t),!(null===(s=null==this?void 0:this.context)||void 0===s?void 0:s.map))throw new Error("A Geolocation must be part of a map");const o=null!==(r=e.projection)&&void 0!==r?r:this.context.map.getView().getProjection();this.ol=new Ke.A({...e,projection:o})}}},5553:(e,t,s)=>{s.d(t,{A:()=>n});var r=s(6540),o=s(2627),i=s(7248);class n extends i.o{constructor(e,t){var s,r;if(super(e,t),!(null===(r=null===(s=this.context)||void 0===s?void 0:s.map)||void 0===r?void 0:r.addLayer))throw new Error("A layer must be part of a map")}refresh(e){super.refresh(e);for(const t of["visible","opacity","zIndex","minResolution","maxResolution","minZoom","maxZoom"]){const s=t.charAt(0).toUpperCase()+t.substring(1);this.props[t]!==(e&&e[t])&&this.ol["set"+s](this.props[t])}this.source&&this.props.attributions&&this.source.setAttributions(this.props.attributions),this.props.properties&&this.ol.setProperties(this.props.properties)}componentDidMount(){super.componentDidMount(),this.context.map.addLayer(this.ol)}componentWillUnmount(){super.componentWillUnmount(),this.context.map.removeLayer(this.ol)}render(){return r.createElement("div",{className:"_rlayers_RLayer"},r.createElement(o.aU.Provider,{value:{...this.context,layer:this.ol,source:this.source,rLayer:this}},this.props.children))}}},1895:(e,t,s)=>{s.d(t,{A:()=>h,Y:()=>c});var r=s(6540),o=s(2627),i=s(5553),n=s(4114),l=s(1169),a=s(7248);const c="_rlayers_feature_handlers";class h extends i.A{constructor(e,t){super(e,t),n.Ay.initEventRelay(this.context.map),this.eventSources=this.createSource(e),super.refresh()}createSource(e){throw new Error("RLayerBaseVector is an abstract class")}refresh(e){super.refresh(e),(null==e?void 0:e.style)!==this.props.style&&this.ol.setStyle(l.Ay.getStyle(this.props.style))}incrementHandlers(e){var t;const s=a.o.getOLObject(c,this.ol);s[e]=(null!==(t=s[e])&&void 0!==t?t:0)+1}decrementHandlers(e){a.o.getOLObject(c,this.ol)[e]--}render(){return r.createElement("div",{className:"_rlayers_RLayerVector"},r.createElement(o.aU.Provider,{value:{...this.context,layer:this.ol,source:this.source,vectorlayer:this.ol,vectorsource:this.source,rLayer:this,rLayerVector:this}},this.props.children))}}},2662:(e,t,s)=>{s.d(t,{A:()=>o});var r=s(5553);class o extends r.A{}},1169:(e,t,s)=>{s.d(t,{Ay:()=>d,M2:()=>p,VX:()=>h});var r=s(6540),o=s(5338),i=s(9303),n=s(9276),l=s(2627),a=s(1443),c=s(961);const h=()=>r.useRef(),p=()=>r.createRef();class u extends r.PureComponent{constructor(e,t){super(e,t),this.style=(e,t)=>{if(this.ol!==this.style)return this.ol;let s;if(this.cache){s=this.props.cacheId(e,t);const r=this.cache.get(s);if(r)return r}const i=new n.Ay({zIndex:this.props.zIndex}),a=r.createElement(l.aU.Provider,{value:{...this.context,style:i}},this.props.render(e,t)),h=(0,o.createRoot)(document.createElement("div"));return(0,c.flushSync)((()=>{h.render(a)})),this.cache&&this.cache.set(s,i),i},e.render?this.ol=this.style:this.ol=new n.Ay({zIndex:e.zIndex}),e.render&&e.cacheSize&&e.cacheId&&(this.cache=new i.q({max:e.cacheSize}))}componentDidMount(){this.refresh()}componentDidUpdate(e,t,s){this.props!==e&&((0,a.A)("willRefresh",this,e,this.props),this.refresh(e))}refresh(e){var t,s,r,o,i,l,a;if(!e||(null==e?void 0:e.render)!==this.props.render){if(null===(t=this.context)||void 0===t?void 0:t.styleArray){if(this.ol===this.style)throw new Error("An RStyleArray must contain only static RStyles");this.context.styleArray.includes(this.ol)||this.context.styleArray.push(this.ol)}else(null===(r=null===(s=this.context)||void 0===s?void 0:s.feature)||void 0===r?void 0:r.setStyle)?this.context.feature.setStyle(this.ol):(null===(i=null===(o=this.context)||void 0===o?void 0:o.vectorlayer)||void 0===i?void 0:i.setStyle)?this.context.vectorlayer.setStyle(this.ol):(null===(a=null===(l=this.context)||void 0===l?void 0:l.vectortilelayer)||void 0===a?void 0:a.setStyle)&&this.context.vectortilelayer.setStyle(this.ol);this.cache&&this.cache.clear()}this.ol instanceof n.Ay&&(!e||e.zIndex!==this.props.zIndex)&&this.ol.setZIndex(this.props.zIndex)}render(){return this.props.render?null:r.createElement("div",{className:"_rlayers_RStyle"},r.createElement(l.aU.Provider,{value:{...this.context,style:this.ol}},this.props.children))}static getStyle(e){return null==e?e:"function"==typeof e.style?(t,s)=>e.style(t,s):Object.keys(e).includes("current")?(t,s)=>e.current.style(t,s):e}static getStyleStatic(e){if(null==e)return e;let t;if("function"==typeof e.style&&(t=e),!Object.keys(e).includes("current")||(t=e.current,null!=t)){if(t){if(void 0!==t.ol&&"function"!=typeof t.ol)return t.ol;throw new TypeError("RStyle is dynamic and cannot be converted to Style")}if("function"==typeof e)throw new TypeError("StyleLike is dynamic and cannot be converted to Style");return e}}}u.contextType=l.aU;const d=u},5111:(e,t,s)=>{s.r(t),s.d(t,{RBackground:()=>C,RBaseStyle:()=>a,RBaseStyleProps:()=>r.RBaseStyleProps,RCircle:()=>b,RFill:()=>y,RIcon:()=>z,RRegularShape:()=>R,RStroke:()=>v,RStyle:()=>c.Ay,RStyleArray:()=>p,RStyleLike:()=>c.RStyleLike,RStyleRef:()=>c.RStyleRef,RText:()=>j,createRStyle:()=>c.M2,useRStyle:()=>c.VX});var r={};s.r(r),s.d(r,{A:()=>a});var o=s(6540),i=s(2627),n=s(1443);class l extends o.PureComponent{constructor(e,t){if(super(e,t),!this.context)throw new Error("A style property must be part of a style");this.ol=this.create(e)}create(e){throw new Error("RBaseStyle is an abstract class")}refresh(e){if((0,n.A)("refreshStyle",this),e)for(const t of this.classProps){const s=t.charAt(0).toUpperCase()+t.substring(1);(e&&e[t])!==this.props[t]&&(this.ol["set"+s]?this.ol["set"+s](this.props[t]):console.error(`Underlying OpenLayers object does not support updating of ${t} after object creation. If you are using an anonymous constant array or object, consider assigning its value to a constant and then passing the constant or use React.useMemo() to avoid this warning and improve performance.`))}}set(e){}componentDidMount(){this.set(this.ol)}componentDidUpdate(e,t,s){e!==this.props&&this.refresh(e)}componentWillUnmount(){this.set(null)}render(){return null}}l.contextType=i.aU,l.classProps=[];const a=l;var c=s(1169),h=s(5338);class p extends c.Ay{constructor(e,t){super(e,t),this.style=(e,t)=>{if(this.props.render){const s=this.props.render(e,t);o.Children.map(s.props.children,(e=>{if(o.isValidElement(e)&&e.type!==c.Ay)throw new TypeError("An RStyleArray should contain only RStyle elements")}));const r=[],n=o.createElement(i.aU.Provider,{value:{...this.context,styleArray:r}},s.props.children);return(0,h.createRoot)(document.createElement("div")).render(n),r}return this.ol},this.childRefs=[],e.render?this.ol=this.style:this.ol=[]}refresh(e){super.refresh(e)}render(){return o.Children.map(this.props.children,(e=>{if(o.isValidElement(e)&&e.type!==c.Ay)throw new TypeError("An RStyleArray should contain only RStyle elements")})),this.props.render?o.createElement(o.Fragment,null):o.createElement("div",{className:"_rlayers_RStyleArray"},o.createElement(i.aU.Provider,{value:{...this.context,styleArray:this.ol}},this.props.children))}}var u=s(953);class d extends a{create(e){return this.classProps=d.classProps,new u.A(e)}set(e){if(this.context.style.setStroke)return this.context.style.setStroke(e);throw new Error("Parent element does not support a stroke")}}d.classProps=["color","width","lineCap","lineJoin","lineDash"];const v=d;var f=s(3628);class m extends a{create(e){return this.classProps=m.classProps,new f.A(e)}set(e){if(this.context.style.setFill)return this.context.style.setFill(e);throw new Error("Parent element does not support a fill")}}m.classProps=["color"];const y=m;var g=s(7733);class x extends a{create(e){throw new Error("RImage is an abstract class")}set(e){if(!this.context.style.setImage)throw new Error("Parent element does not support an image");this.context.style.setImage(e)}}x.classProps=["opacity","rotateWithView","rotation","scale","displacement"];const w=x;class P extends w{create(e){throw new Error("RImage is an abstract class")}setStroke(e){this.stroke=e,this.ol=this.create(this.props),super.set(this.ol)}setFill(e){this.fill=e,this.ol=this.create(this.props),super.set(this.ol)}render(){return o.createElement("div",{className:"_rlayers_RStyle"},o.createElement(i.aU.Provider,{value:{...this.context,style:this}},this.props.children))}}P.classProps=w.classProps.concat(["radius"]);const A=P;class S extends A{create(e){return this.classProps=S.classProps,new g.A({...e,stroke:this.stroke,fill:this.fill})}}S.classProps=A.classProps.concat(["radius"]);const b=S;var E=s(6936);class O extends A{create(e){return this.classProps=O.classProps,new E.A({...e,stroke:this.stroke,fill:this.fill})}}O.classProps=A.classProps.concat(["radius1","radius2","points","angle"]);const R=O;var L=s(1426);class k extends a{create(e){return this.classProps=k.classProps,new L.A(e)}set(e){if(!this.context.style.setText)throw new Error("Parent element does not support a text");this.context.style.setText(e)}render(){return o.createElement("div",{className:"_rlayers_RStyle_RText"},o.createElement(i.aU.Provider,{value:{...this.context,style:this.ol}},this.props.children))}}k.classProps=["text","font","offsetY","offsetX","overflow","scale","rotation","textAlign","padding","placement","textBaseline"];const j=k;class U extends a{create(e){this.classProps=U.classProps;const t=this.context.style;if(!t.setBackgroundFill||!t.setBackgroundStroke)throw new Error("Parent element does not support a background");return{setFill:t.setBackgroundFill.bind(t),setStroke:t.setBackgroundStroke.bind(t)}}render(){return o.createElement("div",{className:"_rlayers_RStyle_RBackground"},o.createElement(i.aU.Provider,{value:{...this.context,style:this.ol}},this.props.children))}}U.classProps=[];const C=U;var F=s(9700);class D extends w{create(e){return this.classProps=D.classProps,new F.A(e)}}D.classProps=w.classProps.concat(["anchor","anchorXUnits","anchorYUnits","color","crossOrigin","img","offset","offsetOrigin","size","imgSize","src"]);const z=D}}]); \ No newline at end of file diff --git a/7379.bundle.js b/7379.bundle.js index b4190052..dec1d27f 100644 --- a/7379.bundle.js +++ b/7379.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7379],{4096:(n,o,e)=>{e.d(o,{A:()=>a});var t=e(1601),r=e.n(t),l=e(6314),i=e.n(l)()(r());i.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const a=i},5045:(n,o,e)=>{var t=e(5072),r=e.n(t),l=e(7825),i=e.n(l),a=e(7659),s=e.n(a),c=e(5056),u=e.n(c),d=e(540),p=e.n(d),b=e(1113),h=e.n(b),g=e(4096),m={};m.styleTagTransform=h(),m.setAttributes=u(),m.insert=s().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=p(),r()(g.A,m),g.A&&g.A.locals&&g.A.locals},9760:(n,o,e)=>{e.r(o),e.d(o,{default:()=>B});var t=e(6540),r=e(3407),l=(e(5045),e(7240)),i=e(8063),a=e(2627),s=e(2662),c=e(4114),u=e(1169),d=e(1443);class p extends s.A{constructor(n,o){super(n,o),this.addon=Promise.all([e.e(3075),e.e(5451),e.e(1060)]).then(e.bind(e,1060)),this.ol=new i.A({style:u.Ay.getStyle(this.props.style),renderBuffer:this.props.renderBuffer}),this.eventSources=[this.ol],c.Ay.initEventRelay(this.context.map)}createSource(){(0,d.A)("createSource start",this),this.metadata=this.addon.then((n=>{var o,e,t,r;return n.importMBTiles({url:this.props.url,sqlWorkers:null!==(o=this.props.workers)&&void 0!==o?o:4,sqlCacheSize:null!==(e=this.props.sqlCacheSize)&&void 0!==e?e:4096,maxSqlPageSize:null!==(t=this.props.maxSqlPageSize)&&void 0!==t?t:4096,backendType:null!==(r=this.props.backend)&&void 0!==r?r:"sync"})}));const n=new AbortController;this.abort=n,Promise.all([this.addon,this.metadata]).then((([o,e])=>n.signal.aborted?((0,d.A)("createSource aborted",this),void e.pool.then((n=>n.close()))):(this.source=new o.MBTilesVectorSource(e),this.eventSources=[this.ol,this.source],this.ol.setSource(this.source),this.attachOldEventHandlers(this.source),this.props.onMetadataReady&&this.props.onMetadataReady.call(this,e),this.source)))}destroySource(){(0,d.A)("destroySource",this,this.abort),this.source&&(this.source.dispose(),this.source=null,this.ol&&this.ol.setSource(null)),this.abort&&(this.abort.abort(),this.abort=null)}componentWillUnmount(){super.componentWillUnmount(),this.destroySource()}refresh(n){super.refresh(n);const o=Object.keys(this.props).filter((n=>n.startsWith("on"))).reduce(((n,o)=>({...n,["_"+o.toLowerCase()]:this.props[o]})),{});this.ol.setProperties(o),(null==n?void 0:n.style)!==this.props.style&&this.ol.setStyle(u.Ay.getStyle(this.props.style)),(null==n?void 0:n.url)!==this.props.url&&(this.destroySource(),this.createSource())}render(){return t.createElement("div",{className:"_rlayers_RLayerVectorMBTiles"},t.createElement(a.aU.Provider,{value:{...this.context,layer:this.ol,vectortilelayer:this.ol,rLayer:this}},this.props.children))}}var b=e(9276),h=e(953),g=e(3628),m=e(7733),v=e(1426);new b.Ay({stroke:new h.A({color:"blue",width:2})});const x={},w={motorway:"#776",trunk:"#ccb",highway:"#f39"},f=new b.Ay({fill:new g.A({color:"#666"}),stroke:new h.A({color:"#444",width:1})}),y=new b.Ay({fill:new g.A({color:"#9db9e8"})}),k=new b.Ay({stroke:new h.A({color:"#8B008B",width:2})}),A=function(n){const o=n.get("class"),e=n.get("railway"),t=n.get("sort_key"),r=o+"/"+e+"/"+t;let l=x[r];if(!l){let n,i;e?(n="#7de",i=1):(n=w[o],i="highway"==o?1.5:1),l=new b.Ay({stroke:new h.A({color:n,width:i}),zIndex:t}),x[r]=l}return l},z=new b.Ay({image:new m.A({radius:5,fill:new g.A({color:"#000080"})})}),S=new h.A({color:"white",width:2}),E=function(n){if("country"==n.get("class"))return null;if(n.get("name")){const o=z.clone();return o.setText(new v.A({text:n.get("name"),offsetY:-5,font:"bold 16px sans-serif",stroke:S})),o}return null};function B(){return t.createElement("div",null,t.createElement(l.f9,{width:"100%",height:"60vh",initial:{center:(0,r.Rb)([2.364,48.82]),zoom:9}},t.createElement(p,{url:"https://velivole.b-cdn.net/maptiler-osm-2017-07-03-v3.6.1-europe.mbtiles",layers:["transportation","water","waterway","landuse","place","boundary"],style:function(n){switch(n.get("layer")){case"water":case"waterway":return y;case"transportation":return A(n);case"landuse":return f;case"boundary":return k;case"place":return E(n);default:return null}}})),t.createElement("p",null,"The data comes from a huge 30GB ",t.createElement("code",null,".mbtiles")," file and initial loading times may be slow due to the CDN provider not keeping it in its cache"))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7379],{4096:(n,o,e)=>{e.d(o,{A:()=>a});var t=e(1601),r=e.n(t),l=e(6314),i=e.n(l)()(r());i.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const a=i},5045:(n,o,e)=>{var t=e(5072),r=e.n(t),l=e(7825),i=e.n(l),a=e(7659),s=e.n(a),c=e(5056),u=e.n(c),d=e(540),p=e.n(d),b=e(1113),h=e.n(b),m=e(4096),g={};g.styleTagTransform=h(),g.setAttributes=u(),g.insert=s().bind(null,"head"),g.domAPI=i(),g.insertStyleElement=p(),r()(m.A,g),m.A&&m.A.locals&&m.A.locals},9760:(n,o,e)=>{e.r(o),e.d(o,{default:()=>B});var t=e(6540),r=e(3407),l=(e(5045),e(7240)),i=e(8063),a=e(2627),s=e(2662),c=e(4114),u=e(1169),d=e(1443);class p extends s.A{constructor(n,o){super(n,o),this.addon=Promise.all([e.e(3075),e.e(1060)]).then(e.bind(e,1060)),this.ol=new i.A({style:u.Ay.getStyle(this.props.style),renderBuffer:this.props.renderBuffer}),this.eventSources=[this.ol],c.Ay.initEventRelay(this.context.map)}createSource(){(0,d.A)("createSource start",this),this.metadata=this.addon.then((n=>{var o,e,t,r;return n.importMBTiles({url:this.props.url,sqlWorkers:null!==(o=this.props.workers)&&void 0!==o?o:4,sqlCacheSize:null!==(e=this.props.sqlCacheSize)&&void 0!==e?e:4096,maxSqlPageSize:null!==(t=this.props.maxSqlPageSize)&&void 0!==t?t:4096,backendType:null!==(r=this.props.backend)&&void 0!==r?r:"sync"})}));const n=new AbortController;this.abort=n,Promise.all([this.addon,this.metadata]).then((([o,e])=>n.signal.aborted?((0,d.A)("createSource aborted",this),void e.pool.then((n=>n.close()))):(this.source=new o.MBTilesVectorSource(e),this.eventSources=[this.ol,this.source],this.ol.setSource(this.source),this.attachOldEventHandlers(this.source),this.props.onMetadataReady&&this.props.onMetadataReady.call(this,e),this.source)))}destroySource(){(0,d.A)("destroySource",this,this.abort),this.source&&(this.source.dispose(),this.source=null,this.ol&&this.ol.setSource(null)),this.abort&&(this.abort.abort(),this.abort=null)}componentWillUnmount(){super.componentWillUnmount(),this.destroySource()}refresh(n){super.refresh(n);const o=Object.keys(this.props).filter((n=>n.startsWith("on"))).reduce(((n,o)=>({...n,["_"+o.toLowerCase()]:this.props[o]})),{});this.ol.setProperties(o),(null==n?void 0:n.style)!==this.props.style&&this.ol.setStyle(u.Ay.getStyle(this.props.style)),(null==n?void 0:n.url)!==this.props.url&&(this.destroySource(),this.createSource())}render(){return t.createElement("div",{className:"_rlayers_RLayerVectorMBTiles"},t.createElement(a.aU.Provider,{value:{...this.context,layer:this.ol,vectortilelayer:this.ol,rLayer:this}},this.props.children))}}var b=e(9276),h=e(953),m=e(3628),g=e(7733),v=e(1426);new b.Ay({stroke:new h.A({color:"blue",width:2})});const x={},w={motorway:"#776",trunk:"#ccb",highway:"#f39"},f=new b.Ay({fill:new m.A({color:"#666"}),stroke:new h.A({color:"#444",width:1})}),y=new b.Ay({fill:new m.A({color:"#9db9e8"})}),k=new b.Ay({stroke:new h.A({color:"#8B008B",width:2})}),A=function(n){const o=n.get("class"),e=n.get("railway"),t=n.get("sort_key"),r=o+"/"+e+"/"+t;let l=x[r];if(!l){let n,i;e?(n="#7de",i=1):(n=w[o],i="highway"==o?1.5:1),l=new b.Ay({stroke:new h.A({color:n,width:i}),zIndex:t}),x[r]=l}return l},z=new b.Ay({image:new g.A({radius:5,fill:new m.A({color:"#000080"})})}),S=new h.A({color:"white",width:2}),E=function(n){if("country"==n.get("class"))return null;if(n.get("name")){const o=z.clone();return o.setText(new v.A({text:n.get("name"),offsetY:-5,font:"bold 16px sans-serif",stroke:S})),o}return null};function B(){return t.createElement("div",null,t.createElement(l.f9,{width:"100%",height:"60vh",initial:{center:(0,r.Rb)([2.364,48.82]),zoom:9}},t.createElement(p,{url:"https://velivole.b-cdn.net/maptiler-osm-2017-07-03-v3.6.1-europe.mbtiles",layers:["transportation","water","waterway","landuse","place","boundary"],style:function(n){switch(n.get("layer")){case"water":case"waterway":return y;case"transportation":return A(n);case"landuse":return f;case"boundary":return k;case"place":return E(n);default:return null}}})),t.createElement("p",null,"The data comes from a huge 30GB ",t.createElement("code",null,".mbtiles")," file and initial loading times may be slow due to the CDN provider not keeping it in its cache"))}}}]); \ No newline at end of file diff --git a/8224.bundle.js b/8224.bundle.js index eec34fdf..da6a6503 100644 --- a/8224.bundle.js +++ b/8224.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8224],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var t=e(1601),l=e.n(t),r=e(6314),a=e.n(r)()(l());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var t=e(5072),l=e.n(t),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),p=e.n(u),b=e(1113),g=e.n(b),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=d(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),l()(m.A,x),m.A&&m.A.locals&&m.A.locals},4337:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' version='1.1' x='0px' y='0px' viewBox='0 0 100 125' style='enable-background:new 0 0 100 100;' xml:space='preserve'%3e %3cg%3e %3crect x='41.1' y='36.5' width='3.8' height='16.7'/%3e %3cpolygon points='48.1,53.2 50,53.2 51.9,53.2 51.9,36.5 48.1,36.5 '/%3e %3cpolygon points='50.1,22.9 37.7,33.2 62.5,33.2 '/%3e %3crect x='55.2' y='36.5' width='3.8' height='16.7'/%3e %3cpath d='M50,5.2c-21.2,0-38.3,17.2-38.3,38.3c0,16.9,10.9,31.2,26.1,36.3l12.2,15l12.2-14.9c15.2-5.1,26.1-19.4,26.1-36.3 C88.3,22.4,71.2,5.2,50,5.2z M61.9,62.8H38.4c-0.9,0-1.7-0.7-1.7-1.7s0.7-1.7,1.7-1.7h23.5c0.9,0,1.7,0.7,1.7,1.7 S62.8,62.8,61.9,62.8z M71.5,62.6c-0.3,0.2-0.6,0.2-0.8,0.2c-0.6,0-1.1-0.3-1.4-0.8L66,56.6H50H34L30.8,62 c-0.3,0.5-0.9,0.8-1.4,0.8c-0.3,0-0.6-0.1-0.8-0.2c-0.8-0.5-1-1.5-0.6-2.3l3.7-6.3c0.3-0.5,0.8-0.8,1.4-0.8h4.7V36.5h-4.7 c-0.7,0-1.3-0.4-1.6-1.1c-0.2-0.7,0-1.4,0.5-1.8l16.9-14c0.4-0.3,0.8-0.4,1.2-0.4c0.4,0,0.7,0.1,1,0.4l16.9,14c0,0,0,0,0.1,0.1 c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.2 c0,0,0,0.1,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0,0,0.1c0,0,0,0,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0.1,0,0.1c0,0.1,0,0.1-0.1,0.2 c0,0,0,0.1-0.1,0.1c0,0,0,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0,0,0.1c0,0,0,0,0,0c0,0.1-0.1,0.1-0.2,0.1c0,0-0.1,0.1-0.1,0.1 c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0.1c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3,0c0,0,0,0-0.1,0c0,0,0,0,0,0 h-4.8v16.7h4.7c0.6,0,1.1,0.3,1.4,0.8l3.7,6.3C72.5,61.1,72.3,62.1,71.5,62.6z'/%3e %3c/g%3e %3c!-- Created by Anton Gajdosik from the Noun Project --%3e %3c/svg%3e"},8224:(n,o,e)=>{"use strict";e.r(o),e.d(o,{coords:()=>p,default:()=>g});var t=e(6540),l=e(3407),r=e(915),a=e(4294),i=e(6717),c=e(8704),s=(e(5045),e(4337)),d=e.n(s),u=e(7240);const p={"Arc de Triomphe":[2.295,48.8737],"Place d'Italie":[2.355,48.831],Bastille:[2.369,48.853],"Tour Eiffel":[2.294,48.858],Montmartre:[2.342,48.887]},b=n=>`${n[1].toFixed(3)}:${n[0].toFixed(3)}`;function g(){const[n,o]=t.useState(void 0),[e,s]=t.useState(void 0),[g,m]=t.useState("

Hold shift to select an area or drag and drop the monuments

"),[x]=t.useState((()=>Object.keys(p).map((n=>new i.A({geometry:new a.A((0,l.Rb)(p[n])),name:n}))))),v=t.useRef();return t.createElement(t.Fragment,null,t.createElement(u.f9,{className:"example-map",initial:{center:(0,l.Rb)([2.364,48.82]),zoom:11}},t.createElement(u.ej,null),t.createElement(u.j9,{ref:v},t.createElement(u.cq.RStyle,null,t.createElement(u.cq.RIcon,{src:d()})),x.map(((n,o)=>t.createElement(u.Dp,{key:o,feature:n})))),t.createElement(u.vk.M5,{condition:c.Kg,onBoxStart:t.useCallback((n=>{o(n.coordinate),s(void 0)}),[]),onBoxEnd:t.useCallback((o=>{s(o.coordinate);const e=[];v.current&&n&&v.current.source.forEachFeatureInExtent((0,r.Tr)([n,o.coordinate]),(n=>e.push(n.get("name"))&&!1)),m(`You selected ${e.join(", ")||"no monuments"}`)}),[n,v])}),t.createElement(u.vk.dI,{onTranslateEnd:t.useCallback((n=>{const o=n.features.item(0),e=(0,l.WP)(o.getGeometry().getFirstCoordinate());m(`You placed ${o.get("name")} at ${b(e)}`)}),[])})),t.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow",dangerouslySetInnerHTML:{__html:g}}))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8224],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var t=e(1601),r=e.n(t),l=e(6314),a=e.n(l)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var t=e(5072),r=e.n(t),l=e(7825),a=e.n(l),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),p=e.n(u),b=e(1113),g=e.n(b),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=d(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=p(),r()(m.A,x),m.A&&m.A.locals&&m.A.locals},4337:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' version='1.1' x='0px' y='0px' viewBox='0 0 100 125' style='enable-background:new 0 0 100 100;' xml:space='preserve'%3e %3cg%3e %3crect x='41.1' y='36.5' width='3.8' height='16.7'/%3e %3cpolygon points='48.1,53.2 50,53.2 51.9,53.2 51.9,36.5 48.1,36.5 '/%3e %3cpolygon points='50.1,22.9 37.7,33.2 62.5,33.2 '/%3e %3crect x='55.2' y='36.5' width='3.8' height='16.7'/%3e %3cpath d='M50,5.2c-21.2,0-38.3,17.2-38.3,38.3c0,16.9,10.9,31.2,26.1,36.3l12.2,15l12.2-14.9c15.2-5.1,26.1-19.4,26.1-36.3 C88.3,22.4,71.2,5.2,50,5.2z M61.9,62.8H38.4c-0.9,0-1.7-0.7-1.7-1.7s0.7-1.7,1.7-1.7h23.5c0.9,0,1.7,0.7,1.7,1.7 S62.8,62.8,61.9,62.8z M71.5,62.6c-0.3,0.2-0.6,0.2-0.8,0.2c-0.6,0-1.1-0.3-1.4-0.8L66,56.6H50H34L30.8,62 c-0.3,0.5-0.9,0.8-1.4,0.8c-0.3,0-0.6-0.1-0.8-0.2c-0.8-0.5-1-1.5-0.6-2.3l3.7-6.3c0.3-0.5,0.8-0.8,1.4-0.8h4.7V36.5h-4.7 c-0.7,0-1.3-0.4-1.6-1.1c-0.2-0.7,0-1.4,0.5-1.8l16.9-14c0.4-0.3,0.8-0.4,1.2-0.4c0.4,0,0.7,0.1,1,0.4l16.9,14c0,0,0,0,0.1,0.1 c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.2 c0,0,0,0.1,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0,0,0.1c0,0,0,0,0,0.1c0,0.1,0,0.1,0,0.2c0,0,0,0.1,0,0.1c0,0.1,0,0.1-0.1,0.2 c0,0,0,0.1-0.1,0.1c0,0,0,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1c0,0,0,0,0,0.1c0,0,0,0,0,0c0,0.1-0.1,0.1-0.2,0.1c0,0-0.1,0.1-0.1,0.1 c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0.1c-0.1,0-0.1,0.1-0.2,0.1c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3,0c0,0,0,0-0.1,0c0,0,0,0,0,0 h-4.8v16.7h4.7c0.6,0,1.1,0.3,1.4,0.8l3.7,6.3C72.5,61.1,72.3,62.1,71.5,62.6z'/%3e %3c/g%3e %3c!-- Created by Anton Gajdosik from the Noun Project --%3e %3c/svg%3e"},8224:(n,o,e)=>{"use strict";e.r(o),e.d(o,{coords:()=>p,default:()=>g});var t=e(6540),r=e(3407),l=e(915),a=e(4294),i=e(6717),c=e(8704),s=(e(5045),e(4337)),d=e.n(s),u=e(7240);const p={"Arc de Triomphe":[2.295,48.8737],"Place d'Italie":[2.355,48.831],Bastille:[2.369,48.853],"Tour Eiffel":[2.294,48.858],Montmartre:[2.342,48.887]},b=n=>`${n[1].toFixed(3)}:${n[0].toFixed(3)}`;function g(){const[n,o]=t.useState(void 0),[e,s]=t.useState(void 0),[g,m]=t.useState("

Hold shift to select an area or drag and drop the monuments

"),[x]=t.useState((()=>Object.keys(p).map((n=>new i.A({geometry:new a.A((0,r.Rb)(p[n])),name:n}))))),v=t.useRef();return t.createElement(t.Fragment,null,t.createElement(u.f9,{className:"example-map",initial:{center:(0,r.Rb)([2.364,48.82]),zoom:11}},t.createElement(u.ej,null),t.createElement(u.j9,{ref:v},t.createElement(u.cq.RStyle,null,t.createElement(u.cq.RIcon,{src:d()})),x.map(((n,o)=>t.createElement(u.Dp,{key:o,feature:n})))),t.createElement(u.vk.M5,{condition:c.Kg,onBoxStart:t.useCallback((n=>{o(n.coordinate),s(void 0)}),[]),onBoxEnd:t.useCallback((o=>{s(o.coordinate);const e=[];v.current&&n&&v.current.source.forEachFeatureInExtent((0,l.Tr)([n,o.coordinate]),(n=>e.push(n.get("name"))&&!1)),m(`You selected ${e.join(", ")||"no monuments"}`)}),[n,v])}),t.createElement(u.vk.dI,{onTranslateEnd:t.useCallback((n=>{const o=n.features.item(0),e=(0,r.WP)(o.getGeometry().getFirstCoordinate());m(`You placed ${o.get("name")} at ${b(e)}`)}),[])})),t.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow shadow",dangerouslySetInnerHTML:{__html:g}}))}}}]); \ No newline at end of file diff --git a/8296.bundle.js b/8296.bundle.js index 31c7457c..f9d36aa3 100644 --- a/8296.bundle.js +++ b/8296.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8296],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),d=e(540),u=e.n(d),b=e(1113),g=e.n(b),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),r()(m.A,x),m.A&&m.A.locals&&m.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},8296:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var l=e(6540),r=e(3407),t=e(4294),a=(e(5045),e(7240)),i=e(4995),c=e.n(i);const s={origin:[2.364,48.82],ArcDeTriomphe:[2.295,48.8737]};function p(){return l.createElement(a.f9,{className:"example-map",initial:{center:(0,r.Rb)(s.origin),zoom:11}},l.createElement(a.ej,null),l.createElement(a.j9,{zIndex:10},l.createElement(a.cq.RStyle,null,l.createElement(a.cq.RIcon,{src:c(),anchor:[.5,.8]})),l.createElement(a.Dp,{geometry:new t.A((0,r.Rb)(s.ArcDeTriomphe)),onClick:n=>n.map.getView().fit(n.target.getGeometry().getExtent(),{duration:250,maxZoom:15})},l.createElement(a.Rv,{className:"example-overlay"},"Arc de Triomphe",l.createElement("br",null),l.createElement("em",null,"⬉ click to zoom")))))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8296],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var r=e(1601),l=e.n(r),t=e(6314),a=e.n(t)()(l());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var r=e(5072),l=e.n(r),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),d=e(540),u=e.n(d),b=e(1113),g=e.n(b),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=u(),l()(m.A,x),m.A&&m.A.locals&&m.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},8296:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var r=e(6540),l=e(3407),t=e(4294),a=(e(5045),e(7240)),i=e(4995),c=e.n(i);const s={origin:[2.364,48.82],ArcDeTriomphe:[2.295,48.8737]};function p(){return r.createElement(a.f9,{className:"example-map",initial:{center:(0,l.Rb)(s.origin),zoom:11}},r.createElement(a.ej,null),r.createElement(a.j9,{zIndex:10},r.createElement(a.cq.RStyle,null,r.createElement(a.cq.RIcon,{src:c(),anchor:[.5,.8]})),r.createElement(a.Dp,{geometry:new t.A((0,l.Rb)(s.ArcDeTriomphe)),onClick:n=>n.map.getView().fit(n.target.getGeometry().getExtent(),{duration:250,maxZoom:15})},r.createElement(a.Rv,{className:"example-overlay"},"Arc de Triomphe",r.createElement("br",null),r.createElement("em",null,"⬉ click to zoom")))))}}}]); \ No newline at end of file diff --git a/8621.bundle.js b/8621.bundle.js index 597c6ac3..df7cffb3 100644 --- a/8621.bundle.js +++ b/8621.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8621],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var r=e(1601),l=e.n(r),t=e(6314),a=e.n(t)()(l());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var r=e(5072),l=e.n(r),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),u=e.n(s),p=e(540),d=e.n(p),b=e(1113),g=e.n(b),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),l()(m.A,x),m.A&&m.A.locals&&m.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},8621:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>u});var r=e(6540),l=e(3407),t=e(4294),a=(e(5045),e(7240)),i=e(4995),c=e.n(i);function s(){const[n,o]=r.useState(new t.A((0,l.Rb)([0,0]))),[e,i]=r.useState(void 0),{map:s}=(0,a.Xo)();return r.createElement(r.Fragment,null,r.createElement(a.NI,{tracking:!0,trackingOptions:{enableHighAccuracy:!0},onChange:r.useCallback((n=>{const e=n.target;o(new t.A(e.getPosition())),i(e.getAccuracyGeometry()),s.getView().fit(e.getAccuracyGeometry(),{duration:250,maxZoom:15})}),[s])}),r.createElement(a.j9,{zIndex:10},r.createElement(a.cq.RStyle,null,r.createElement(a.cq.RIcon,{src:c(),anchor:[.5,.8]}),r.createElement(a.cq.RStroke,{color:"#007bff",width:3})),r.createElement(a.Dp,{geometry:n}),r.createElement(a.Dp,{geometry:e})))}function u(){return r.createElement(a.f9,{className:"example-map",initial:{center:(0,l.Rb)([0,0]),zoom:4}},r.createElement(a.ej,null),r.createElement(s,null))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8621],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var r=e(1601),l=e.n(r),t=e(6314),a=e.n(t)()(l());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var r=e(5072),l=e.n(r),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),u=e(540),d=e.n(u),b=e(1113),g=e.n(b),m=e(4096),x={};x.styleTagTransform=g(),x.setAttributes=p(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=d(),l()(m.A,x),m.A&&m.A.locals&&m.A.locals},4995:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' version='1.1' height='64' width='64' style='shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;' viewBox='0 0 222.14 392.275' x='0px' y='0px' fill-rule='evenodd' clip-rule='evenodd'%3e %3cdefs%3e %3clinearGradient id='gradient' x2='1' y2='1'%3e %3cstop offset='0%25' stop-color='%23447799' /%3e %3cstop offset='50%25' stop-color='%23224488' /%3e %3cstop offset='100%25' stop-color='%23112266' /%3e %3c/linearGradient%3e %3c/defs%3e %3cg%3e %3cpath fill='url(%23gradient) %23447799' d='M111.07 0c-61.34,0 -111.07,49.73 -111.07,111.07 0,70.61 56.28,148.74 102.39,198.93 4.68,5.08 12.68,5.08 17.36,0 46.11,-50.19 102.39,-128.32 102.39,-198.93 0,-61.34 -49.73,-111.07 -111.07,-111.07zm0 52.68c32.24,0 58.39,26.14 58.39,58.39 0,32.24 -26.15,58.38 -58.39,58.38 -32.24,0 -58.39,-26.14 -58.39,-58.38 0,-32.25 26.15,-58.39 58.39,-58.39z'/%3e %3c/g%3e %3c/svg%3e"},8621:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var r=e(6540),l=e(3407),t=e(4294),a=(e(5045),e(7240)),i=e(4995),c=e.n(i);function s(){const[n,o]=r.useState(new t.A((0,l.Rb)([0,0]))),[e,i]=r.useState(void 0),{map:s}=(0,a.Xo)();return r.createElement(r.Fragment,null,r.createElement(a.NI,{tracking:!0,trackingOptions:{enableHighAccuracy:!0},onChange:r.useCallback((n=>{const e=n.target;o(new t.A(e.getPosition())),i(e.getAccuracyGeometry()),s.getView().fit(e.getAccuracyGeometry(),{duration:250,maxZoom:15})}),[s])}),r.createElement(a.j9,{zIndex:10},r.createElement(a.cq.RStyle,null,r.createElement(a.cq.RIcon,{src:c(),anchor:[.5,.8]}),r.createElement(a.cq.RStroke,{color:"#007bff",width:3})),r.createElement(a.Dp,{geometry:n}),r.createElement(a.Dp,{geometry:e})))}function p(){return r.createElement(a.f9,{className:"example-map",initial:{center:(0,l.Rb)([0,0]),zoom:4}},r.createElement(a.ej,null),r.createElement(s,null))}}}]); \ No newline at end of file diff --git a/892.bundle.js b/892.bundle.js index 8a923c53..d0f43776 100644 --- a/892.bundle.js +++ b/892.bundle.js @@ -1 +1 @@ -(()=>{"use strict";const e=(e,...t)=>postMessage({type:e,payload:t});globalThis.SharedArrayBuffer?globalThis.Atomics?globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle&&globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle&&navigator?.storage?.getDirectory?function(t){const n=function(...e){throw new Error(e.join(" "))};globalThis.window===globalThis?n("This code cannot run from the main thread.","Load it as a Worker from a separate Worker."):navigator?.storage?.getDirectory||n("This API requires navigator.storage.getDirectory.");const s=Object.create(null);s.verbose=1;const a={0:console.error.bind(console),1:console.warn.bind(console),2:console.log.bind(console)},o=(e,...t)=>{s.verbose>e&&a[e]("OPFS asyncer:",...t)},i=(...e)=>o(2,...e),c=(...e)=>o(1,...e),r=(...e)=>o(0,...e),l=Object.create(null);l.reset=()=>{let e;for(e in s.opIds)(t=l[e]=Object.create(null)).count=t.time=t.wait=0;var t;let n=l.s11n=Object.create(null);n=n.serialize=Object.create(null),n.count=n.time=0,n=l.s11n.deserialize=Object.create(null),n.count=n.time=0},l.dump=()=>{let e,t=0,n=0,a=0;for(e in s.opIds){const s=l[e];t+=s.count,n+=s.time,a+=s.wait,s.avgTime=s.count&&s.time?s.time/s.count:0}console.log(globalThis?.location?.href,"metrics for",globalThis?.location?.href,":\n",l,"\nTotal of",t,"op(s) for",n,"ms","approx",a,"ms spent waiting on OPFS APIs."),console.log("Serialization metrics:",l.s11n)};const d=Object.create(null),f=new Set,y=function(e,t){const n=new URL(e,"file://irrelevant").pathname;return t?n.split("/").filter((e=>!!e)):n},u=async function(e,t=!1){const n=y(e,!0),a=n.pop();let o=s.rootDir;for(const e of n)e&&(o=await o.getDirectoryHandle(e,{create:!!t}));return[o,a]},p=async e=>{if(e.syncHandle){i("Closing sync handle for",e.filenameAbs);const t=e.syncHandle;return delete e.syncHandle,delete e.xLock,f.delete(e.fid),t.close()}},b=async e=>{try{await p(e)}catch(t){c("closeSyncHandleNoThrow() ignoring:",t,e)}},m=async()=>{if(f.size)for(const e of f){const t=d[e];await b(t),i("Auto-unlocked",e,t.filenameAbs)}},w=async e=>{if(e.releaseImplicitLocks&&f.has(e.fid))return b(e)};class g extends Error{constructor(e,...t){super([...t,": "+e.name+":",e.message].join(" "),{cause:e}),this.name="GetSyncHandleError"}}g.convertRc=(e,t)=>e instanceof g&&("NoModificationAllowedError"===e.cause.name||"DOMException"===e.cause.name&&0===e.cause.message.indexOf("Access Handles cannot"))?s.sq3Codes.SQLITE_BUSY:t;const O=async(e,t)=>{if(!e.syncHandle){const n=performance.now();i("Acquiring sync handle for",e.filenameAbs);const a=6,o=2*s.asyncIdleWaitTime;let r=1,l=o;for(;;l=o*++r)try{e.syncHandle=await e.fileHandle.createSyncAccessHandle();break}catch(n){if(r===a)throw new g(n,"Error getting sync handle for",t+"().",a,"attempts failed.",e.filenameAbs);c("Error getting sync handle for",t+"(). Waiting",l,"ms and trying again.",e.filenameAbs,n),Atomics.wait(s.sabOPView,s.opIds.retry,0,l)}i("Got",t+"() sync handle for",e.filenameAbs,"in",performance.now()-n,"ms"),e.xLock||(f.add(e.fid),i("Acquired implicit lock for",t+"()",e.fid,e.filenameAbs))}return e.syncHandle},E=(e,t)=>{i(e+"() => notify(",t,")"),Atomics.store(s.sabOPView,s.opIds.rc,t),Atomics.notify(s.sabOPView,s.opIds.rc)},h=function(e,t){t.readOnly&&n(e+"(): File is read-only: "+t.filenameAbs)},x=Object.create(null);x.op=void 0,x.start=void 0;const I=e=>{x.start=performance.now(),x.op=e,++l[e].count},S=()=>l[x.op].time+=performance.now()-x.start,T=Object.create(null);T.op=void 0,T.start=void 0;const R=e=>{T.start=performance.now(),T.op=e},A=()=>l[T.op].wait+=performance.now()-T.start;let L=!1;const C={"opfs-async-metrics":async()=>{I("opfs-async-metrics"),l.dump(),E("opfs-async-metrics",0),S()},"opfs-async-shutdown":async()=>{L=!0,E("opfs-async-shutdown",0)},mkdir:async e=>{I("mkdir");let t=0;R("mkdir");try{await u(e+"/filepart",!0)}catch(e){s.s11n.storeException(2,e),t=s.sq3Codes.SQLITE_IOERR}finally{A()}E("mkdir",t),S()},xAccess:async e=>{I("xAccess");let t=0;R("xAccess");try{const[t,n]=await u(e);await t.getFileHandle(n)}catch(e){s.s11n.storeException(2,e),t=s.sq3Codes.SQLITE_IOERR}finally{A()}E("xAccess",t),S()},xClose:async function(e){const t="xClose";I(t),f.delete(e);const n=d[e];let a=0;if(R(t),n){if(delete d[e],await p(n),n.deleteOnClose)try{await n.dirHandle.removeEntry(n.filenamePart)}catch(e){c("Ignoring dirHandle.removeEntry() failure of",n,e)}}else s.s11n.serialize(),a=s.sq3Codes.SQLITE_NOTFOUND;A(),E(t,a),S()},xDelete:async function(...e){I("xDelete");const t=await C.xDeleteNoWait(...e);E("xDelete",t),S()},xDeleteNoWait:async function(e,t=0,n=!1){let a=0;R("xDelete");try{for(;e;){const[s,a]=await u(e,!1);if(!a)break;if(await s.removeEntry(a,{recursive:n}),4660!==t)break;n=!1,(e=y(e,!0)).pop(),e=e.join("/")}}catch(e){s.s11n.storeException(2,e),a=s.sq3Codes.SQLITE_IOERR_DELETE}return A(),a},xFileSize:async function(e){I("xFileSize");const t=d[e];let n=0;R("xFileSize");try{const e=await(await O(t,"xFileSize")).getSize();s.s11n.serialize(Number(e))}catch(e){s.s11n.storeException(1,e),n=g.convertRc(e,s.sq3Codes.SQLITE_IOERR)}await w(t),A(),E("xFileSize",n),S()},xLock:async function(e,t){I("xLock");const n=d[e];let a=0;const o=n.xLock;if(n.xLock=t,!n.syncHandle){R("xLock");try{await O(n,"xLock"),f.delete(e)}catch(e){s.s11n.storeException(1,e),a=g.convertRc(e,s.sq3Codes.SQLITE_IOERR_LOCK),n.xLock=o}A()}E("xLock",a),S()},xOpen:async function(e,t,n,a){const o="xOpen";I(o);const i=s.sq3Codes.SQLITE_OPEN_CREATE&n;R("xOpen");try{let c,r;try{[c,r]=await u(t,!!i)}catch(e){return s.s11n.storeException(1,e),E(o,s.sq3Codes.SQLITE_NOTFOUND),S(),void A()}const l=await c.getFileHandle(r,{create:i});A();const f=Object.assign(Object.create(null),{fid:e,filenameAbs:t,filenamePart:r,dirHandle:c,fileHandle:l,sabView:s.sabFileBufView,readOnly:!i&&s.sq3Codes.SQLITE_OPEN_READONLY&n,deleteOnClose:!!(s.sq3Codes.SQLITE_OPEN_DELETEONCLOSE&n)});f.releaseImplicitLocks=a&s.opfsFlags.OPFS_UNLOCK_ASAP||s.opfsFlags.defaultUnlockAsap,d[e]=f,E(o,0)}catch(e){A(),r(o,e),s.s11n.storeException(1,e),E(o,s.sq3Codes.SQLITE_IOERR)}S()},xRead:async function(e,t,n){I("xRead");let a,o=0;const i=d[e];try{R("xRead"),a=(await O(i,"xRead")).read(i.sabView.subarray(0,t),{at:Number(n)}),A(),a{Number.isFinite(s.opIds[e])||n("Maintenance required: missing state.opIds[",e,"]")})),(()=>{if(s.s11n)return s.s11n;const e=new TextDecoder,t=new TextEncoder("utf-8"),a=new Uint8Array(s.sabIO,s.sabS11nOffset,s.sabS11nSize),o=new DataView(s.sabIO,s.sabS11nOffset,s.sabS11nSize);s.s11n=Object.create(null);const i=Object.create(null);i.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},i.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},i.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},i.string={id:4};const c=e=>{switch(e){case i.number.id:return i.number;case i.bigint.id:return i.bigint;case i.boolean.id:return i.boolean;case i.string.id:return i.string;default:n("Invalid type ID:",e)}};s.s11n.deserialize=function(t=!1){++l.s11n.deserialize.count;const n=performance.now(),i=a[0],r=i?[]:null;if(i){const t=[];let n,l,d,f=1;for(n=0;n{e<=s.asyncS11nExceptions&&s.s11n.serialize([t.name,": ",t.message].join(""))}:()=>{},s.s11n})(),l.reset(),i("init state",s),e("opfs-async-inited"),_();break}case"opfs-async-restart":L&&(c("Restarting after opfs-async-shutdown. Might or might not work."),L=!1,_());break;case"opfs-async-metrics":l.dump()}},e("opfs-async-loaded")})).catch((e=>r("error initializing OPFS asyncer:",e)))}(self):e("opfs-unavailable","Missing required OPFS APIs."):e("opfs-unavailable","Missing Atomics API.","The server must emit the COOP/COEP response headers to enable that."):e("opfs-unavailable","Missing SharedArrayBuffer API.","The server must emit the COOP/COEP response headers to enable that.")})(); \ No newline at end of file +(()=>{"use strict";const e=(e,...t)=>postMessage({type:e,payload:t});globalThis.SharedArrayBuffer?globalThis.Atomics?globalThis.FileSystemHandle&&globalThis.FileSystemDirectoryHandle&&globalThis.FileSystemFileHandle&&globalThis.FileSystemFileHandle.prototype.createSyncAccessHandle&&navigator?.storage?.getDirectory?function(){const t=function(...e){throw new Error(e.join(" "))};globalThis.window===globalThis?t("This code cannot run from the main thread.","Load it as a Worker from a separate Worker."):navigator?.storage?.getDirectory||t("This API requires navigator.storage.getDirectory.");const n=Object.create(null);n.verbose=1;const s={0:console.error.bind(console),1:console.warn.bind(console),2:console.log.bind(console)},a=(e,...t)=>{n.verbose>e&&s[e]("OPFS asyncer:",...t)},o=(...e)=>a(2,...e),i=(...e)=>a(1,...e),c=(...e)=>a(0,...e),r=Object.create(null);r.reset=()=>{let e;for(e in n.opIds)(t=r[e]=Object.create(null)).count=t.time=t.wait=0;var t;let s=r.s11n=Object.create(null);s=s.serialize=Object.create(null),s.count=s.time=0,s=r.s11n.deserialize=Object.create(null),s.count=s.time=0},r.dump=()=>{let e,t=0,s=0,a=0;for(e in n.opIds){const n=r[e];t+=n.count,s+=n.time,a+=n.wait,n.avgTime=n.count&&n.time?n.time/n.count:0}console.log(globalThis?.location?.href,"metrics for",globalThis?.location?.href,":\n",r,"\nTotal of",t,"op(s) for",s,"ms","approx",a,"ms spent waiting on OPFS APIs."),console.log("Serialization metrics:",r.s11n)};const l=Object.create(null),d=new Set,f=function(e,t){const n=new URL(e,"file://irrelevant").pathname;return t?n.split("/").filter((e=>!!e)):n},y=async function(e,t=!1){const s=f(e,!0),a=s.pop();let o=n.rootDir;for(const e of s)e&&(o=await o.getDirectoryHandle(e,{create:!!t}));return[o,a]},u=async e=>{if(e.syncHandle){o("Closing sync handle for",e.filenameAbs);const t=e.syncHandle;return delete e.syncHandle,delete e.xLock,d.delete(e.fid),t.close()}},p=async e=>{try{await u(e)}catch(t){i("closeSyncHandleNoThrow() ignoring:",t,e)}},b=async()=>{if(d.size)for(const e of d){const t=l[e];await p(t),o("Auto-unlocked",e,t.filenameAbs)}},m=async e=>{if(e.releaseImplicitLocks&&d.has(e.fid))return p(e)};class w extends Error{constructor(e,...t){super([...t,": "+e.name+":",e.message].join(" "),{cause:e}),this.name="GetSyncHandleError"}}w.convertRc=(e,t)=>e instanceof w&&("NoModificationAllowedError"===e.cause.name||"DOMException"===e.cause.name&&0===e.cause.message.indexOf("Access Handles cannot"))?n.sq3Codes.SQLITE_BUSY:t;const g=async(e,t)=>{if(!e.syncHandle){const s=performance.now();o("Acquiring sync handle for",e.filenameAbs);const a=6,c=2*n.asyncIdleWaitTime;let r=1,l=c;for(;;l=c*++r)try{e.syncHandle=await e.fileHandle.createSyncAccessHandle();break}catch(s){if(r===a)throw new w(s,"Error getting sync handle for",t+"().",a,"attempts failed.",e.filenameAbs);i("Error getting sync handle for",t+"(). Waiting",l,"ms and trying again.",e.filenameAbs,s),Atomics.wait(n.sabOPView,n.opIds.retry,0,l)}o("Got",t+"() sync handle for",e.filenameAbs,"in",performance.now()-s,"ms"),e.xLock||(d.add(e.fid),o("Acquired implicit lock for",t+"()",e.fid,e.filenameAbs))}return e.syncHandle},O=(e,t)=>{o(e+"() => notify(",t,")"),Atomics.store(n.sabOPView,n.opIds.rc,t),Atomics.notify(n.sabOPView,n.opIds.rc)},E=function(e,n){n.readOnly&&t(e+"(): File is read-only: "+n.filenameAbs)},h=Object.create(null);h.op=void 0,h.start=void 0;const x=e=>{h.start=performance.now(),h.op=e,++r[e].count},I=()=>r[h.op].time+=performance.now()-h.start,S=Object.create(null);S.op=void 0,S.start=void 0;const T=e=>{S.start=performance.now(),S.op=e},R=()=>r[S.op].wait+=performance.now()-S.start;let A=!1;const L={"opfs-async-metrics":async()=>{x("opfs-async-metrics"),r.dump(),O("opfs-async-metrics",0),I()},"opfs-async-shutdown":async()=>{A=!0,O("opfs-async-shutdown",0)},mkdir:async e=>{x("mkdir");let t=0;T("mkdir");try{await y(e+"/filepart",!0)}catch(e){n.s11n.storeException(2,e),t=n.sq3Codes.SQLITE_IOERR}finally{R()}O("mkdir",t),I()},xAccess:async e=>{x("xAccess");let t=0;T("xAccess");try{const[t,n]=await y(e);await t.getFileHandle(n)}catch(e){n.s11n.storeException(2,e),t=n.sq3Codes.SQLITE_IOERR}finally{R()}O("xAccess",t),I()},xClose:async function(e){const t="xClose";x(t),d.delete(e);const s=l[e];let a=0;if(T(t),s){if(delete l[e],await u(s),s.deleteOnClose)try{await s.dirHandle.removeEntry(s.filenamePart)}catch(e){i("Ignoring dirHandle.removeEntry() failure of",s,e)}}else n.s11n.serialize(),a=n.sq3Codes.SQLITE_NOTFOUND;R(),O(t,a),I()},xDelete:async function(...e){x("xDelete");const t=await L.xDeleteNoWait(...e);O("xDelete",t),I()},xDeleteNoWait:async function(e,t=0,s=!1){let a=0;T("xDelete");try{for(;e;){const[n,a]=await y(e,!1);if(!a)break;if(await n.removeEntry(a,{recursive:s}),4660!==t)break;s=!1,(e=f(e,!0)).pop(),e=e.join("/")}}catch(e){n.s11n.storeException(2,e),a=n.sq3Codes.SQLITE_IOERR_DELETE}return R(),a},xFileSize:async function(e){x("xFileSize");const t=l[e];let s=0;T("xFileSize");try{const e=await(await g(t,"xFileSize")).getSize();n.s11n.serialize(Number(e))}catch(e){n.s11n.storeException(1,e),s=w.convertRc(e,n.sq3Codes.SQLITE_IOERR)}await m(t),R(),O("xFileSize",s),I()},xLock:async function(e,t){x("xLock");const s=l[e];let a=0;const o=s.xLock;if(s.xLock=t,!s.syncHandle){T("xLock");try{await g(s,"xLock"),d.delete(e)}catch(e){n.s11n.storeException(1,e),a=w.convertRc(e,n.sq3Codes.SQLITE_IOERR_LOCK),s.xLock=o}R()}O("xLock",a),I()},xOpen:async function(e,t,s,a){const o="xOpen";x(o);const i=n.sq3Codes.SQLITE_OPEN_CREATE&s;T("xOpen");try{let c,r;try{[c,r]=await y(t,!!i)}catch(e){return n.s11n.storeException(1,e),O(o,n.sq3Codes.SQLITE_NOTFOUND),I(),void R()}const d=await c.getFileHandle(r,{create:i});R();const f=Object.assign(Object.create(null),{fid:e,filenameAbs:t,filenamePart:r,dirHandle:c,fileHandle:d,sabView:n.sabFileBufView,readOnly:!i&&n.sq3Codes.SQLITE_OPEN_READONLY&s,deleteOnClose:!!(n.sq3Codes.SQLITE_OPEN_DELETEONCLOSE&s)});f.releaseImplicitLocks=a&n.opfsFlags.OPFS_UNLOCK_ASAP||n.opfsFlags.defaultUnlockAsap,l[e]=f,O(o,0)}catch(e){R(),c(o,e),n.s11n.storeException(1,e),O(o,n.sq3Codes.SQLITE_IOERR)}I()},xRead:async function(e,t,s){x("xRead");let a,o=0;const i=l[e];try{T("xRead"),a=(await g(i,"xRead")).read(i.sabView.subarray(0,t),{at:Number(s)}),R(),a{Number.isFinite(n.opIds[e])||t("Maintenance required: missing state.opIds[",e,"]")})),(()=>{if(n.s11n)return n.s11n;const e=new TextDecoder,s=new TextEncoder("utf-8"),a=new Uint8Array(n.sabIO,n.sabS11nOffset,n.sabS11nSize),o=new DataView(n.sabIO,n.sabS11nOffset,n.sabS11nSize);n.s11n=Object.create(null);const i=Object.create(null);i.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},i.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},i.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},i.string={id:4};const c=e=>{switch(e){case i.number.id:return i.number;case i.bigint.id:return i.bigint;case i.boolean.id:return i.boolean;case i.string.id:return i.string;default:t("Invalid type ID:",e)}};n.s11n.deserialize=function(t=!1){++r.s11n.deserialize.count;const s=performance.now(),i=a[0],l=i?[]:null;if(i){const t=[];let s,r,d,f=1;for(s=0;s{e<=n.asyncS11nExceptions&&n.s11n.serialize([t.name,": ",t.message].join(""))}:()=>{},n.s11n})(),r.reset(),o("init state",n),e("opfs-async-inited"),C();break}case"opfs-async-restart":A&&(i("Restarting after opfs-async-shutdown. Might or might not work."),A=!1,C());break;case"opfs-async-metrics":r.dump()}},e("opfs-async-loaded")})).catch((e=>c("error initializing OPFS asyncer:",e)))}(self):e("opfs-unavailable","Missing required OPFS APIs."):e("opfs-unavailable","Missing Atomics API.","The server must emit the COOP/COEP response headers to enable that."):e("opfs-unavailable","Missing SharedArrayBuffer API.","The server must emit the COOP/COEP response headers to enable that.")})(); \ No newline at end of file diff --git a/8980.bundle.js b/8980.bundle.js index 4309ac8b..1206e24d 100644 --- a/8980.bundle.js +++ b/8980.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8980],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},783:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const i=a},5045:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),p=l(540),u=l.n(p),d=l(1113),g=l.n(d),m=l(4096),v={};v.styleTagTransform=g(),v.setAttributes=b(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=u(),r()(m.A,v),m.A&&m.A.locals&&m.A.locals},7601:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),b=l.n(s),p=l(540),u=l.n(p),d=l(1113),g=l.n(d),m=l(783),v={};v.styleTagTransform=g(),v.setAttributes=b(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=u(),r()(m.A,v),m.A&&m.A.locals&&m.A.locals},8980:(n,o,l)=>{l.r(o),l.d(o,{default:()=>i});var e=l(6540),r=l(3407),t=(l(5045),l(7240));l(7601);const a=(0,r.Rb)([2.364,48.82]);function i(){return e.createElement(e.Fragment,null,e.createElement(t.f9,{width:"100%",height:"60vh",initial:{center:a,zoom:11}},e.createElement(t.E6.bc,null,e.createElement(t.$g,{properties:{label:"OSM"}}),e.createElement(t.dx,{properties:{label:"OpenTopo"},url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}))),e.createElement("div",{className:"my-4"},e.createElement("strong",null,"WebGL generally allows for a smoother animation experience"),e.createElement("p",null,"Use the button in the upper right corner to switch the active layer")))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[8980],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},783:(n,o,e)=>{e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const i=a},5045:(n,o,e)=>{var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),b=e(540),u=e.n(b),d=e(1113),g=e.n(d),m=e(4096),v={};v.styleTagTransform=g(),v.setAttributes=p(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=u(),r()(m.A,v),m.A&&m.A.locals&&m.A.locals},7601:(n,o,e)=>{var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),p=e.n(s),b=e(540),u=e.n(b),d=e(1113),g=e.n(d),m=e(783),v={};v.styleTagTransform=g(),v.setAttributes=p(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=u(),r()(m.A,v),m.A&&m.A.locals&&m.A.locals},8980:(n,o,e)=>{e.r(o),e.d(o,{default:()=>i});var l=e(6540),r=e(3407),t=(e(5045),e(7240));e(7601);const a=(0,r.Rb)([2.364,48.82]);function i(){return l.createElement(l.Fragment,null,l.createElement(t.f9,{width:"100%",height:"60vh",initial:{center:a,zoom:11}},l.createElement(t.E6.bc,null,l.createElement(t.$g,{properties:{label:"OSM"}}),l.createElement(t.dx,{properties:{label:"OpenTopo"},url:"https://{a-c}.tile.opentopomap.org/{z}/{x}/{y}.png",attributions:"Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)"}))),l.createElement("div",{className:"my-4"},l.createElement("strong",null,"WebGL generally allows for a smoother animation experience"),l.createElement("p",null,"Use the button in the upper right corner to switch the active layer")))}}}]); \ No newline at end of file diff --git a/9155.bundle.js b/9155.bundle.js index e211eef9..7b2ed9ec 100644 --- a/9155.bundle.js +++ b/9155.bundle.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[9155],{4096:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},783:(n,o,l)=>{l.d(o,{A:()=>i});var e=l(1601),r=l.n(e),t=l(6314),a=l.n(t)()(r());a.push([n.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const i=a},5045:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),u=l.n(s),d=l(540),b=l.n(d),p=l(1113),m=l.n(p),g=l(4096),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=b(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},7601:(n,o,l)=>{var e=l(5072),r=l.n(e),t=l(7825),a=l.n(t),i=l(7659),c=l.n(i),s=l(5056),u=l.n(s),d=l(540),b=l.n(d),p=l(1113),m=l.n(p),g=l(783),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=b(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},9155:(n,o,l)=>{l.r(o),l.d(o,{default:()=>i});var e=l(6540),r=l(3407),t=(l(5045),l(7601),l(7240));const a=(0,r.Rb)([2.364,48.82]);function i(){const[n,o]=e.useState({center:a,zoom:11});return e.createElement(e.Fragment,null,e.createElement(t.f9,{className:"example-map",initial:n,view:[n,o]},e.createElement(t.ej,null)),e.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow d-flex flex-row justify-content-between"},e.createElement("div",null,"Center is at",e.createElement("strong",{className:"mx-1"},`${(0,r.WP)(n.center)[1].toFixed(3)}° :\n ${(0,r.WP)(n.center)[0].toFixed(3)}°`)),e.createElement("div",null,"Zoom level is ",e.createElement("strong",{className:"mx-1"},Math.round(n.zoom))),e.createElement("div",null,"Resolution is",e.createElement("strong",{className:"mx-1"},n.resolution&&n.resolution.toFixed(2),"m/pixel"))))}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[9155],{4096:(n,o,e)=>{e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},783:(n,o,e)=>{e.d(o,{A:()=>i});var l=e(1601),r=e.n(l),t=e(6314),a=e.n(t)()(r());a.push([n.id,".ol-layers-control {\n right: 0.5em;\n top: 2.5em;\n background-color: rgba(255,255,255,0.6);\n}\n\n.ol-layers-control:hover {\n background-color: rgba(255,255,255,0.9);\n}\n\n.ol-layers-control label {\n margin-left: 0.25em;\n}\n\n.ol-layers-control>div {\n padding: 0.25em;\n}\n\n.ol-layers-control>span>*:first-child {\n margin-left: auto;\n}",""]);const i=a},5045:(n,o,e)=>{var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),u=e.n(s),d=e(540),b=e.n(d),p=e(1113),m=e.n(p),g=e(4096),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=b(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},7601:(n,o,e)=>{var l=e(5072),r=e.n(l),t=e(7825),a=e.n(t),i=e(7659),c=e.n(i),s=e(5056),u=e.n(s),d=e(540),b=e.n(d),p=e(1113),m=e.n(p),g=e(783),x={};x.styleTagTransform=m(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=a(),x.insertStyleElement=b(),r()(g.A,x),g.A&&g.A.locals&&g.A.locals},9155:(n,o,e)=>{e.r(o),e.d(o,{default:()=>i});var l=e(6540),r=e(3407),t=(e(5045),e(7601),e(7240));const a=(0,r.Rb)([2.364,48.82]);function i(){const[n,o]=l.useState({center:a,zoom:11});return l.createElement(l.Fragment,null,l.createElement(t.f9,{className:"example-map",initial:n,view:[n,o]},l.createElement(t.ej,null)),l.createElement("div",{className:"mx-0 mt-0 mb-3 p-1 w-100 jumbotron shadow d-flex flex-row justify-content-between"},l.createElement("div",null,"Center is at",l.createElement("strong",{className:"mx-1"},`${(0,r.WP)(n.center)[1].toFixed(3)}° :\n ${(0,r.WP)(n.center)[0].toFixed(3)}°`)),l.createElement("div",null,"Zoom level is ",l.createElement("strong",{className:"mx-1"},Math.round(n.zoom))),l.createElement("div",null,"Resolution is",l.createElement("strong",{className:"mx-1"},n.resolution&&n.resolution.toFixed(2),"m/pixel"))))}}}]); \ No newline at end of file diff --git a/9177.bundle.js b/9177.bundle.js index 1d7855d3..44f1ee0a 100644 --- a/9177.bundle.js +++ b/9177.bundle.js @@ -1 +1 @@ -(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[9177],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),t=e.n(l),r=e(6314),a=e.n(r)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),t=e.n(l),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),p=e.n(u),b=e(1113),m=e.n(b),g=e(4096),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p(),t()(g.A,v),g.A&&g.A.locals&&g.A.locals},7419:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' version='1.1' x='0px' y='0px' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3e %3cpath d='M72.825,97.439L62.234,79.797v-4.25H60.25c-0.597-1.834-3.203-9.893-3.963-13.271h0.782v-4.17h-1.82 c-0.423-4.131-3.366-33.21-3.279-42.153c0.687-1.021,0.964-1.314,0.964-1.314l0.104-0.103l0.038-0.142 c0.365-1.383,0.276-4.369-2.628-5.856L50,2.561l-0.447,5.977c-2.904,1.487-2.993,4.473-2.628,5.856l0.04,0.14l0.098,0.101 c0.002,0.003,0.279,0.296,0.968,1.318c0.087,8.942-2.856,38.022-3.279,42.153h-1.82v4.17h0.783 c-0.761,3.379-3.367,11.438-3.964,13.271h-1.984v4.25l-10.59,17.643h10.707v-0.545c0-6.68,5.437-12.115,12.118-12.115 c6.681,0,12.116,5.436,12.116,12.115v0.545H72.825z M46.891,75.461c0.287-1.947,1.164-7.918,1.477-10.16h3.266 c0.312,2.242,1.189,8.213,1.477,10.16H46.891z'/%3e %3c!-- Created by Randomhero from the Noun Project --%3e %3c/svg%3e"},9177:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var l=e(6540),t=e(3407),r=e(8704),a=e(4294),i=(e(5045),e(7419)),c=e.n(i),s=e(7240);const d=(0,t.Rb)([2.294,48.858]),u=new a.A(d);function p(){const[n,o]=l.useState(!1);return l.createElement(l.Fragment,null,l.createElement(s.f9,{className:"example-map",initial:{center:(0,t.Rb)([2.364,48.82]),zoom:11}},l.createElement(s.ej,null),l.createElement(s.j9,null,l.createElement(s.cq.RStyle,null,l.createElement(s.cq.RIcon,{src:c()})),l.createElement(s.Dp,{geometry:u})),l.createElement(s.j9,{onChange:l.useCallback((n=>{const e=n.target;(null==e?void 0:e.forEachFeatureAtCoordinateDirect)&&o(e.forEachFeatureAtCoordinateDirect(d,(()=>!0)))}),[])},l.createElement(s.cq.RStyle,null,l.createElement(s.cq.RStroke,{color:"#0000ff",width:3}),l.createElement(s.cq.RFill,{color:"rgba(0, 0, 0, 0.75)"})),l.createElement(s.vk.Hm,{type:"Polygon",condition:r.Kg,freehandCondition:r.IO}),l.createElement(s.vk.Hm,{type:"Circle",condition:r.Js,freehandCondition:r.Zm}),l.createElement(s.vk.Nl,{condition:r.k5,deleteCondition:l.useCallback((n=>(0,r.k5)(n)&&(0,r.qG)(n)),[])}))),l.createElement("div",null,l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Shift")," and click without dragging for a regular polygon"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Shift")," and ",l.createElement("em",null,"Alt")," and drag for a freehand polygon"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Alt")," and click without dragging for a circle"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Ctrl / ⌘")," and drag to move/add a vertex"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Ctrl / ⌘")," and double click to remove a vertex")),l.createElement("div",{className:"mx-0 mt-1 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"Currently the Eiffel Tower is",n?"":" not"," covered")))}}}]); \ No newline at end of file +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[9177],{4096:(n,o,e)=>{"use strict";e.d(o,{A:()=>i});var l=e(1601),t=e.n(l),r=e(6314),a=e.n(r)()(t());a.push([n.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const i=a},5045:(n,o,e)=>{"use strict";var l=e(5072),t=e.n(l),r=e(7825),a=e.n(r),i=e(7659),c=e.n(i),s=e(5056),d=e.n(s),u=e(540),p=e.n(u),b=e(1113),m=e.n(b),g=e(4096),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p(),t()(g.A,v),g.A&&g.A.locals&&g.A.locals},7419:n=>{n.exports="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' version='1.1' x='0px' y='0px' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3e %3cpath d='M72.825,97.439L62.234,79.797v-4.25H60.25c-0.597-1.834-3.203-9.893-3.963-13.271h0.782v-4.17h-1.82 c-0.423-4.131-3.366-33.21-3.279-42.153c0.687-1.021,0.964-1.314,0.964-1.314l0.104-0.103l0.038-0.142 c0.365-1.383,0.276-4.369-2.628-5.856L50,2.561l-0.447,5.977c-2.904,1.487-2.993,4.473-2.628,5.856l0.04,0.14l0.098,0.101 c0.002,0.003,0.279,0.296,0.968,1.318c0.087,8.942-2.856,38.022-3.279,42.153h-1.82v4.17h0.783 c-0.761,3.379-3.367,11.438-3.964,13.271h-1.984v4.25l-10.59,17.643h10.707v-0.545c0-6.68,5.437-12.115,12.118-12.115 c6.681,0,12.116,5.436,12.116,12.115v0.545H72.825z M46.891,75.461c0.287-1.947,1.164-7.918,1.477-10.16h3.266 c0.312,2.242,1.189,8.213,1.477,10.16H46.891z'/%3e %3c!-- Created by Randomhero from the Noun Project --%3e %3c/svg%3e"},9177:(n,o,e)=>{"use strict";e.r(o),e.d(o,{default:()=>p});var l=e(6540),t=e(3407),r=e(8704),a=e(4294),i=(e(5045),e(7419)),c=e.n(i),s=e(7240);const d=(0,t.Rb)([2.294,48.858]),u=new a.A(d);function p(){const[n,o]=l.useState(!1);return l.createElement(l.Fragment,null,l.createElement(s.f9,{className:"example-map",initial:{center:(0,t.Rb)([2.364,48.82]),zoom:11}},l.createElement(s.ej,null),l.createElement(s.j9,null,l.createElement(s.cq.RStyle,null,l.createElement(s.cq.RIcon,{src:c()})),l.createElement(s.Dp,{geometry:u})),l.createElement(s.j9,{onChange:l.useCallback((n=>{const e=n.target;(null==e?void 0:e.forEachFeatureAtCoordinateDirect)&&o(e.forEachFeatureAtCoordinateDirect(d,(()=>!0)))}),[])},l.createElement(s.cq.RStyle,null,l.createElement(s.cq.RStroke,{color:"#0000ff",width:3}),l.createElement(s.cq.RFill,{color:"rgba(0, 0, 0, 0.75)"})),l.createElement(s.vk.Hm,{type:"Polygon",condition:r.Kg,freehandCondition:r.IO}),l.createElement(s.vk.Hm,{type:"Circle",condition:r.Js,freehandCondition:r.Zm}),l.createElement(s.vk.Nl,{condition:r.k5,deleteCondition:l.useCallback((n=>(0,r.k5)(n)&&(0,r.qG)(n)),[])}))),l.createElement("div",null,l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Shift")," and click without dragging for a regular polygon"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Shift")," and ",l.createElement("em",null,"Alt")," and drag for a freehand polygon"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Alt")," and click without dragging for a circle"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Ctrl / ⌘")," and drag to move/add a vertex"),l.createElement("p",{className:"p-0 m-0"},"Hold ",l.createElement("em",null,"Ctrl / ⌘")," and double click to remove a vertex")),l.createElement("div",{className:"mx-0 mt-1 mb-3 p-1 w-100 jumbotron shadow shadow"},l.createElement("p",null,"Currently the Eiffel Tower is",n?"":" not"," covered")))}}}]); \ No newline at end of file diff --git a/9467.bundle.js b/9467.bundle.js new file mode 100644 index 00000000..ab412cc7 --- /dev/null +++ b/9467.bundle.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[9467],{9303:(t,e,i)=>{i.d(e,{q:()=>g});const n="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,s=new Set,r={env:{RLAYERS_DEBUG:void 0}},o=(t,e,i,n)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`)};let a=globalThis.AbortController,l=globalThis.AbortSignal;if(void 0===a){l=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},a=class{constructor(){e()}signal=new l;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,o("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const h=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),c=t=>h(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?u:null:null;class u extends Array{constructor(t){super(t),this.fill(0)}}class d{heap;length;static#t=!1;static create(t){const e=c(t);if(!e)return[];d.#t=!0;const i=new d(t,e);return d.#t=!1,i}constructor(t,e){if(!d.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class g{#e;#i;#n;#s;#r;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#l;#h;#c;#u;#d;#g;#_;#f;#p;#m;#x;#v;#y;#E;#T;#A;static unsafeExposeInternals(t){return{starts:t.#v,ttls:t.#y,sizes:t.#x,keyMap:t.#h,keyList:t.#c,valList:t.#u,next:t.#d,prev:t.#g,get head(){return t.#_},get tail(){return t.#f},free:t.#p,isBackgroundFetch:e=>t.#C(e),backgroundFetch:(e,i,n,s)=>t.#S(e,i,n,s),moveToTail:e=>t.#R(e),indexes:e=>t.#w(e),rindexes:e=>t.#b(e),isStale:e=>t.#I(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#l}get size(){return this.#a}get fetchMethod(){return this.#r}get memoMethod(){return this.#o}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(t){const{max:e=0,ttl:i,ttlResolution:n=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:u,dispose:_,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:x=0,maxEntrySize:v=0,sizeCalculation:y,fetchMethod:E,memoMethod:T,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:R,ignoreFetchAbort:w}=t;if(0!==e&&!h(e))throw new TypeError("max option must be a nonnegative integer");const b=e?c(e):Array;if(!b)throw new Error("invalid max value: "+e);if(this.#e=e,this.#i=x,this.maxEntrySize=v||this.#i,this.sizeCalculation=y,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==T&&"function"!=typeof T)throw new TypeError("memoMethod must be a function if defined");if(this.#o=T,void 0!==E&&"function"!=typeof E)throw new TypeError("fetchMethod must be a function if specified");if(this.#r=E,this.#T=!!E,this.#h=new Map,this.#c=new Array(e).fill(void 0),this.#u=new Array(e).fill(void 0),this.#d=new b(e),this.#g=new b(e),this.#_=0,this.#f=0,this.#p=d.create(e),this.#a=0,this.#l=0,"function"==typeof _&&(this.#n=_),"function"==typeof f?(this.#s=f,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#E=!!this.#n,this.#A=!!this.#s,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!w,0!==this.maxEntrySize){if(0!==this.#i&&!h(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!h(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#L()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=h(n)||0===n?n:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!h(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#e&&0===this.ttl&&0===this.#i)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){const t="LRU_CACHE_UNBOUNDED";(t=>!s.has(t))(t)&&(s.add(t),o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,g))}}getRemainingTTL(t){return this.#h.has(t)?1/0:0}#P(){const t=new u(this.#e),e=new u(this.#e);this.#y=t,this.#v=e,this.#M=(i,s,r=n.now())=>{if(e[i]=0!==s?r:0,t[i]=s,0!==s&&this.ttlAutopurge){const t=setTimeout((()=>{this.#I(i)&&this.#F(this.#c[i],"expire")}),s+1);t.unref&&t.unref()}},this.#D=i=>{e[i]=0!==t[i]?n.now():0},this.#O=(n,r)=>{if(t[r]){const o=t[r],a=e[r];if(!o||!a)return;n.ttl=o,n.start=a,n.now=i||s();const l=n.now-a;n.remainingTTL=o-l}};let i=0;const s=()=>{const t=n.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=n=>{const r=this.#h.get(n);if(void 0===r)return 0;const o=t[r],a=e[r];return o&&a?o-((i||s())-a):1/0},this.#I=n=>{const r=e[n],o=t[n];return!!o&&!!r&&(i||s())-r>o}}#D=()=>{};#O=()=>{};#M=()=>{};#I=()=>!1;#L(){const t=new u(this.#e);this.#l=0,this.#x=t,this.#k=e=>{this.#l-=t[e],t[e]=0},this.#N=(t,e,i,n)=>{if(this.#C(e))return 0;if(!h(i)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(i=n(e,t),!h(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return i},this.#G=(e,i,n)=>{if(t[e]=i,this.#i){const i=this.#i-t[e];for(;this.#l>i;)this.#z(!0)}this.#l+=t[e],n&&(n.entrySize=i,n.totalCalculatedSize=this.#l)}}#k=t=>{};#G=(t,e,i)=>{};#N=(t,e,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#f;this.#j(e)&&(!t&&this.#I(e)||(yield e),e!==this.#_);)e=this.#g[e]}*#b({allowStale:t=this.allowStale}={}){if(this.#a)for(let e=this.#_;this.#j(e)&&(!t&&this.#I(e)||(yield e),e!==this.#f);)e=this.#d[e]}#j(t){return void 0!==t&&this.#h.get(this.#c[t])===t}*entries(){for(const t of this.#w())void 0===this.#u[t]||void 0===this.#c[t]||this.#C(this.#u[t])||(yield[this.#c[t],this.#u[t]])}*rentries(){for(const t of this.#b())void 0===this.#u[t]||void 0===this.#c[t]||this.#C(this.#u[t])||(yield[this.#c[t],this.#u[t]])}*keys(){for(const t of this.#w()){const e=this.#c[t];void 0===e||this.#C(this.#u[t])||(yield e)}}*rkeys(){for(const t of this.#b()){const e=this.#c[t];void 0===e||this.#C(this.#u[t])||(yield e)}}*values(){for(const t of this.#w())void 0===this.#u[t]||this.#C(this.#u[t])||(yield this.#u[t])}*rvalues(){for(const t of this.#b())void 0===this.#u[t]||this.#C(this.#u[t])||(yield this.#u[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const i of this.#w()){const n=this.#u[i],s=this.#C(n)?n.__staleWhileFetching:n;if(void 0!==s&&t(s,this.#c[i],this))return this.get(this.#c[i],e)}}forEach(t,e=this){for(const i of this.#w()){const n=this.#u[i],s=this.#C(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#c[i],this)}}rforEach(t,e=this){for(const i of this.#b()){const n=this.#u[i],s=this.#C(n)?n.__staleWhileFetching:n;void 0!==s&&t.call(e,s,this.#c[i],this)}}purgeStale(){let t=!1;for(const e of this.#b({allowStale:!0}))this.#I(e)&&(this.#F(this.#c[e],"expire"),t=!0);return t}info(t){const e=this.#h.get(t);if(void 0===e)return;const i=this.#u[e],s=this.#C(i)?i.__staleWhileFetching:i;if(void 0===s)return;const r={value:s};if(this.#y&&this.#v){const t=this.#y[e],i=this.#v[e];if(t&&i){const e=t-(n.now()-i);r.ttl=e,r.start=Date.now()}}return this.#x&&(r.size=this.#x[e]),r}dump(){const t=[];for(const e of this.#w({allowStale:!0})){const i=this.#c[e],s=this.#u[e],r=this.#C(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;const o={value:r};if(this.#y&&this.#v){o.ttl=this.#y[e];const t=n.now()-this.#v[e];o.start=Math.floor(Date.now()-t)}this.#x&&(o.size=this.#x[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=n.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;const{ttl:n=this.ttl,start:s,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i;let{noUpdateTTL:l=this.noUpdateTTL}=i;const h=this.#N(t,e,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#F(t,"set"),this;let c=0===this.#a?void 0:this.#h.get(t);if(void 0===c)c=0===this.#a?this.#f:0!==this.#p.length?this.#p.pop():this.#a===this.#e?this.#z(!1):this.#a,this.#c[c]=t,this.#u[c]=e,this.#h.set(t,c),this.#d[this.#f]=c,this.#g[c]=this.#f,this.#f=c,this.#a++,this.#G(c,h,a),a&&(a.set="add"),l=!1;else{this.#R(c);const i=this.#u[c];if(e!==i){if(this.#T&&this.#C(i)){i.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=i;void 0===e||r||(this.#E&&this.#n?.(e,t,"set"),this.#A&&this.#m?.push([e,t,"set"]))}else r||(this.#E&&this.#n?.(i,t,"set"),this.#A&&this.#m?.push([i,t,"set"]));if(this.#k(c),this.#G(c,h,a),this.#u[c]=e,a){a.set="replace";const t=i&&this.#C(i)?i.__staleWhileFetching:i;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===n||this.#y||this.#P(),this.#y&&(l||this.#M(c,n,s),a&&this.#O(a,c)),!r&&this.#A&&this.#m){const t=this.#m;let e;for(;e=t?.shift();)this.#s?.(...e)}return this}pop(){try{for(;this.#a;){const t=this.#u[this.#_];if(this.#z(!0),this.#C(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#A&&this.#m){const t=this.#m;let e;for(;e=t?.shift();)this.#s?.(...e)}}}#z(t){const e=this.#_,i=this.#c[e],n=this.#u[e];return this.#T&&this.#C(n)?n.__abortController.abort(new Error("evicted")):(this.#E||this.#A)&&(this.#E&&this.#n?.(n,i,"evict"),this.#A&&this.#m?.push([n,i,"evict"])),this.#k(e),t&&(this.#c[e]=void 0,this.#u[e]=void 0,this.#p.push(e)),1===this.#a?(this.#_=this.#f=0,this.#p.length=0):this.#_=this.#d[e],this.#h.delete(i),this.#a--,e}has(t,e={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=e,s=this.#h.get(t);if(void 0!==s){const t=this.#u[s];if(this.#C(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#I(s))return i&&this.#D(s),n&&(n.has="hit",this.#O(n,s)),!0;n&&(n.has="stale",this.#O(n,s))}else n&&(n.has="miss");return!1}peek(t,e={}){const{allowStale:i=this.allowStale}=e,n=this.#h.get(t);if(void 0===n||!i&&this.#I(n))return;const s=this.#u[n];return this.#C(s)?s.__staleWhileFetching:s}#S(t,e,i,n){const s=void 0===e?void 0:this.#u[e];if(this.#C(s))return s;const r=new a,{signal:o}=i;o?.addEventListener("abort",(()=>r.abort(o.reason)),{signal:r.signal});const l={signal:r.signal,options:i,context:n},h=(n,s=!1)=>{const{aborted:o}=r.signal,a=i.ignoreFetchAbort&&void 0!==n;if(i.status&&(o&&!s?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,a&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),o&&!a&&!s)return c(r.signal.reason);const h=u;return this.#u[e]===u&&(void 0===n?h.__staleWhileFetching?this.#u[e]=h.__staleWhileFetching:this.#F(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,n,l.options))),n},c=n=>{const{aborted:s}=r.signal,o=s&&i.allowStaleOnFetchAbort,a=o||i.allowStaleOnFetchRejection,l=a||i.noDeleteOnFetchRejection,h=u;if(this.#u[e]===u&&(l&&void 0!==h.__staleWhileFetching?o||(this.#u[e]=h.__staleWhileFetching):this.#F(t,"fetch")),a)return i.status&&void 0!==h.__staleWhileFetching&&(i.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw n};i.status&&(i.status.fetchDispatched=!0);const u=new Promise(((e,n)=>{const o=this.#r?.(t,s,l);o&&o instanceof Promise&&o.then((t=>e(void 0===t?void 0:t)),n),r.signal.addEventListener("abort",(()=>{i.ignoreFetchAbort&&!i.allowStaleOnFetchAbort||(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>h(t,!0)))}))})).then(h,(t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),c(t)))),d=Object.assign(u,{__abortController:r,__staleWhileFetching:s,__returned:void 0});return void 0===e?(this.set(t,d,{...l.options,status:void 0}),e=this.#h.get(t)):this.#u[e]=d,d}#C(t){if(!this.#T)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof a}async fetch(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:_,forceRefresh:f=!1,status:p,signal:m}=e;if(!this.#T)return p&&(p.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:p});const x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:r,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:p,signal:m};let v=this.#h.get(t);if(void 0===v){p&&(p.fetch="miss");const e=this.#S(t,v,x,_);return e.__returned=e}{const e=this.#u[v];if(this.#C(e)){const t=i&&void 0!==e.__staleWhileFetching;return p&&(p.fetch="inflight",t&&(p.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const s=this.#I(v);if(!f&&!s)return p&&(p.fetch="hit"),this.#R(v),n&&this.#D(v),p&&this.#O(p,v),e;const r=this.#S(t,v,x,_),o=void 0!==r.__staleWhileFetching&&i;return p&&(p.fetch=s?"stale":"refresh",o&&s&&(p.returnedStale=!0)),o?r.__staleWhileFetching:r.__returned=r}}async forceFetch(t,e={}){const i=await this.fetch(t,e);if(void 0===i)throw new Error("fetch() returned undefined");return i}memo(t,e={}){const i=this.#o;if(!i)throw new Error("no memoMethod provided to constructor");const{context:n,forceRefresh:s,...r}=e,o=this.get(t,r);if(!s&&void 0!==o)return o;const a=i(t,o,{options:r,context:n});return this.set(t,a,r),a}get(t,e={}){const{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:r}=e,o=this.#h.get(t);if(void 0!==o){const e=this.#u[o],a=this.#C(e);return r&&this.#O(r,o),this.#I(o)?(r&&(r.get="stale"),a?(r&&i&&void 0!==e.__staleWhileFetching&&(r.returnedStale=!0),i?e.__staleWhileFetching:void 0):(s||this.#F(t,"expire"),r&&i&&(r.returnedStale=!0),i?e:void 0)):(r&&(r.get="hit"),a?e.__staleWhileFetching:(this.#R(o),n&&this.#D(o),e))}r&&(r.get="miss")}#B(t,e){this.#g[e]=t,this.#d[t]=e}#R(t){t!==this.#f&&(t===this.#_?this.#_=this.#d[t]:this.#B(this.#g[t],this.#d[t]),this.#B(this.#f,t),this.#f=t)}delete(t){return this.#F(t,"delete")}#F(t,e){let i=!1;if(0!==this.#a){const n=this.#h.get(t);if(void 0!==n)if(i=!0,1===this.#a)this.#U(e);else{this.#k(n);const i=this.#u[n];if(this.#C(i)?i.__abortController.abort(new Error("deleted")):(this.#E||this.#A)&&(this.#E&&this.#n?.(i,t,e),this.#A&&this.#m?.push([i,t,e])),this.#h.delete(t),this.#c[n]=void 0,this.#u[n]=void 0,n===this.#f)this.#f=this.#g[n];else if(n===this.#_)this.#_=this.#d[n];else{const t=this.#g[n];this.#d[t]=this.#d[n];const e=this.#d[n];this.#g[e]=this.#g[n]}this.#a--,this.#p.push(n)}}if(this.#A&&this.#m?.length){const t=this.#m;let e;for(;e=t?.shift();)this.#s?.(...e)}return i}clear(){return this.#U("delete")}#U(t){for(const e of this.#b({allowStale:!0})){const i=this.#u[e];if(this.#C(i))i.__abortController.abort(new Error("deleted"));else{const n=this.#c[e];this.#E&&this.#n?.(i,n,t),this.#A&&this.#m?.push([i,n,t])}}if(this.#h.clear(),this.#u.fill(void 0),this.#c.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#x&&this.#x.fill(0),this.#_=0,this.#f=0,this.#p.length=0,this.#l=0,this.#a=0,this.#A&&this.#m){const t=this.#m;let e;for(;e=t?.shift();)this.#s?.(...e)}}}},71:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(4120),s=i(2135),r=i(1685);const o="length";class a extends r.Ay{constructor(t,e,i){super(t),this.element=e,this.index=i}}class l extends n.A{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(s.A.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(s.A.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(s.A.REMOVE,i,t)),this.dispatchEvent(new a(s.A.ADD,e,t))}updateLength_(){this.set(o,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i{i.d(e,{A:()=>n});const n={ADD:"add",REMOVE:"remove"}},7607:(t,e,i)=>{i.d(e,{$r:()=>c,Ay:()=>g,bL:()=>a,xo:()=>o});var n=i(8143),s=i(1078),r=i(8711);function o(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}function a(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}const l=new Error("disposed");let h=null;function c(t){h||(h=(0,r.Y)(t.width,t.height,void 0,{willReadFrequently:!0}));const e=h.canvas,i=t.width;e.width!==i&&(e.width=i);const n=t.height;return e.height!==n&&(e.height=n),h.clearRect(0,0,i,n),h.drawImage(t,0,0),h.getImageData(0,0,i,n).data}const u=[256,256];class d extends n.A{constructor(t){const e=s.A.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null,this.controller_=t.controller||null}getSize(){if(this.size_)return this.size_;const t=o(this.data_);return t?[t.width,t.height]:u}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==s.A.IDLE&&this.state!==s.A.ERROR)return;this.state=s.A.LOADING,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=s.A.LOADED,t.changed()})).catch((function(e){t.error_=e,t.state=s.A.ERROR,t.changed()}))}disposeInternal(){this.controller_&&(this.controller_.abort(l),this.controller_=null),super.disposeInternal()}}const g=d},25:(t,e,i)=>{i.d(e,{A:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},6717:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(4120),s=i(6837),r=i(588),o=i(9438);class a extends n.A{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.JH)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.KT)(t,s.A.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:((0,r.v)("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const l=a},5213:(t,e,i)=>{i.d(e,{A:()=>y});var n=i(1685),s=i(4120),r=i(1064),o=i(3407),a=i(1597);const l="accuracy",h="accuracyGeometry",c="altitude",u="altitudeAccuracy",d="heading",g="position",_="projection",f="speed",p="tracking",m="trackingOptions";class x extends n.Ay{constructor(t){super("error"),this.code=t.code,this.message=t.message}}class v extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=o.R6,this.watchId_=void 0,this.addChangeListener(_,this.handleProjectionChanged_),this.addChangeListener(p,this.handleTrackingChanged_),void 0!==t.projection&&this.setProjection(t.projection),void 0!==t.trackingOptions&&this.setTrackingOptions(t.trackingOptions),this.setTracking(void 0!==t.tracking&&t.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const t=this.getProjection();t&&(this.transform_=(0,o.FO)((0,o.Jt)("EPSG:4326"),t),this.position_&&this.set(g,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){const e=t.coords;this.set(l,e.accuracy),this.set(c,null===e.altitude?void 0:e.altitude),this.set(u,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(d,null===e.heading?void 0:(0,a.eh)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];const i=this.transform_(this.position_);this.set(g,i.slice()),this.set(f,null===e.speed?void 0:e.speed);const n=(0,r.kj)(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(h,n),this.changed()}positionError_(t){this.dispatchEvent(new x(t))}getAccuracy(){return this.get(l)}getAccuracyGeometry(){return this.get(h)||null}getAltitude(){return this.get(c)}getAltitudeAccuracy(){return this.get(u)}getHeading(){return this.get(d)}getPosition(){return this.get(g)}getProjection(){return this.get(_)}getSpeed(){return this.get(f)}getTracking(){return this.get(p)}getTrackingOptions(){return this.get(m)}setProjection(t){this.set(_,(0,o.Jt)(t))}setTracking(t){this.set(p,t)}setTrackingOptions(t){this.set(m,t)}}const y=v},3938:(t,e,i)=>{i.d(e,{Ay:()=>g,D4:()=>d,RA:()=>u,f6:()=>c});var n=i(9332),s=i(6837),r=i(6141),o=i(7771),a=i(9438),l=i(4238);class h extends n.A{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"==typeof n?r.A.IDLE:n,this.image_=null,this.loader="function"==typeof n?n:null}changed(){this.dispatchEvent(s.A.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==r.A.IDLE&&this.loader){this.state=r.A.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;(0,l.hq)((()=>this.loader(this.getExtent(),e,this.getPixelRatio()))).then((t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=r.A.LOADED})).catch((t=>{this.state=r.A.ERROR,console.error(t)})).finally((()=>this.changed()))}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function c(t,e,i){const n=t;let r=!0,l=!1,h=!1;const c=[(0,a.Jz)(n,s.A.LOAD,(function(){h=!0,l||e()}))];return n.src&&o.DT?(l=!0,n.decode().then((function(){r&&e()})).catch((function(t){r&&(h?e():i())}))):c.push((0,a.Jz)(n,s.A.ERROR,i)),function(){r=!1,c.forEach(a.JH)}}function u(t,e){return e&&(t.src=e),t.src&&o.DT?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):function(t){return new Promise(((e,i)=>{function n(){r(),e(t)}function s(){r(),i(new Error("Image load error"))}function r(){t.removeEventListener("load",n),t.removeEventListener("error",s)}t.addEventListener("load",n),t.addEventListener("error",s)}))}(t)}function d(t,e){return e&&(t.src=e),t.src&&o.DT&&o.XM?t.decode().then((()=>createImageBitmap(t))).catch((e=>{if(t.complete&&t.width)return t;throw e})):u(t)}const g=h},6141:(t,e,i)=>{i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},190:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(8143),s=i(1078),r=i(8711),o=i(3938);class a extends n.A{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=s.A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=s.A.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,r.Y)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=s.A.LOADED:this.state=s.A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==s.A.ERROR&&(this.state=s.A.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==s.A.IDLE&&(this.state=s.A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,o.f6)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}const l=a},2961:(t,e,i)=>{i.d(e,{A:()=>mt});var n=i(4120),s=i(71),r=i(2135),o=i(2284),a=i(25),l=i(4238),h=i(4087),c=i(9703),u=i(915),d=i(2241),g=i(764),_=i(6933);class f extends a.A{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,h.b0)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,c.Zz)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,c.T9)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let l;const h=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const d=h.projection,f=(0,_.Li)(t.slice(),d),p=[[0,0]];if(d.canWrapX()&&n){const t=d.getExtent(),e=(0,u.RG)(t);p.push([-e,0],[e,0])}const m=e.layerStatesArray,x=m.length,v=[],y=[];for(let n=0;n=0;--s){const r=m[s],u=r.layer;if(u.hasRenderer()&&(0,g.l)(r,h)&&o.call(a,u)){const s=u.getRenderer(),o=u.getSource();if(s&&o){const a=o.getWrapX()?f:t,h=c.bind(null,r.managed);y[0]=a[0]+p[n][0],y[1]=a[1]+p[n][1],l=s.forEachFeatureAtCoordinate(y,e,i,h,v)}if(l)return l}}if(0===v.length)return;const E=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*E)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,s,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l.rT,this,s,r)}getMap(){return this.map_}renderFrame(t){(0,h.b0)()}scheduleExpireIconCache(t){d.ue.canExpireCache()&&t.postRenderFunctions.push(p)}}function p(t,e){d.ue.expire()}const m=f;var x=i(8450),v=i(9960),y=i(3984),E=i(5176),T=i(8774),A=i(9438),C=i(8711);const S=class extends m{constructor(t){super(t),this.fontChangeListenerKey_=(0,A.KT)(T.yY,x.A.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=E.XI+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new v.A(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,A.JH)(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(y.A.PRECOMPOSE,t);const e=t.layerStatesArray.sort(((t,e)=>t.zIndex-e.zIndex));e.some((t=>t.layer instanceof o.A&&t.layer.getDeclutter()))&&(t.declutter={});const i=t.viewState;this.children_.length=0;const n=[];let s=null;for(let r=0,o=e.length;r=0;--i){const n=e[i],s=n.layer;s.getDeclutter()&&s.renderDeclutter(t,n)}e.forEach((e=>e.layer.renderDeferred(t)))}}};var R=i(6837),w=i(8620),b=i(1685),I=i(588),L=i(3530);class P extends b.Ay{constructor(t,e){super(t),this.layer=e}}const M="layers";class F extends w.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(M,this.handleLayersChanged_),i?Array.isArray(i)?i=new s.A(i.slice(),{unique:!0}):(0,I.v)("function"==typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new s.A(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(A.JH),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,A.KT)(t,r.A.ADD,this.handleLayersAdd_,this),(0,A.KT)(t,r.A.REMOVE,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(A.JH);(0,L.I)(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t{this.clickTimeoutId_=void 0;const e=new O.A(k.A.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==k.A.POINTERUP||e.type==k.A.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=k.A.POINTERDOWN&&e.type!=k.A.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new O.A(k.A.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new O.A(k.A.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,A.KT)(t,k.A.POINTERMOVE,this.handlePointerMove_,this),(0,A.KT)(t,k.A.POINTERUP,this.handlePointerUp_,this),(0,A.KT)(this.element_,k.A.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,A.KT)(this.element_.getRootNode(),k.A.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new O.A(k.A.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new O.A(k.A.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,A.JH)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.A.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,A.JH)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(A.JH),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const B=j;var U=i(5801),X=i(2585),W=i(3116);const Y=1/0,Z=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,L.I)(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,I.v)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=Y&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;for(;t>1;){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=rt;){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o0;){const t=this.dequeue()[0],e=t.getKey();t.getState()!==V.A.IDLE||e in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[e]=!0,++this.tilesLoading_,++i,t.load())}}};var K=i(3568),q=i(2703),$=i(7456),J=i(2898),Q=i(9186),tt=i(6068),et=i(4473),it=i(4051),nt=i(4423),st=i(9888),rt=i(6856);const ot=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};var at=i(8751),lt=i(3711),ht=i(5243),ct=i(6514),ut=i(3407),dt=i(4401),gt=i(4422);function _t(t){t instanceof g.A?t.setMapInternal(null):t instanceof D&&t.getLayers().forEach(_t)}function ft(t,e){if(t instanceof g.A)t.setMapInternal(e);else if(t instanceof D){const i=t.getLayers().getArray();for(let t=0,n=i.length;tthis.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new s.A;return(void 0===t.zoom||t.zoom)&&e.push(new Q.A(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new J.A(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new $.A(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new s.A,i=new ot(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new it.A),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new tt.A({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new et.A({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new lt.A),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new ht.A({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new st.A),e.push(new rt.A({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new at.A({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new nt.A({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new H(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(W.A.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(W.A.VIEW,this.handleViewChanged_),this.addChangeListener(W.A.SIZE,this.handleSizeChanged_),this.addChangeListener(W.A.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof K.Ay||t.view.then((function(t){i.setView(new K.Ay(t))})),this.controls.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(r.A.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(r.A.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){ft(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:l.rT,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof D?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:l.rT,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],r="changedTouches"in t?t.changedTouches[0]:t;return[(r.clientX-e.left)/n,(r.clientY-e.top)/s]}getTarget(){return this.get(W.A.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,ut.te)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,c.Bb)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(W.A.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof s.A)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[q.A.ANIMATING]||e[q.A.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new P("removelayer",e)),this.set(W.A.LAYERGROUP,t)}setSize(t){this.set(W.A.SIZE,t)}setTarget(t){this.set(W.A.TARGET,t)}setView(t){if(!t||t instanceof K.Ay)return void this.set(W.A.VIEW,t);this.set(W.A.VIEW,new K.Ay);const e=this;t.then((function(t){e.setView(new K.Ay(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[Math.max(0,n),Math.max(0,s)],!(0,dt.Ie)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,gt.R8)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,ct.aI)(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}const mt=pt},277:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(5801);class s extends n.A{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const r=s},3445:(t,e,i)=>{i.d(e,{A:()=>s});var n=i(6837);const s={SINGLECLICK:"singleclick",CLICK:n.A.CLICK,DBLCLICK:n.A.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},5801:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}const r=s},2585:(t,e,i)=>{i.d(e,{A:()=>n});const n={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},3116:(t,e,i)=>{i.d(e,{A:()=>n});const n={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},4120:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(1685),s=i(8450),r=i(1854),o=i(4087),a=i(3530);class l extends n.Ay{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class h extends r.A{constructor(t){super(),this.on,this.once,this.un,(0,o.v6)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=s.A.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.p)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const c=h},8450:(t,e,i)=>{i.d(e,{A:()=>n});const n={PROPERTYCHANGE:"propertychange"}},1854:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(9332),s=i(6837),r=i(9438);class o extends n.A{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(s.A.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s{i.d(e,{A:()=>f});var n=i(4120),s=i(2585),r=i(5176),o=i(915),a=i(9438),l=i(8711);const h="element",c="map",u="offset",d="position",g="positioning";class _ extends n.A{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+r.Q5,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(h,this.handleElementChanged),this.addChangeListener(c,this.handleMapChanged),this.addChangeListener(u,this.handleOffsetChanged),this.addChangeListener(d,this.handlePositionChanged),this.addChangeListener(g,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(h)}getId(){return this.id}getMap(){return this.get(c)||null}getOffset(){return this.get(u)}getPosition(){return this.get(d)}getPositioning(){return this.get(g)}handleElementChanged(){(0,l.gS)(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(this.element?.remove(),(0,a.JH)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.KT)(t,s.A.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(h,t)}setMap(t){this.set(c,t)}setOffset(t){this.set(u,t)}setPosition(t){this.set(d,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(d))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),s=this.getRect(n,[(0,l.Gq)(n),(0,l.DK)(n)]),r=void 0===(t=t||{}).margin?20:t.margin;if(!(0,o.ms)(i,s)){const n=s[0]-i[0],o=i[2]-s[2],a=s[1]-i[1],l=i[3]-s[3],h=[0,0];if(n<0?h[0]=n-r:o<0&&(h[0]=Math.abs(o)+r),a<0?h[1]=a-r:l<0&&(h[1]=Math.abs(l)+r),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const s=[n[0]+h[0],n[1]+h[1]],r=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(s),duration:r.duration,easing:r.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[n,s,n+e[0],s+e[1]]}setPositioning(t){this.set(g,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),s=this.getPositioning();this.setVisible(!0);let r="0%",o="0%";"bottom-right"==s||"center-right"==s||"top-right"==s?r="-100%":"bottom-center"!=s&&"center-center"!=s&&"top-center"!=s||(r="-50%"),"bottom-left"==s||"bottom-center"==s||"bottom-right"==s?o="-100%":"center-left"!=s&&"center-center"!=s&&"center-right"!=s||(o="-50%");const a=`translate(${r}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}}const f=_},8143:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(9332),s=i(6837),r=i(1078),o=i(4087),a=i(3474);class l extends n.A{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(s.A.CHANGE)}release(){this.state===r.A.ERROR&&this.setState(r.A.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==r.A.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){(0,o.b0)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:(0,a.a6)(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const h=l},61:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(4969),s=i(186);class r extends n.A{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey(),e=(0,s.K)(t)[0];this.forEach((t=>{t.tileCoord[0]!==e&&(this.remove((0,s.i7)(t.tileCoord)),t.release())}))}}const o=r},1110:(t,e,i)=>{i.d(e,{A:()=>r,N:()=>s});class n{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function s(t,e,i,s,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=s,r):new n(t,e,i,s)}const r=n},1078:(t,e,i)=>{i.d(e,{A:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},3568:(t,e,i)=>{i.d(e,{Ay:()=>R});var n=i(4120),s=i(2703),r=i(9015),o=i(9496),a=i(3407),l=i(4238),h=i(6933),c=i(588),u=i(1597);function d(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const l=e?0:r[0]*s,h=e?0:r[1]*s,c=a?a[0]:0,d=a?a[1]:0;let g=t[0]+l/2+c,_=t[2]-l/2+c,f=t[1]+h/2+d,p=t[3]-h/2+d;g>_&&(g=(_+g)/2,_=g),f>p&&(f=(p+f)/2,p=f);let m=(0,u.qE)(n[0],g,_),x=(0,u.qE)(n[1],f,p);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,g-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-_)/t),x+=-t*Math.log(1+Math.max(0,f-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,x]}}function g(t){return t}var _=i(915),f=i(6514);function p(t,e,i,n){const s=(0,_.RG)(e)/i[0],r=(0,_.Oq)(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function m(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,u.qE)(n,i/2,2*e)}function x(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,l){if(void 0!==r){const o=n?p(t,n,a,s):t;return i&&l?m(r,o,e):(0,u.qE)(r,e,o)}}}var v=i(4498),y=i(3474),E=i(1064);class T extends n.A{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.Av)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.RJ)(),t.center&&(t.center=(0,a.Ad)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.SD)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in r.A)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,r=void 0!==t.maxZoom?t.maxZoom:28;const l=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,d=void 0!==t.showFullExtent&&t.showFullExtent,g=(0,a.Av)(t.projection,"EPSG:3857"),v=g.getExtent();let y=t.constrainOnlyCenter,E=t.extent;if(h||E||!g.isGlobal()||(y=!1,E=v),void 0!==t.resolutions){const o=t.resolutions;i=o[s],n=void 0!==o[r]?o[r]:o[o.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?p(l,i,o,n):l;if(a)return e?m(s,c,h):(0,u.qE)(s,h,c);const d=Math.min(c,s),g=Math.floor((0,f.FT)(t,d,r));return t[g]>c&&g1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[s.A.INTERACTING]>0}cancelAnimations(){let t;this.setHint(s.A.ANIMATING,-this.hints_[s.A.ANIMATING]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const l=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===l?s.targetResolution:s.sourceResolution+l*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===l?(0,u.xP)(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+l*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(s.A.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&A(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,h.e$)(i,t-this.getRotation()),(0,h.WQ)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.te)(t,this.getProjection()):t}getCenterInternal(){return this.get(r.A.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.JR)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,c.v)(e,"The view center is not defined");const i=this.getResolution();(0,c.v)(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return(0,c.v)(void 0!==n,"The view rotation is not defined"),(0,_.Bg)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(r.A.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.SD)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,_.RG)(t)/e[0],n=(0,_.Oq)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(r.A.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=S(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=(0,f.FT)(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,u.qE)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,u.qE)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,c.v)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,c.v)(!(0,_.Im)(t),"Cannot fit empty extent provided as `geometry`");const e=(0,a.SD)(t,this.getProjection());i=(0,E.VY)(e)}else if("Circle"===t.getType()){const e=(0,a.SD)(t.getExtent(),this.getProjection());i=(0,E.VY)(e),i.rotate(this.getRotation(),(0,_.q1)(e))}else{const e=(0,a.Tf)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=s.length;t{i.d(e,{A:()=>n});const n={ANIMATING:0,INTERACTING:1}},9015:(t,e,i)=>{i.d(e,{A:()=>n});const n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},6514:(t,e,i)=>{function n(t,e,i){let n,r;i=i||s;let o=0,a=t.length,l=!1;for(;o>1),r=+i(t[n],e),r<0?o=n+1:(a=n,l=!r);return l?o:~o}function s(t,e){return t>e?1:te?-1:0}function o(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s0?s-1:s}return n-1}if(i>0){for(let i=1;i0||i&&0===r)}))}i.d(e,{El:()=>n,FT:()=>o,V_:()=>s,WC:()=>c,X$:()=>l,aI:()=>h,gI:()=>a,rG:()=>r})},588:(t,e,i)=>{function n(t,e){if(!t)throw new Error(e)}i.d(e,{v:()=>n})},3730:(t,e,i)=>{i.d(e,{_j:()=>T,oJ:()=>_,sH:()=>E,cD:()=>y,S8:()=>A,eE:()=>v,dI:()=>C,fu:()=>x});const n={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var s={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};s.max=s.whitepoint[2].D65,s.rgb=function(t,e){e=e||s.whitepoint[2].E;var i,n,r,o=t[0]/e[0],a=t[1]/e[1],l=t[2]/e[2];return n=-.96924363628087*o+1.87596750150772*a+.041555057407175*l,r=.055630079696993*o+-.20397695888897*a+1.056971514242878*l,i=(i=3.240969941904521*o+-1.537383177570093*a+-.498610760293*l)>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,[255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},n.xyz=function(t,e){var i=t[0]/255,n=t[1]/255,r=t[2]/255,o=.21263900587151*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.71516867876775*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.072192315360733*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92),a=.019330818715591*i+.11919477979462*n+.95053215224966*r;return[(.41239079926595*i+.35758433938387*n+.18048078840183*r)*(e=e||s.whitepoint[2].E)[0],o*e[1],a*e[2]]};const r=s,o={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,i){var n,s,o,a,l,h,c,u,d;return o=t[0],a=t[1],l=t[2],0===o?[0,0,0]:(e=e||"D65",i=i||2,n=a/(13*o)+4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2]))||0,s=l/(13*o)+9*u/(c+15*u+3*d)||0,[9*(h=o>8?u*Math.pow((o+16)/116,3):u*o*.0011070564598794539)*n/(4*s)||0,h,h*(12-3*n-20*s)/(4*s)||0])}};r.luv=function(t,e,i){var n,s,o,a,l,h,c,u,d,g,_;e=e||"D65",i=i||2,g=4*(c=r.whitepoint[i][e][0])/(c+15*(u=r.whitepoint[i][e][1])+3*(d=r.whitepoint[i][e][2])),_=9*u/(c+15*u+3*d),n=4*(a=t[0])/(a+15*(l=t[1])+3*(h=t[2]))||0,s=9*l/(a+15*l+3*h)||0;var f=l/u;return[o=f<=.008856451679035631?903.2962962962961*f:116*Math.pow(f,1/3)-16,13*o*(n-g),13*o*(s-_)]};var a={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]},xyz:function(t){return o.xyz(a.luv(t))}};const l=a;o.lchuv=function(t){var e=t[0],i=t[1],n=t[2],s=Math.sqrt(i*i+n*n),r=360*Math.atan2(n,i)/2/Math.PI;return r<0&&(r+=360),[e,s,r]},r.lchuv=function(t){return o.lchuv(r.luv(t))};const h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c=function(t){var e,i,n=[],s=1;if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"==typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),h[t])n=h[t].slice(),i="rgb";else if("transparent"===t)s=0,i="rgb",n=[0,0,0];else if("#"===t[0]){var r=t.slice(1),o=r.length;s=1,o<=4?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],4===o&&(s=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],8===o&&(s=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var a=e[1],l="cmyk"===(i=a.replace(/a$/,""))?4:"gray"===i?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=n.shift()),s=(n=n.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===i?255*t:"h"===i[0]?100*t:"l"!==i[0]||e?"lab"===i?125*t:"lch"===i?e<2?150*t:360*t:"o"!==i[0]||e?"oklab"===i?.4*t:"oklch"===i?e<2?.4*t:360*t:t:t:100*t;if("h"===i[e]||2===e&&"h"===i[i.length-1]){if(void 0!==u[t])return u[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)}))).length>l?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),i=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:i,values:n,alpha:s}};var u={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};const d={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,i,n,s,r,o=t[0]/360,a=t[1]/100,l=t[2]/100,h=0;if(0===a)return[r=255*l,r,r];for(e=2*l-(i=l<.5?l*(1+a):l+a-l*a),s=[0,0,0];h<3;)(n=o+1/3*-(h-1))<0?n++:n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,s[h++]=255*r;return s}};n.hsl=function(t){var e,i,n=t[0]/255,s=t[1]/255,r=t[2]/255,o=Math.min(n,s,r),a=Math.max(n,s,r),l=a-o;return a===o?e=0:n===a?e=(s-r)/l:s===a?e=2+(r-n)/l:r===a&&(e=4+(n-s)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+a)/2,[e,100*(a===o?0:i<=.5?l/(a+o):l/(2-a-o)),100*i]};var g=i(1597);function _(t){return"string"==typeof t?t:C(t)}const f=1024,p={};let m=0;function x(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function v(t){const e=r.lchuv(n.xyz(t));return e[3]=t[3],e}function y(t){const e=r.rgb(l.xyz(t));return e[3]=t[3],e}function E(t){if(p.hasOwnProperty(t))return p[t];if(m>=f){let t=0;for(const e in p)3&t++||(delete p[e],--m)}const e=function(t){var e;Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var i=c(t);if(!i.space)return[];const s="h"===i.space[0]?d.min:n.min,r="h"===i.space[0]?d.max:n.max;return(e=Array(3))[0]=Math.min(Math.max(i.values[0],s[0]),r[0]),e[1]=Math.min(Math.max(i.values[1],s[1]),r[1]),e[2]=Math.min(Math.max(i.values[2],s[2]),r[2]),"h"===i.space[0]&&(e=d.rgb(e)),e.push(Math.min(Math.max(i.alpha,0),1)),e}(t);if(4!==e.length)throw new Error('failed to parse "'+t+'" as color');for(const i of e)if(isNaN(i))throw new Error('failed to parse "'+t+'" as color');return A(e),p[t]=e,++m,e}function T(t){return Array.isArray(t)?t:E(t)}function A(t){return t[0]=(0,g.qE)(t[0]+.5|0,0,255),t[1]=(0,g.qE)(t[1]+.5|0,0,255),t[2]=(0,g.qE)(t[2]+.5|0,0,255),t[3]=(0,g.qE)(t[3],0,1),t}function C(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}},7295:(t,e,i)=>{i.d(e,{F:()=>l});var n=i(6141),s=i(8711),r=i(7907),o=i(2241),a=i(3730);function l(t){return t?Array.isArray(t)?(0,a.dI)(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return o.ue.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,i=o.ue.getPattern(e,void 0,t.color);if(i)return i;const a=o.ue.get(t.src,"anonymous",null);if(a.getImageState()!==n.A.LOADED)return null;const l=(0,s.Y)(t.size[0],t.size[1]);return l.drawImage(a.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),(0,r.J)(l.canvas,e,void 0,n.A.LOADED,t.color,!0),o.ue.getPattern(e,void 0,t.color)}(t):t:null}},4422:(t,e,i)=>{i.d(e,{R8:()=>r,z3:()=>o});const n={info:1,warn:2,error:3,none:4};let s=n.info;function r(...t){s>n.warn||console.warn(...t)}function o(...t){s>n.error||console.error(...t)}},7456:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(972),s=i(6837),r=i(5176),o=i(6514),a=i(8711),l=i(4238);class h extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",o=void 0!==t.collapseLabel?t.collapseLabel:"›",a=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=a):this.collapseLabel_=o;const l=void 0!==t.label?t.label:"i";"string"==typeof l?(this.label_=document.createElement("span"),this.label_.textContent=l,this.label_.className=n):this.label_=l;const h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(h),this.toggleButton_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const c=e+" "+r.XI+" "+r.$N+(this.collapsed_&&this.collapsible_?" "+r.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=this.getMap().getAllLayers(),i=Array.from(new Set(e.flatMap((e=>e.getAttributions(t)))));if(!this.overrideCollapsible_){const t=!e.some((t=>!1===t.getSource()?.getAttributionsCollapsible()));this.setCollapsible(t)}return i}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map((t=>(0,l.hq)((()=>t))))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,o.aI)(e,this.renderedAttributions_)){(0,a.gS)(this.ulElement_);for(let t=0,i=e.length;t{i.d(e,{A:()=>l});var n=i(4120),s=i(2585),r=i(4238),o=i(9438);class a extends n.A{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let t=0,e=this.listenerKeys.length;t{i.d(e,{A:()=>_});var n=i(972),s=i(6837),r=i(3116),o=i(5176),a=i(9438),l=i(8711);const h=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];class c extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;const i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;const n=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=n,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${o.XI} ${o.$N}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(u(e))if(d(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{let i;i=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():g(t)}(i):g(i)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=d(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,l.fo)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,l.fo)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(r.A.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let e=0,i=t.length;e{i.d(e,{A:()=>u});var n=i(972),s=i(613),r=i(3407),o=i(9438),a=i(6933);const l="projection",h="coordinateFormat";class c extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.className=void 0!==t.className?t.className:"ol-mouse-position",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un,this.addChangeListener(l,this.handleProjectionChanged_),t.coordinateFormat&&this.setCoordinateFormat(t.coordinateFormat),t.projection&&this.setProjection(t.projection),this.renderOnMouseOut_=void 0!==t.placeholder,this.placeholder_=this.renderOnMouseOut_?t.placeholder:" ",this.renderedHTML_=e.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==t.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(h)}getProjection(){return this.get(l)}handleMouseMove(t){const e=this.getMap();this.updateHTML_(e.getEventPixel(t))}handleMouseOut(t){this.updateHTML_(null)}setMap(t){if(super.setMap(t),t){const e=t.getViewport();this.listenerKeys.push((0,o.KT)(e,s.A.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,o.KT)(e,s.A.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(t){this.set(h,t)}setProjection(t){this.set(l,(0,r.Jt)(t))}updateHTML_(t){let e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){const t=this.getProjection();this.transform_=t?(0,r.FO)(this.mapProjection_,t):r.R6}const i=this.getMap().getCoordinateFromPixelInternal(t);if(i){const t=(0,r.Tf)();if(t&&(this.transform_=(0,r.FO)(this.mapProjection_,t)),this.transform_(i,i),this.wrapX_){const e=t||this.getProjection()||this.mapProjection_;(0,a.Li)(i,e)}const n=this.getCoordinateFormat();e=n?n(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)}render(t){const e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}}const u=c},6950:(t,e,i)=>{i.d(e,{A:()=>v});var n=i(71),s=i(972),r=i(6837),o=i(2961),a=i(2585),l=i(3116),h=i(8450),c=i(1795),u=i(3568),d=i(9015),g=i(5176),_=i(915),f=i(9438),p=i(1064),m=i(8711);class x extends s.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===t.collapsed||t.collapsed,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==t.rotateWithView&&t.rotateWithView,this.viewExtent_=void 0;const e=void 0!==t.className?t.className:"ol-overviewmap",i=void 0!==t.tipLabel?t.tipLabel:"Overview map",s=void 0!==t.collapseLabel?t.collapseLabel:"‹";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s):this.collapseLabel_=s;const a=void 0!==t.label?t.label:"›";"string"==typeof a?(this.label_=document.createElement("span"),this.label_.textContent=a):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=i,h.appendChild(l),h.addEventListener(r.A.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const u=new o.A({view:t.view,controls:new n.A,interactions:new n.A});this.ovmap_=u,t.layers&&t.layers.forEach((function(t){u.addLayer(t)}));const d=document.createElement("div");d.className="ol-overviewmap-box",d.style.boxSizing="border-box",this.boxOverlay_=new c.A({position:[0,0],positioning:"center-center",element:d}),this.ovmap_.addOverlay(this.boxOverlay_);const _=e+" "+g.XI+" "+g.$N+(this.collapsed_&&this.collapsible_?" "+g.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),f=this.element;f.className=_,f.appendChild(this.ovmapDiv_),f.appendChild(h);const p=this,m=this.boxOverlay_,x=this.boxOverlay_.getElement(),v=function(t){const e={clientX:(i=t).clientX,clientY:i.clientY};var i;const n=u.getEventCoordinate(e);m.setPosition(n)},y=function(t){const e=u.getEventCoordinateInternal(t);p.getMap().getView().setCenterInternal(e),window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",y)};this.ovmapDiv_.addEventListener("pointerdown",(function(){event.target===x&&window.addEventListener("pointermove",v),window.addEventListener("pointerup",y)}))}setMap(t){const e=this.getMap();if(t!==e){if(e){const t=e.getView();t&&this.unbindView_(t),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,f.KT)(t,h.A.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const e=t.getView();e&&this.bindView_(e),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===l.A.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const i=this.getMap().getView();this.bindView_(i)}else this.ovmap_.isRendered()||t.key!==l.A.TARGET&&t.key!==l.A.SIZE||this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new u.Ay({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_(),t.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())}unbindView_(t){t.removeChangeListener(d.A.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView().calculateExtentInternal(i);if(this.viewExtent_&&(0,_.aI)(n,this.viewExtent_))return;this.viewExtent_=n;const s=e.getSize(),r=e.getView().calculateExtentInternal(s),o=e.getPixelFromCoordinateInternal((0,_.Py)(n)),a=e.getPixelFromCoordinateInternal((0,_.k_)(n)),l=Math.abs(o[0]-a[0]),h=Math.abs(o[1]-a[1]),c=s[0],u=s[1];l<.1*c||h<.1*u||l>.75*c||h>.75*u?this.resetExtent_():(0,_.ms)(r,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),s=e.getView(),r=Math.log(7.5)/Math.LN2,o=1/(.1*Math.pow(2,r/2));(0,_.Af)(n,o),s.fitInternal((0,p.VY)(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),s=e.getView(),r=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenter(),h=n.getResolution(),c=s.getResolution(),u=i[0]*h/c,d=i[1]*h/c;if(o.setPosition(l),a){a.style.width=u+"px",a.style.height=d+"px";const t="rotate("+r+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,f.Jz)(this.ovmap_,a.A.POSTRENDER,(t=>{delete this.ovmapPostrenderKey_,this.updateBox_()})))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(g.nT),this.collapsed_?(0,m.fo)(this.collapseLabel_,this.label_):(0,m.fo)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}}const v=x},2898:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const o=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=o,a.appendChild(this.label_),a.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+r.XI+" "+r.$N,h=this.element;h.className=l,h.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(r.Si)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.vT}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(r.Si);t||0!==i?t&&0!==i&&this.element.classList.remove(r.Si):this.element.classList.add(r.Si)}this.label_.style.transform=t}this.rotation_=i}}const l=a},3965:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(972),s=i(5176),r=i(3407);const o="units",a=[1,2,5],l=25.4/.28;class h extends n.A{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+s.XI,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(o,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(o)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(o,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),s="degrees"==n?"degrees":"m";let o=(0,r.hO)(i,t.resolution,e,s);const h=this.minWidth_*(this.dpi_||l)/l,c=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||l)/l:void 0;let u=h*o,d="";if("degrees"==n){const t=r.Ig.degrees;u*=t,u=c){g=p,_=m,f=x;break}if(_>=h)break;p=g,m=_,x=f,++v}const y=this.scaleBar_?this.createScaleBar(_,g,d):g.toFixed(f<0?-f:0)+" "+d;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=_&&(this.innerElement_.style.width=_+"px",this.renderedWidth_=_),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),s=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),r=this.scaleBarSteps_,o=t/r,a=[this.createMarker("absolute")];for(let n=0;n
`+this.createMarker("relative")+(n%2==0||2===r?this.createStepText(n,t,!1,e,i):"")+"")}return a.push(this.createStepText(r,t,!0,e,i)),(this.scaleBarText_?`
`+s+"
":"")+a.join("")}createMarker(t){return`
`}createStepText(t,e,i,n,s){const r=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+s);return`
`+r+"
"}getScaleForResolution(){return(0,r.hO)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||l)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}}const c=h},9186:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(972),s=i(6837),r=i(5176),o=i(3474);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",o=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",a=void 0!==t.zoomInLabel?t.zoomInLabel:"+",l=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",h=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",c=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=n,u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof a?document.createTextNode(a):a),u.addEventListener(s.A.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener(s.A.CLICK,this.handleClick_.bind(this,-i),!1);const g=e+" "+r.XI+" "+r.$N,_=this.element;_.className=g,_.appendChild(u),_.appendChild(d),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:o.vT})):e.setZoom(n)}}}const l=a},9439:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(972),s=i(6837),r=i(613),o=i(5176),a=i(1597),l=i(3474),h=i(9438),c=i(1685);class u extends n.A{constructor(t){super({target:(t=t||{}).target,element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=0,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+o.XI;const n=this.element;n.className=e+" "+o.XI+" "+o.$N,n.appendChild(i),n.addEventListener(r.A.POINTERDOWN,this.handleDraggerStart_.bind(this),!1),n.addEventListener(r.A.POINTERMOVE,this.handleDraggerDrag_.bind(this),!1),n.addEventListener(r.A.POINTERUP,this.handleDraggerEnd_.bind(this),!1),n.addEventListener(s.A.CLICK,this.handleContainerClick_.bind(this),!1),i.addEventListener(s.A.CLICK,c.dG,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const s=t.firstElementChild,r=getComputedStyle(s),o=s.offsetWidth+parseFloat(r.marginRight)+parseFloat(r.marginLeft),a=s.offsetHeight+parseFloat(r.marginTop)+parseFloat(r.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=1,this.widthLimit_=e-o):(this.direction_=0,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),s=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:s,duration:this.duration_,easing:l.vT})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,h.KT)(i,r.A.POINTERMOVE,t,this),(0,h.KT)(i,r.A.POINTERUP,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(h.JH),this.dragListenerKeys_.length=0)}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;1==this.direction_?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,(0,a.qE)(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){const e=this.getMap().getView().getValueForResolutionFunction();return(0,a.qE)(1-e(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}}const d=u},1727:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(972),s=i(6837),r=i(5176),o=i(3407),a=i(1064);class l extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",o=document.createElement("button");o.setAttribute("type","button"),o.title=n,o.appendChild("string"==typeof i?document.createTextNode(i):i),o.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+r.XI+" "+r.$N,l=this.element;l.className=a,l.appendChild(o)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?(0,o.SD)(this.extent,t.getProjection()):t.getProjection().getExtent();t.fitInternal((0,a.VY)(e))}}const h=l},6933:(t,e,i)=>{i.d(e,{$x:()=>_,Io:()=>g,Li:()=>f,U$:()=>p,WQ:()=>o,aI:()=>h,aP:()=>l,e$:()=>c,hG:()=>d,hs:()=>u,sG:()=>a});var n=i(915),s=i(1597),r=i(2806);function o(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function a(t,e){const i=t[0],n=t[1],s=e[0],r=e[1],o=s[0],a=s[1],l=r[0],h=r[1],c=l-o,u=h-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,_;return d<=0?(g=o,_=a):d>=1?(g=l,_=h):(g=o+d*c,_=a+d*u),[g,_]}function l(t,e,i){const n=(0,s.xP)(e+180,360)-180,o=Math.abs(3600*n),a=i||0;let l=Math.floor(o/3600),h=Math.floor((o-3600*l)/60),c=(0,s.Mg)(o-3600*l-60*h,a);c>=60&&(c=0,h+=1),h>=60&&(h=0,l+=1);let u=l+"°";return 0===h&&0===c||(u+=" "+(0,r.H)(h,2)+"′"),0!==c&&(u+=" "+(0,r.H)(c,2,a)+"″"),0!==n&&(u+=" "+t.charAt(n<0?1:0)),u}function h(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function c(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function u(t,e){return t[0]*=e,t[1]*=e,t}function d(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function g(t,e){return Math.sqrt(d(t,e))}function _(t,e){return d(t,a(t,e))}function f(t,e){if(e.canWrapX()){const i=(0,n.RG)(e.getExtent()),s=p(t,e,i);s&&(t[0]-=s*i)}return t}function p(t,e,i){const s=e.getExtent();let r=0;return e.canWrapX()&&(t[0]s[2])&&(i=i||(0,n.RG)(s),r=Math.floor((t[0]-s[0])/i)),r}},5176:(t,e,i)=>{i.d(e,{$N:()=>a,K5:()=>u,Q5:()=>s,Si:()=>n,Vv:()=>o,XI:()=>r,nT:()=>l});const n="ol-hidden",s="ol-selectable",r="ol-unselectable",o="ol-unsupported",a="ol-control",l="ol-collapsed",h=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),c=["style","variant","weight","size","lineHeight","family"],u=function(t){const e=t.match(h);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=c.length;t{i.d(e,{DK:()=>h,Gq:()=>l,WM:()=>d,Y:()=>s,Yg:()=>a,fo:()=>c,gS:()=>u,lr:()=>o});var n=i(7771);function s(t,e,i,s){let r;return r=i&&i.length?i.shift():n.Wl?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",s)}let r;function o(){return r||(r=s(1,1)),r}function a(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function l(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function h(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function c(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function u(t){for(;t.lastChild;)t.lastChild.remove()}function d(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}},3474:(t,e,i)=>{function n(t){return Math.pow(t,3)}function s(t){return 1-n(1-t)}function r(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{T9:()=>r,a6:()=>n,sn:()=>o,vT:()=>s})},9438:(t,e,i)=>{i.d(e,{JH:()=>o,Jz:()=>r,KT:()=>s});var n=i(3530);function s(t,e,i,n,s){if(s){const s=i;i=function(){t.removeEventListener(e,i),s.apply(n??this,arguments)}}else n&&n!==t&&(i=i.bind(n));const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function r(t,e,i,n){return s(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.I)(t))}},1685:(t,e,i)=>{function n(t){t.stopPropagation()}i.d(e,{Ay:()=>s,dG:()=>n});const s=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}},6837:(t,e,i)=>{i.d(e,{A:()=>n});const n={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},9332:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(25),s=i(1685),r=i(4238),o=i(3530);class a extends n.A{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new s.Ay(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});let h;i in a||(a[i]=0,l[i]=0),++a[i];for(let t=0,e=n.length;t0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=r.tV,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}const l=a},8704:(t,e,i)=>{i.d(e,{A4:()=>E,GB:()=>x,Gk:()=>u,IO:()=>h,Js:()=>l,Kg:()=>v,Q7:()=>a,TS:()=>p,Zm:()=>g,at:()=>d,eL:()=>c,fs:()=>T,k5:()=>m,qG:()=>f,t5:()=>_,tE:()=>y});var n=i(3445),s=i(4238),r=i(7771),o=i(588);function a(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n{i.d(e,{DG:()=>y,Fq:()=>u,SR:()=>E,T8:()=>a,Ye:()=>P,ZD:()=>A,_D:()=>v,cT:()=>h,go:()=>p,mE:()=>c,qA:()=>d,qg:()=>T,wl:()=>l});var n=i(6514),s=i(3730),r=i(4401);let o=0;const a=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},C={[A.Get]:L(R(1,1/0),(function(t,e,i){const n=t.length-1,s=new Array(n);for(let e=0;ee)throw new Error(`expected ${e===1/0?`${t} or more`:`${t} to ${e}`} arguments for ${r}, got ${o}`)}}function w(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r{i.d(e,{uZ:()=>x,nR:()=>v,VO:()=>c,Lm:()=>g,z0:()=>p,$R:()=>l,Tl:()=>_,Sl:()=>f});const n=class{constructor(t,e){this.name=t,this.data=e,this.texture_=null}getTexture(t){if(!this.texture_){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_}delete(t){this.texture_&&t.deleteTexture(this.texture_),this.texture_=null}};var s=i(9825),r=i(2323),o=i(3730),a=i(4401);function l(t){const e=t.toString();return e.includes(".")?e:e+".0"}function h(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(l).join(", ")})`}function c(t){const e=(0,o._j)(t),i=e.length>3?e[3]:1;return h([e[0]/255*i,e[1]/255*i,e[2]/255*i,i])}const u={};let d=0;function g(t){return t in u||(u[t]=d++),u[t]}function _(t){return l(g(t))}function f(t){return"u_var_"+t}function p(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{}}}const m="getBandValue",x="u_paletteTextures";function v(t,e,i,n){return T((0,s.qg)(t,e,i),e,n)}function y(t){return(e,i,n)=>{const s=i.args.length,r=new Array(s);for(let t=0;t{const i=e.args[0].value;return i in t.properties||(t.properties[i]={name:i,type:e.type}),(t.inFragmentShader?"v_prop_":"a_prop_")+i},[s.ZD.GeometryType]:(t,e,i)=>{const n="geometryType";return n in t.properties||(t.properties[n]={name:n,type:s.cT,evaluator:t=>(0,s.Ye)(t.getGeometry())}),(t.inFragmentShader?"v_prop_":"a_prop_")+n},[s.ZD.Var]:(t,e)=>{const i=e.args[0].value;return i in t.variables||(t.variables[i]={name:i,type:e.type}),f(i)},[s.ZD.Resolution]:()=>"u_resolution",[s.ZD.Zoom]:()=>"u_zoom",[s.ZD.Time]:()=>"u_time",[s.ZD.Any]:y((t=>`(${t.join(" || ")})`)),[s.ZD.All]:y((t=>`(${t.join(" && ")})`)),[s.ZD.Not]:y((([t])=>`(!${t})`)),[s.ZD.Equal]:y((([t,e])=>`(${t} == ${e})`)),[s.ZD.NotEqual]:y((([t,e])=>`(${t} != ${e})`)),[s.ZD.GreaterThan]:y((([t,e])=>`(${t} > ${e})`)),[s.ZD.GreaterThanOrEqualTo]:y((([t,e])=>`(${t} >= ${e})`)),[s.ZD.LessThan]:y((([t,e])=>`(${t} < ${e})`)),[s.ZD.LessThanOrEqualTo]:y((([t,e])=>`(${t} <= ${e})`)),[s.ZD.Multiply]:y((t=>`(${t.join(" * ")})`)),[s.ZD.Divide]:y((([t,e])=>`(${t} / ${e})`)),[s.ZD.Add]:y((t=>`(${t.join(" + ")})`)),[s.ZD.Subtract]:y((([t,e])=>`(${t} - ${e})`)),[s.ZD.Clamp]:y((([t,e,i])=>`clamp(${t}, ${e}, ${i})`)),[s.ZD.Mod]:y((([t,e])=>`mod(${t}, ${e})`)),[s.ZD.Pow]:y((([t,e])=>`pow(${t}, ${e})`)),[s.ZD.Abs]:y((([t])=>`abs(${t})`)),[s.ZD.Floor]:y((([t])=>`floor(${t})`)),[s.ZD.Ceil]:y((([t])=>`ceil(${t})`)),[s.ZD.Round]:y((([t])=>`floor(${t} + 0.5)`)),[s.ZD.Sin]:y((([t])=>`sin(${t})`)),[s.ZD.Cos]:y((([t])=>`cos(${t})`)),[s.ZD.Atan]:y((([t,e])=>void 0!==e?`atan(${t}, ${e})`:`atan(${t})`)),[s.ZD.Sqrt]:y((([t])=>`sqrt(${t})`)),[s.ZD.Match]:y((t=>{const e=t[0],i=t[t.length-1];let n=null;for(let s=t.length-3;s>=1;s-=2)n=`(${e} == ${t[s]} ? ${t[s+1]} : ${n||i})`;return n})),[s.ZD.Between]:y((([t,e,i])=>`(${t} >= ${e} && ${t} <= ${i})`)),[s.ZD.Interpolate]:y((([t,e,...i])=>{let n="";for(let s=0;s{const e=t[t.length-1];let i=null;for(let n=t.length-3;n>=0;n-=2)i=`(${t[n]} ? ${t[n+1]} : ${i||e})`;return i})),[s.ZD.In]:y((([t,...e],i)=>{const n=function(t,e){return`operator_in_${Object.keys(e.functions).length}`}(0,i),s=[];for(let t=0;t`vec${t.length}(${t.join(", ")})`)),[s.ZD.Color]:y((t=>{if(1===t.length)return`vec4(vec3(${t[0]} / 255.0), 1.0)`;if(2===t.length)return`(${t[1]} * vec4(vec3(${t[0]} / 255.0), 1.0))`;const e=t.slice(0,3).map((t=>`${t} / 255.0`));return 3===t.length?`vec4(${e.join(", ")}, 1.0)`:`(${t[3]} * vec4(${e.join(", ")}, 1.0))`})),[s.ZD.Band]:y((([t,e,i],n)=>{if(!(m in n.functions)){let t="";const e=n.bandCount||1;for(let i=0;i{const[i,...r]=e.args,a=r.length,l=new Uint8Array(4*a);for(let t=0;t0)return l(t.value);if((t.type&s.T8)>0)return t.value.toString();if((t.type&s.cT)>0)return _(t.value.toString());if((t.type&s.mE)>0)return c(t.value);if((t.type&s.Fq)>0)return h(t.value);if((t.type&s.qA)>0)return n=t.value,h((0,a.xq)(n));var n;throw new Error(`Unexpected expression ${t.value} (expected type ${(0,s.go)(e)})`)}},915:(t,e,i)=>{i.d(e,{$C:()=>y,$u:()=>N,Af:()=>G,Bg:()=>I,HY:()=>O,Im:()=>k,Ld:()=>a,Li:()=>B,Mx:()=>z,N:()=>g,NW:()=>j,Oq:()=>L,Py:()=>M,QJ:()=>U,R:()=>S,R8:()=>E,RG:()=>D,Rj:()=>c,S5:()=>d,Tr:()=>s,UG:()=>C,Vy:()=>p,WU:()=>F,X$:()=>v,Ym:()=>l,_N:()=>P,aI:()=>m,aZ:()=>_,bE:()=>x,dP:()=>f,k_:()=>R,ms:()=>h,o8:()=>o,q1:()=>w,qF:()=>b,r:()=>r,sB:()=>A,vz:()=>u});var n=i(1580);function s(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;ir&&(h|=n.A.RIGHT),lo&&(h|=n.A.ABOVE),h===n.A.UNKNOWN&&(h=n.A.INTERSECTING),h}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function _(t){return g(1/0,1/0,-1/0,-1/0,t)}function f(t,e){const i=t[0],n=t[1];return g(i,n,i,n,e)}function p(t,e,i,n,s){return E(_(s),t,e,i,n)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e,i){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function y(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function E(t,e,i,n,s){for(;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function k(t){return t[2]=a&&p<=h),s||!(o&n.A.RIGHT)||r&n.A.RIGHT||(m=_-(g-h)*f,s=m>=l&&m<=c),s||!(o&n.A.BELOW)||r&n.A.BELOW||(p=g-(_-l)/f,s=p>=a&&p<=h),s||!(o&n.A.LEFT)||r&n.A.LEFT||(m=_-(g-a)*f,s=m>=l&&m<=c)}return s}function j(t,e,i,n){if(k(t))return _(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r=i[2])){const e=D(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function U(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];B(t,e);const s=D(n);if(D(t)>s&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-s,t[3]]]}return[t]}},1580:(t,e,i)=>{i.d(e,{A:()=>n});const n={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},1142:(t,e,i)=>{i.d(e,{m8:()=>r,nF:()=>o});var n=i(4238);let s=!1;function r(t,e,i,n,r,o,a){const l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(l.responseType="arraybuffer"),l.withCredentials=s,l.onload=function(t){if(!l.status||l.status>=200&&l.status<300){const t=e.getType();try{let n;"text"==t||"json"==t?n=l.responseText:"xml"==t?n=l.responseXML||l.responseText:"arraybuffer"==t&&(n=l.response),n?o(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):a()}catch{a()}}else a()},l.onerror=a,l.send()}function o(t,e){return function(i,s,o,a,l){const h=this;r(t,e,i,s,o,(function(t,e){h.addFeatures(t),void 0!==a&&a(t)}),l||n.tV)}}},6067:(t,e,i)=>{i.d(e,{A:()=>V});var n=i(4087);function s(t,e){return r(t,e,[]).join("")}function r(t,e,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?i.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(t.nodeValue);else{let n;for(n=t.firstChild;n;n=n.nextSibling)r(n,e,i)}return i}function o(t,e){return function(i,n){const s=t.call(e??this,i,n);void 0!==s&&n[n.length-1].push(s)}}function a(t,e,i){return function(n,s){const r=t.call(i??this,n,s);if(void 0!==r){const t=s[s.length-1],i=void 0!==e?e:n.localName;let o;i in t?o=t[i]:(o=[],t[i]=o),o.push(r)}}}function l(t,e,i){return function(n,s){const r=t.call(i??this,n,s);void 0!==r&&(s[s.length-1][void 0!==e?e:n.localName]=r)}}function h(t,e,i){let n,s;for(i=void 0!==i?i:{},n=0,s=t.length;n{i.d(e,{B4:()=>a,W8:()=>r,hq:()=>l,rT:()=>s,tV:()=>o});var n=i(6514);function s(){return!0}function r(){return!1}function o(){}function a(t){let e,i,s;return function(){const r=Array.prototype.slice.call(arguments);return i&&this===s&&(0,n.aI)(r,i)||(s=this,i=r,e=t.apply(this,arguments)),e}}function l(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},7430:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(4120),s=i(4087),r=i(9703),o=i(915),a=i(3407),l=i(4238),h=i(7622);const c=(0,r.vt)();class u extends n.A{constructor(){super(),this.extent_=(0,o.S5)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.B4)(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,s.b0)()}closestPointXY(t,e,i,n){return(0,s.b0)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,s.b0)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.aZ)(t),this.extentRevision_=this.getRevision()}return(0,o.$u)(this.extent_,t)}rotate(t,e){(0,s.b0)()}scale(t,e,i){(0,s.b0)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,s.b0)()}getType(){return(0,s.b0)()}applyTransform(t){(0,s.b0)()}intersectsExtent(t){return(0,s.b0)()}translate(t,e){(0,s.b0)()}transform(t,e){const i=(0,a.Jt)(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const l=i.getExtent(),u=i.getWorldExtent(),d=(0,o.Oq)(u)/(0,o.Oq)(l);return(0,r.Zz)(c,u[0],u[3],d,-d,0,0,0),(0,h.Rc)(t,0,t.length,s,c,n),(0,a.RG)(i,e)(t,n,s)}:(0,a.RG)(i,e);return this.applyTransform(n),this}}const d=u},4338:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(6837),s=i(7430),r=i(915),o=i(9438);class a extends s.A{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(o.JH),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;et.clone()))}const h=a},1217:(t,e,i)=>{i.d(e,{A:()=>f});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6514),h=i(1374),c=i(6361),u=i(9969),d=i(4350),g=i(904);class _ extends n.Ay{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){(0,l.X$)(this.flatCoordinates,t),this.changed()}clone(){const t=new _(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,h.j)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,u.gr)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,c.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,u.SH)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,g.k)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new _(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,d.gp)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const f=_},6702:(t,e,i)=>{i.d(e,{A:()=>_});var n=i(1217),s=i(2096),r=i(3953),o=i(915),a=i(2497),l=i(3671),h=i(6514),c=i(6361),u=i(9969),d=i(4350);class g extends s.Ay{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,s=e.length;t{i.d(e,{A:()=>u});var n=i(4294),s=i(2096),r=i(915),o=i(2497),a=i(6514),l=i(6361),h=i(1597);class c extends s.Ay{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,a.X$)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new c(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,r.Ld)(this.getExtent(),t,e))return n;const s=this.flatCoordinates,o=this.stride;for(let r=0,a=s.length;r{i.d(e,{A:()=>v});var n=i(503),s=i(1064),r=i(2096),o=i(3953),a=i(915),l=i(2497),h=i(6514),c=i(2616),u=i(6361),d=i(4350),g=i(3402),_=i(8609),f=i(4049),p=i(2845),m=i(3671);class x extends r.Ay{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,s=[],r=[];for(let t=0,e=n.length;t{i.d(e,{A:()=>l});var n=i(2096),s=i(915),r=i(2497),o=i(1597);class a extends n.Ay{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=(0,o.hG)(t,e,s[0],s[1]);if(r{i.d(e,{kj:()=>T,Ay:()=>E,nD:()=>C,VY:()=>A});var n=i(2096),s=i(3953),r=i(915),o=i(2497),a=i(3671),l=i(6361),h=i(8609);class c extends n.Ay{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new c(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,h.eN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,l.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new c(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const u=c;var d=i(4294),g=i(6514),_=i(2616),f=i(4350),p=i(3402),m=i(2845),x=i(1597),v=i(2490);class y extends n.Ay{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,g.X$)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new y(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.HX)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.oW)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,m.zb)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,h.PK)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,p.ug)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,l.cD)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,r.q1)(this.getExtent());this.flatInteriorPoint_=(0,_.J)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new d.A(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new u(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r{i.d(e,{Ay:()=>u,dn:()=>h,p0:()=>l,v7:()=>c});var n=i(7430),s=i(4087),r=i(915),o=i(7622);class a extends n.A{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return(0,r.Vy)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,s.b0)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length{function n(t,e,i,n){let s=0;const r=t[i-n],o=t[i-n+1];let a=0,l=0;for(;er,PK:()=>s,eN:()=>n})},4049:(t,e,i)=>{i.d(e,{C:()=>s});var n=i(915);function s(t,e,i,s){const r=[];let o=(0,n.S5)();for(let a=0,l=i.length;a{i.d(e,{HX:()=>o,MD:()=>r,c:()=>a,n:()=>l,oW:()=>h,te:()=>c});var n=i(1597);function s(t,e,i,s,r,o,a){const l=t[e],h=t[e+1],c=t[i]-l,u=t[i+1]-h;let d;if(0===c&&0===u)d=e;else{const g=((r-l)*c+(o-h)*u)/(c*c+u*u);if(g>1)d=i;else{if(g>0){for(let r=0;rr&&(r=l),o=i,a=s}return r}function o(t,e,i,n,s){for(let o=0,a=i.length;o{i.d(e,{Gd:()=>a,a_:()=>r,t7:()=>s,zb:()=>o});var n=i(915);function s(t,e,i,s,o){return!(0,n.sB)(o,(function(n){return!r(t,e,i,s,n[0],n[1])}))}function r(t,e,i,n,s,r){let o=0,a=t[i-n],l=t[i-n+1];for(;er&&(i-a)*(r-l)-(s-a)*(n-l)>0&&o++:n<=r&&(i-a)*(r-l)-(s-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function o(t,e,i,n,s,o){if(0===i.length)return!1;if(!r(t,e,i[0],n,s,o))return!1;for(let e=1,a=i.length;e{function n(t,e,i,n){for(let n=0,s=i.length;nr,_n:()=>n,d6:()=>o,z2:()=>s})},6361:(t,e,i)=>{function n(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;or,cD:()=>s,n2:()=>n})},2616:(t,e,i)=>{i.d(e,{J:()=>r,p:()=>o});var n=i(6514),s=i(2845);function r(t,e,i,r,o,a,l){let h,c,u,d,g,_,f;const p=o[a+1],m=[];for(let n=0,s=i.length;nv&&(u=(d+g)/2,(0,s.zb)(t,e,i,r,u,p)&&(x=u,v=n)),d=g}return isNaN(x)&&(x=o[a]),l?(l.push(x,p,v),l):[x,p,v]}function o(t,e,i,n,s){let o=[];for(let a=0,l=i.length;a{i.d(e,{L8:()=>a,SH:()=>r,gr:()=>o});var n=i(6514),s=i(1597);function r(t,e,i,r,o,a,l){let h,c;const u=(i-e)/r;if(1===u)h=e;else if(2===u)h=e,c=o;else if(0!==u){let s=t[e],a=t[e+1],l=0;const u=[0];for(let n=e+r;n1?l:2,a=a||new Array(l);for(let e=0;e>1;r{i.d(e,{HT:()=>h,Wp:()=>c,fB:()=>a,gp:()=>o,sj:()=>l});var n=i(915),s=i(1374),r=i(2845);function o(t,e,i,r,o){const a=(0,n.R8)((0,n.S5)(),t,e,i,r);return!!(0,n.HY)(o,a)&&(!!(0,n.ms)(o,a)||a[0]>=o[0]&&a[2]<=o[2]||a[1]>=o[1]&&a[3]<=o[3]||(0,s.j)(t,e,i,r,(function(t,e){return(0,n.Mx)(o,t,e)})))}function a(t,e,i,n,s){for(let r=0,a=i.length;r{function n(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;an})},3402:(t,e,i)=>{function n(t,e,i,n){for(;e0}function r(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,a=i.length;oh,PA:()=>r,mb:()=>o,ug:()=>a,NK:()=>l})},1374:(t,e,i)=>{function n(t,e,i,n,s){let r;for(e+=n;en})},3671:(t,e,i)=>{i.d(e,{AL:()=>r,Hg:()=>l,P4:()=>s,n$:()=>o,sx:()=>h});var n=i(1597);function s(t,e,i,s,r,o,a){const l=(i-e)/s;if(l<3){for(;e0;){const i=c.pop(),o=c.pop();let a=0;const l=t[o],d=t[o+1],g=t[i],_=t[i+1];for(let e=o+s;ea&&(u=e,a=r)}a>r&&(h[(u-e)/s]=1,o+s0&&f>g)&&(_<0&&p<_||_==p||_>0&&p>_)?(l=i,h=d):(r[a++]=l,r[a++]=h,c=l,u=h,l=i,h=d)}return r[a++]=l,r[a++]=h,a}function l(t,e,i,n,s,r,o,l){for(let h=0,c=i.length;h{function n(t,e,i,n,s,r){r=r||[];let o=0;for(let a=e;an,Tl:()=>o,e$:()=>s,hs:()=>r})},7771:(t,e,i)=>{i.d(e,{DT:()=>c,FT:()=>d,Wl:()=>h,XM:()=>u,_p:()=>s,cr:()=>l,ew:()=>a,j:()=>o,oF:()=>r});const n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",s=n.includes("firefox"),r=n.includes("safari")&&!n.includes("chrom")&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),o=n.includes("webkit")&&!n.includes("edge"),a=n.includes("macintosh"),l="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,h="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,u="function"==typeof createImageBitmap,d=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},6068:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==s.A.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();(0,n.D2)(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}const o=r},422:(t,e,i)=>{i.d(e,{A:()=>g});var n=i(1685),s=i(1409),r=i(25),o=i(1064);class a extends r.A{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new o.Ay([i])}getGeometry(){return this.geometry_}}const l=a;var h=i(8704);const c="boxcancel";class u extends n.Ay{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class d extends s.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new l(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:h.at,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new u("boxdrag",t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new u(e?"boxend":c,t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new u("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new u(c,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}const g=d},4473:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(1409),s=i(4238),r=i(8704),o=i(3474),a=i(6933);class l extends n.A{constructor(t){super({stopDown:s.W8}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:(0,r.Q7)(r.TS,r.fs);this.condition_=t.onFocusOnly?(0,r.Q7)(r.eL,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,s=e.getEventPixel((0,n.v)(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(s[0],s[1]),this.lastCentroid){const e=[this.lastCentroid[0]-s[0],s[1]-this.lastCentroid[1]],i=t.map.getView();(0,a.hs)(e,i.getResolution()),(0,a.e$)(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=s,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),a=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:o.vT})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const h=l},4051:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(1409),s=i(4238),r=i(8704),o=i(4498);class a extends n.A{constructor(t){t=t||{},super({stopDown:s.W8}),this.condition_=t.condition?t.condition:r.IO,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!(0,r.A4)(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===o.b8)return;const n=e.getSize(),s=t.pixel,a=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=a-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=a}handleUpEvent(t){return!(0,r.A4)(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!(0,r.A4)(t)&&(!(!(0,r.at)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}}const l=a},4423:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(422),s=i(3474),r=i(8704);class o extends n.A{constructor(t){super({condition:(t=t||{}).condition?t.condition:r.Kg,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:s.vT})}}const a=o},9964:(t,e,i)=>{i.d(e,{Ay:()=>W});var n=i(2096),s=i(915),r=i(2497),o=i(7622);class a extends n.Ay{constructor(t,e,i){super(),void 0!==i&&void 0===e?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){const t=new a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=t-s[0],o=e-s[1],a=r*r+o*o;if(a=e[0]||t[1]<=e[1]&&t[3]>=e[1]||(0,s.sB)(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i=i?t[e-i]:t[e]}function O(t,e,i){let n,s;eo)return F(B(t,n),B(t,s));let a=0;n=i?n-=i:n<0&&(n+=i);let r=n+1;r>=i&&(r-=i);const o=t[n],a=o[0],l=o[1],h=t[r];return[a+(h[0]-a)*s,l+(h[1]-l)*s]}class U extends E.A{constructor(t){const e=t;e.stopDown||(e.stopDown=S.W8),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:S.rT,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=(t,e,i)=>{const n=e||new l([NaN,NaN]),s=(0,L.Ad)(t[0],i),r=(0,I.hG)(s,(0,L.Ad)(t[t.length-1],i));n.setCenterAndRadius(s,Math.sqrt(r),this.geometryLayout_);const o=(0,L.Tf)();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=y.A:"LineString"===t?e=_.A:"Polygon"===t&&(e=T.Ay),i=(i,n,s)=>(n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n)}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new A.A({source:new C.A({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:X(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:R.TS,this.freehandCondition_,t.freehand?this.freehandCondition_=R.Gk:this.freehandCondition_=t.freehandCondition?t.freehandCondition:R.Kg,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(g.A.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?R.Gk:t:R.Zm,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===c.A.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===p.A.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&t.type===p.A.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===p.A.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===p.A.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===p.A.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===p.A.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===p.A.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new f.A(p.A.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,s.Tr)([i,n]),o=this.traceSource_.getFeaturesInExtent(r);if(0===o.length)return;const a=function(t,e){const i=[];for(let n=0;nt.endIndex||!i&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e=r;--e)n.push(D(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&(0,I.Io)(e.startPx,t.pixel)i.startIndex?hi.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const t=B(h.coordinates,l),s=i.getPixelFromCoordinate(t);(0,I.Io)(s,e.startPx)>n&&(c=!1)}if(c){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(ithis.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,s=[this.finishCoordinate_];const r=this.mode_;if("Point"===r)i=!0;else if("Circle"===r)i=2===this.sketchCoords_.length;else if("LineString"===r)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,s=[t[0][0],t[0][t[0].length-2]],s=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,r=s.length;n=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),this.geometryFunction_(s,e,i)):"Polygon"===r&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),n&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n?this.finishDrawing():this.sketchFeature_}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let s=0;s=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return null;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();return"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new x.A([e])):"MultiLineString"===this.type_?t.setGeometry(new m.A([e])):"MultiPolygon"===this.type_&&t.setGeometry(new v.A([e])),this.dispatchEvent(new M("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t),t}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new M("drawabort",t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;e{i.d(e,{Ay:()=>h,D2:()=>l,e4:()=>a});var n=i(4120),s=i(2187),r=i(3474);class o extends n.A{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(s.A.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(s.A.ACTIVE,t)}setMap(t){this.map_=t}}function a(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:r.sn,center:t.getConstrainedCenter(s)})}}function l(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:r.vT})}const h=o},9888:(t,e,i)=>{i.d(e,{A:()=>u});var n=i(6837),s=i(6292);const r="ArrowLeft",o="ArrowRight",a="ArrowDown";var l=i(8704),h=i(6933);class c extends s.Ay{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return(0,l.TS)(t)&&(0,l.tE)(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==a||n==r||n==o||"ArrowUp"==n)){const l=t.map.getView(),c=l.getResolution()*this.pixelDelta_;let u=0,d=0;n==a?d=-c:n==r?u=-c:n==o?u=c:d=c;const g=[u,d];(0,h.e$)(g,l.getRotation()),(0,s.e4)(l,g,this.duration_),i.preventDefault(),e=!0}}return!e}}const u=c},6856:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(6837),s=i(6292),r=i(8704);class o extends s.Ay{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!(0,r.GB)(t)&&(0,r.tE)(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==n.A.KEYDOWN||t.type==n.A.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,o="+"===n?this.delta_:-this.delta_,a=r.getView();(0,s.D2)(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const a=o},9132:(t,e,i)=>{i.d(e,{A:()=>M});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(6717),l=i(3445),h=i(4294),c=i(1409),u=i(5902),d=i(8280),g=i(2757),_=i(731),f=i(8704),p=i(915),m=i(6933),x=i(9276),v=i(6514),y=i(1064),E=i(3407),T=i(4087);const A=[0,0,0,0],C=[],S="modifyend";class R extends r.Ay{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class w extends c.A{constructor(t){let e;if(super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:f.fs,this.defaultDeleteCondition_=function(t){return(0,f.Js)(t)&&(0,f.t5)(t)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:f.Gk,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new u.A,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new g.A({source:new _.A({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:P(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,t.features?e=t.features:t.source&&(this.source_=t.source,e=new n.A(this.source_.getFeatures()),this.source_.addEventListener(d.A.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(d.A.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(s.A.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(s.A.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===t.snapToPointer?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(o.A.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new n.A;const i=this.featuresBeingModified_.getArray();for(let t=0,n=e.length;t=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n=0;--t)this.insertVertex_(s[t],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),s=i.featureSegments[0],r=i.featureSegments[1];s.segment[0]=e,s.segment[1]=e,r.segment[0]=e,r.segment[1]=e,this.rBush_.update((0,p.dP)(e),s);let o=n;const a=(0,E.Tf)();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=(0,y.nD)(o).transform(e,a)}this.rBush_.update(o.getExtent(),r)}else this.rBush_.update((0,p.Tr)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new R(S,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),s=e.getView().getProjection(),r=function(t,e){return I(n,t,s)-I(n,e,s)};let o,l;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{i&&"Point"===i.getType()&&(i=new h.A((0,E.te)(i.getCoordinates(),s)));const n=i||t.getGeometry();if(t instanceof a.A&&this.features_.getArray().includes(t)){l=n;const e=t.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:l,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=(0,E.SD)((0,p.dP)(n,A),s),i=e.getView().getResolution()*this.pixelTolerance_,r=(0,E.JR)((0,p.r)(t,i,A),s);o=this.rBush_.getInExtent(r)}if(o&&o.length>0){const i=o.sort(r)[0],a=i.segment;let h=L(n,i,s);const c=e.getPixelFromCoordinate(h);let u=(0,m.Io)(t,c);if(l||u<=this.pixelTolerance_){const t={};if(t[(0,T.v6)(a)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(a[0]),s=e.getPixelFromCoordinate(a[1]),r=(0,m.hG)(c,n),l=(0,m.hG)(c,s);u=Math.sqrt(Math.min(r,l)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=r>l?a[1]:a[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[(0,T.v6)(i.geometry)]=!0;for(let e=1,i=o.length;e=0;--o)s=t[o],u=s[0],d=(0,T.v6)(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===s[1]?(e[d].right=u,e[d].index=u.index):1==s[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,l=e[d].left,a=e[d].index,h=a-1,u=void 0!==l?l:c,h<0&&(h=0),r=u.geometry,n=r.getCoordinates(),i=n,g=!1,r.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(r,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==l&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:e};this.rBush_.insert((0,p.Tr)(t.segment),t)}this.updateSegmentIndices_(r,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(s){s.geometry===t&&(void 0===i||void 0===s.depth||(0,v.aI)(s.depth,i))&&s.index>e&&(s.index+=n)}))}}function b(t,e){return t.index-e.index}function I(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let s=n;if(1===e.index){const e=(0,E.Tf)();e&&(s=s.clone().transform(e,i));const n=(0,m.hG)(s.getCenter(),(0,E.Ad)(t,i)),r=Math.sqrt(n)-s.getRadius();return r*r}}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,m.$x)(s,C)}function L(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&1===e.index){let e=n;const s=(0,E.Tf)();return s&&(e=e.clone().transform(s,i)),(0,E.te)(e.getClosestPoint((0,E.Ad)(t,i)),i)}const s=(0,E.Ad)(t,i);return C[0]=(0,E.Ad)(e.segment[0],i),C[1]=(0,E.Ad)(e.segment[1],i),(0,E.te)((0,m.sG)(s,C),i)}function P(){const t=(0,x.mY)();return function(e,i){return t.Point}}const M=w},8751:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(6837),s=i(6292),r=i(7771),o=i(8704),a=i(1597);class l extends s.Ay{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:o.Gk;this.condition_=t.onFocusOnly?(0,o.Q7)(o.eL,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==n.A.WHEEL)return!0;const e=t.map,i=t.originalEvent;let s;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==n.A.WHEEL&&(s=i.deltaY,r._p&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=r.cr),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),0===s)return!1;this.lastDelta_=s;const o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=e.getView();if("trackpad"===this.mode_&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,a.qE)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,s.D2)(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const h=l},3711:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(1409),s=i(4238),r=i(4498);class o extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],s=this.targetPointers[1],o=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=o;const a=t.map,l=a.getView();l.getConstraints().rotation!==r.b8&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel((0,n.v)(this.targetPointers))),this.rotating_&&(a.render(),l.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const a=o},5243:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(1409),s=i(4238);class r extends n.A{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=s.W8),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel((0,n.v)(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const o=r},1409:(t,e,i)=>{i.d(e,{A:()=>a,v:()=>o});var n=i(6292),s=i(3445);class r extends n.Ay{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==s.A.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==s.A.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==s.A.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==s.A.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function o(t){const e=t.length;let i=0,n=0;for(let s=0;s{i.d(e,{A:()=>n});const n={ACTIVE:"active"}},4458:(t,e,i)=>{i.d(e,{A:()=>g});var n=i(71),s=i(1685),r=i(6717),o=i(2187),a=i(1409),l=i(4238),h=i(8704),c=i(3407);class u extends s.Ay{constructor(t,e,i,n,s){super(t),this.features=e,this.coordinate=i,this.startCoordinate=n,this.mapBrowserEvent=s}}class d extends a.A{constructor(t){let e;if(super(t=t||{}),this.on,this.once,this.un,this.lastCoordinate_=null,this.startCoordinate_=null,this.features_=void 0!==t.features?t.features:null,t.layers&&!this.features_)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=l.rT;this.layerFilter_=e,this.filter_=t.filter&&!this.features_?t.filter:l.rT,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.condition_=t.condition?t.condition:h.Gk,this.lastFeature_=null,this.addChangeListener(o.A.ACTIVE,this.handleActiveChanged_)}handleDownEvent(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translatestart",e,t.coordinate,this.startCoordinate_,t)),!0}return!1}handleUpEvent(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);const e=this.features_||new n.A([this.lastFeature_]);return this.dispatchEvent(new u("translateend",e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1}handleDragEvent(t){if(this.lastCoordinate_){const e=t.coordinate,i=t.map.getView().getProjection(),s=(0,c.Ad)(e,i),r=(0,c.Ad)(this.lastCoordinate_,i),o=s[0]-r[0],a=s[1]-r[1],l=this.features_||new n.A([this.lastFeature_]),h=(0,c.Tf)();l.forEach((function(t){const e=t.getGeometry();h?(e.transform(h,i),e.translate(o,a),e.transform(i,h)):e.translate(o,a),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new u("translating",l,e,this.startCoordinate_,t))}}handleMoveEvent(t){const e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")}featuresAtPixel_(t,e){return e.forEachFeatureAtPixel(t,((t,e)=>{if(t instanceof r.A&&this.filter_(t,e)&&(!this.features_||this.features_.getArray().includes(t)))return t}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})}getHitTolerance(){return this.hitTolerance_}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();super.setMap(t),this.updateState_(e)}handleActiveChanged_(){this.updateState_(null)}updateState_(t){let e=this.getMap();const i=this.getActive();e&&i||(e=e||t,!e)||e.getViewport().classList.remove("ol-grab","ol-grabbing")}}const g=d},8620:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(4120),s=i(5332),r=i(4087),o=i(588),a=i(1597);class l extends n.A{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[s.A.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.v)("number"==typeof e[s.A.OPACITY],"Layer opacity must be a number"),e[s.A.VISIBLE]=void 0===t.visible||t.visible,e[s.A.Z_INDEX]=t.zIndex,e[s.A.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[s.A.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[s.A.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[s.A.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.qE)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return(0,r.b0)()}getLayerStatesArray(t){return(0,r.b0)()}getExtent(){return this.get(s.A.EXTENT)}getMaxResolution(){return this.get(s.A.MAX_RESOLUTION)}getMinResolution(){return this.get(s.A.MIN_RESOLUTION)}getMinZoom(){return this.get(s.A.MIN_ZOOM)}getMaxZoom(){return this.get(s.A.MAX_ZOOM)}getOpacity(){return this.get(s.A.OPACITY)}getSourceState(){return(0,r.b0)()}getVisible(){return this.get(s.A.VISIBLE)}getZIndex(){return this.get(s.A.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(s.A.EXTENT,t)}setMaxResolution(t){this.set(s.A.MAX_RESOLUTION,t)}setMinResolution(t){this.set(s.A.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(s.A.MAX_ZOOM,t)}setMinZoom(t){this.set(s.A.MIN_ZOOM,t)}setOpacity(t){(0,o.v)("number"==typeof t,"Layer opacity must be a number"),this.set(s.A.OPACITY,t)}setVisible(t){this.set(s.A.VISIBLE,t)}setZIndex(t){this.set(s.A.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const h=l},2808:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(764),s=i(5360);class r extends n.A{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(s.A.PRELOAD)}setPreload(t){this.set(s.A.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(s.A.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(s.A.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const o=r},2284:(t,e,i)=>{i.d(e,{A:()=>Y});var n=i(764),s=i(48),r=i(9276),o=i(7733),a=i(3628),l=i(9700),h=i(6936),c=i(953),u=i(1426),d=i(9825),g=i(3730);function _(t,e,i){return f((0,d.qg)(t,e,i),i)}function f(t,e){if(t instanceof d._D){if(t.type===d.mE&&"string"==typeof t.value){const e=(0,g.sH)(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case d.ZD.Number:case d.ZD.String:case d.ZD.Coalesce:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;e{const n=t.args;let s=i.properties[e];for(let t=1,e=n.length;tt.variables[e];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case d.ZD.Id:return t=>t.featureId;case d.ZD.GeometryType:return t=>t.geometryType;case d.ZD.Concat:{const i=t.args.map((t=>f(t,e)));return t=>"".concat(...i.map((e=>e(t).toString())))}case d.ZD.Resolution:return t=>t.resolution;case d.ZD.Any:case d.ZD.All:case d.ZD.Between:case d.ZD.In:case d.ZD.Not:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{for(let e=0;e{for(let e=0;e{const e=s[0](t),i=s[1](t),n=s[2](t);return e>=i&&e<=n};case d.ZD.In:return t=>{const e=s[0](t);for(let i=1;i!s[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}(t,e);case d.ZD.Equal:case d.ZD.NotEqual:case d.ZD.LessThan:case d.ZD.LessThanOrEqualTo:case d.ZD.GreaterThan:case d.ZD.GreaterThanOrEqualTo:return function(t,e){const i=t.operator,n=f(t.args[0],e),s=f(t.args[1],e);switch(i){case d.ZD.Equal:return t=>n(t)===s(t);case d.ZD.NotEqual:return t=>n(t)!==s(t);case d.ZD.LessThan:return t=>n(t)n(t)<=s(t);case d.ZD.GreaterThan:return t=>n(t)>s(t);case d.ZD.GreaterThanOrEqualTo:return t=>n(t)>=s(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}(t,e);case d.ZD.Multiply:case d.ZD.Divide:case d.ZD.Add:case d.ZD.Subtract:case d.ZD.Clamp:case d.ZD.Mod:case d.ZD.Pow:case d.ZD.Abs:case d.ZD.Floor:case d.ZD.Ceil:case d.ZD.Round:case d.ZD.Sin:case d.ZD.Cos:case d.ZD.Atan:case d.ZD.Sqrt:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{let e=1;for(let i=0;is[0](t)/s[1](t);case d.ZD.Add:return t=>{let e=0;for(let i=0;is[0](t)-s[1](t);case d.ZD.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(en?n:e};case d.ZD.Mod:return t=>s[0](t)%s[1](t);case d.ZD.Pow:return t=>Math.pow(s[0](t),s[1](t));case d.ZD.Abs:return t=>Math.abs(s[0](t));case d.ZD.Floor:return t=>Math.floor(s[0](t));case d.ZD.Ceil:return t=>Math.ceil(s[0](t));case d.ZD.Round:return t=>Math.round(s[0](t));case d.ZD.Sin:return t=>Math.sin(s[0](t));case d.ZD.Cos:return t=>Math.cos(s[0](t));case d.ZD.Atan:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case d.ZD.Sqrt:return t=>Math.sqrt(s[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}(t,e);case d.ZD.Case:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s{for(let e=0;e{const e=n[0](t);for(let s=1;s{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a=s)return 2===a?l:h?m(e,s,r,o,i,l):p(e,s,r,o,i,l);r=i,o=l}return o}}(t,e);case d.ZD.ToString:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i{const i=s[0](e);return t.args[0].type===d.mE?(0,g.dI)(i):i.toString()};throw new Error(`Unsupported convert operator ${i}`)}(t,e);default:throw new Error(`Unsupported operator ${i}`)}}function p(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i;return n+(1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1))*(r-n)}function m(t,e,i,n,s,r){if(0==s-i)return n;const o=(0,g.eE)(n),a=(0,g.eE)(r);let l=a[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const h=[p(t,e,i,o[0],s,a[0]),p(t,e,i,o[1],s,a[1]),o[2]+p(t,e,i,0,s,l),p(t,e,i,n[3],s,r[3])];return(0,g.S8)((0,g.cD)(h))}var x=i(3530),v=i(4401);function y(t){return!0}function E(t){const e=(0,d.SR)(),i=t.length,n=new Array(i);for(let s=0;snull;n=b(t,e+"fill-color",i)}if(!n)return null;const s=new a.A;return function(t){const e=n(t);return"none"===e?null:(s.setColor(e),s)}}function C(t,e,i){const n=S(t,e+"stroke-width",i),s=b(t,e+"stroke-color",i);if(!n&&!s)return null;const r=R(t,e+"stroke-line-cap",i),o=R(t,e+"stroke-line-join",i),a=I(t,e+"stroke-line-dash",i),l=S(t,e+"stroke-line-dash-offset",i),h=S(t,e+"stroke-miter-limit",i),u=new c.A;return function(t){if(s){const e=s(t);if("none"===e)return null;u.setColor(e)}if(n&&u.setWidth(n(t)),r){const e=r(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw new Error("Expected butt, round, or square line cap");u.setLineCap(e)}if(o){const e=o(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw new Error("Expected bevel, round, or miter line join");u.setLineJoin(e)}return a&&u.setLineDash(a(t)),l&&u.setLineDashOffset(l(t)),h&&u.setMiterLimit(h(t)),u}}function S(t,e,i){if(!(e in t))return;const n=_(t[e],d.wl,i);return function(t){return j(n(t),e)}}function R(t,e,i){if(!(e in t))return null;const n=_(t[e],d.cT,i);return function(t){return z(n(t),e)}}function w(t,e,i){if(!(e in t))return null;const n=_(t[e],d.T8,i);return function(t){const i=n(t);if("boolean"!=typeof i)throw new Error(`Expected a boolean for ${e}`);return i}}function b(t,e,i){if(!(e in t))return null;const n=_(t[e],d.mE,i);return function(t){return B(n(t),e)}}function I(t,e,i){if(!(e in t))return null;const n=_(t[e],d.Fq,i);return function(t){return G(n(t),e)}}function L(t,e,i){if(!(e in t))return null;const n=_(t[e],d.Fq,i);return function(t){const i=G(n(t),e);if(2!==i.length)throw new Error(`Expected two numbers for ${e}`);return i}}function P(t,e,i){if(!(e in t))return null;const n=_(t[e],d.Fq,i);return function(t){return U(n(t),e)}}function M(t,e,i){if(!(e in t))return null;const n=_(t[e],d.Fq|d.wl,i);return function(t){return i=n(t),s=e,"number"==typeof i?i:U(i,s);var i,s}}function F(t,e){const i=t[e];if(void 0!==i){if("number"!=typeof i)throw new Error(`Expected a number for ${e}`);return i}}function D(t,e){const i=t[e];if(void 0!==i){if("number"==typeof i)return(0,v.xq)(i);if(!Array.isArray(i))throw new Error(`Expected a number or size array for ${e}`);if(2!==i.length||"number"!=typeof i[0]||"number"!=typeof i[1])throw new Error(`Expected a number or size array for ${e}`);return i}}function O(t,e){const i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return i}}function k(t,e){const i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw new Error(`Expected pixels or fraction for ${e}`);return i}}function N(t,e){const i=t[e];if(void 0!==i){if("string"!=typeof i)throw new Error(`Expected a string for ${e}`);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw new Error(`Expected declutter, obstacle, or none for ${e}`);return i}}function G(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const i=t.length;for(let n=0;n4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function U(t,e){const i=G(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const X="renderOrder";class W extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(X)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter==0&&(t.declutter[i]=new s.A(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(X,t)}setStyle(t){this.style_=void 0===t?r.d1:t;const e=function(t){if(void 0===t)return r.d1;if(!t)return null;if("function"==typeof t)return t;if(t instanceof r.Ay)return t;if(!Array.isArray(t))return E([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof r.Ay){const i=new Array(e);for(let n=0;n{i.d(e,{A:()=>A});var n=i(71),s=i(3984),r=i(6717),o=i(3628),a=i(1217),l=i(4294),h=i(953),c=i(9276),u=i(1426),d=i(2757),g=i(731),_=i(915),f=i(1597),p=i(6933),m=i(3407),x=i(7331);function v(t,e,i){const n=[];let s=t(0),r=t(1),o=e(s),a=e(r);const l=[r,s],h=[a,o],c=[1,0],u={};let d,g,_,p,m,x,v=1e5;for(;--v>0&&c.length>0;)_=c.pop(),s=l.pop(),o=h.pop(),x=_.toString(),x in u||(n.push(o[0],o[1]),u[x]=!0),p=c.pop(),r=l.pop(),a=h.pop(),m=(_+p)/2,d=t(m),g=e(d),(0,f.Q1)(g[0],g[1],o[0],o[1],a[0],a[1]){const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new c.Ay({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new u.A({font:"12px Calibri,sans-serif",textAlign:"right",fill:new o.A({color:"rgba(0,0,0,1)"}),stroke:new h.A({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(s.A.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:E,this.setSource(new g.A({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new n.A,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new c.Ay({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,_.Li)(i,this.projection_),this.loadedExtent_&&((0,_.bE)(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),s=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=(0,_._N)(s,t);if(this.renderedExtent_&&(0,_.aI)(this.renderedExtent_,o)&&this.renderedResolution_===e)return;if(this.renderedExtent_=o,this.renderedResolution_=e,(0,_.Im)(o))return;const a=(0,_.q1)(o),l=e*e/4;(!this.projection_||!(0,m.tI)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(o,a,e,l);let h,c=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(c+=this.meridians_.length),this.parallelsLabels_&&(c+=this.parallels_.length);c>this.featurePool_.length;)h=new r.A,this.featurePool_.push(h);const u=n.getFeaturesCollection();u.clear();let d,g,f=0;for(d=0,g=this.meridians_.length;dMath.PI/2);const d=(0,x.r2)(t);for(let t=a;t<=l;++t){let i,n,c,g,_=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,c=this.meridiansLabels_.length;n=a?(t[0]=o[0],t[2]=o[2]):r=!0);const l=[(0,f.qE)(e[0],this.minX_,this.maxX_),(0,f.qE)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let c=(0,f.qE)(h[0],this.minLon_,this.maxLon_),u=(0,f.qE)(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,p,m,x,v=t;r||(v=[(0,f.qE)(t[0],this.minX_,this.maxX_),(0,f.qE)(t[1],this.minY_,this.maxY_),(0,f.qE)(t[2],this.minX_,this.maxX_),(0,f.qE)(t[3],this.minY_,this.maxY_)]);const y=(0,_.NW)(v,this.toLonLatTransform_,void 0,8);let E=y[3],T=y[2],A=y[1],C=y[0];if(r||((0,_.Ym)(v,this.bottomLeft_)&&(C=this.minLon_,A=this.minLat_),(0,_.Ym)(v,this.bottomRight_)&&(T=this.maxLon_,A=this.minLat_),(0,_.Ym)(v,this.topLeft_)&&(C=this.minLon_,E=this.maxLat_),(0,_.Ym)(v,this.topRight_)&&(T=this.maxLon_,E=this.maxLat_),E=(0,f.qE)(E,u,this.maxLat_),T=(0,f.qE)(T,c,this.maxLon_),A=(0,f.qE)(A,this.minLat_,u),C=(0,f.qE)(C,this.minLon_,c)),c=Math.floor(c/s)*s,x=(0,f.qE)(c,this.minLon_,this.maxLon_),p=this.addMeridian_(x,A,E,n,t,0),g=0,r)for(;(x-=s)>=C&&g++n[r]&&(s=r,r=1);const o=Math.max(e[1],n[s]),a=Math.min(e[3],n[r]),l=(0,f.qE)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[s-1]+(n[r-1]-n[s-1])*(l-n[s])/(n[r]-n[s]),l],c=this.meridiansLabels_[i].geom;return c.setCoordinates(h),c}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,s){const r=function(t,e,i,n,s){const r=(0,m.Jt)("EPSG:4326");return v((function(n){return[e+(i-e)*n,t]}),(0,m.RG)(r,n),s)}(t,e,i,this.projection_,n);let o=this.parallels_[s];return o?(o.setFlatCoordinates("XY",r),o.changed()):o=new a.A(r,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let s=0,r=n.length-2;n[s]>n[r]&&(s=r,r=0);const o=Math.max(e[0],n[s]),a=Math.min(e[2],n[r]),l=(0,f.qE)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[s+1]+(n[r+1]-n[s+1])*(l-n[s])/(n[r]-n[s])],c=this.parallelsLabels_[i].geom;return c.setCoordinates(h),c}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=(0,m.Jt)("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=(0,m.RG)(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const A=T},1905:(t,e,i)=>{i.d(e,{A:()=>z});var n=i(2284),s=i(8280),r=i(2703),o=i(259),a=i(492),l=i(6514);const h=new Uint8Array(4),c=class{constructor(t,e){this.helper_=t;const i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.depthbuffer_=i.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){(0,l.aI)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return h[0]=0,h[1]=0,h[2]=0,h[3]=0,h;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return h[0]=this.data_[4*i],h[1]=this.data_[4*i+1],h[2]=this.data_[4*i+2],h[3]=this.data_[4*i+3],h}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}};var u=i(130),d=i(9777);const g="GENERATE_POINT_BUFFERS";var _=i(9703),f=i(588),p=i(915);function m(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}var x=i(3407),v=i(4087),y=i(9438);class E extends a.A{constructor(t,e){const i=e.uniforms||{},n=(0,_.vt)();i[d.M8.PROJECTION_MATRIX]=n,super(t,{uniforms:i,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new o.Ay(u.H7,u.Be),this.indicesBuffer_=new o.Ay(u.IP,u.Be),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const r=e.attributes?e.attributes.map((function(t){return{name:"a_prop_"+t.name,size:1,type:d.jQ.FLOAT}})):[];this.attributes=[{name:"a_position",size:2,type:d.jQ.FLOAT},{name:"a_index",size:1,type:d.jQ.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:d.jQ.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:d.jQ.FLOAT})),this.attributes.push(...r),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=(0,p.S5)(),this.currentTransform_=n,this.renderTransform_=(0,_.vt)(),this.invertRenderTransform_=(0,_.vt)(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function(){const t='const t="GENERATE_POLYGON_BUFFERS",e="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function x(t,e){const n=(r=e)[0]*r[3]-r[1]*r[2];var r;!function(t,e){if(!t)throw new Error(e)}(0!==n,"Transformation matrix cannot be inverted");const x=e[0],o=e[1],u=e[2],i=e[3],f=e[4],s=e[5];return t[0]=i/n,t[1]=-o/n,t[2]=-u/n,t[3]=x/n,t[4]=(u*s-i*f)/n,t[5]=-(x*s-o*f)/n,t}function o(t,e,n=2){const r=e&&e.length,x=r?e[0]*n:t.length;let o=u(t,0,x,n,!0);const i=[];if(!o||o.next===o.prev)return i;let s,l,c;if(r&&(o=function(t,e,n,r){const x=[];for(let n=0,o=e.length;n80*n){s=1/0,l=1/0;let e=-1/0,r=-1/0;for(let o=n;oe&&(e=n),x>r&&(r=x)}c=Math.max(e-s,r-l),c=0!==c?32767/c:0}return f(o,i,n,s,l,c,0),i}function u(t,e,n,r,x){let o;if(x===function(t,e,n,r){let x=0;for(let o=e,u=n-r;o0)for(let x=e;x=e;x-=r)o=z(x/r|0,t[x],t[x+1],o);return o&&M(o,o.next)&&(F(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==d(r.prev,r,r.next))r=r.next;else{if(F(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function f(t,e,n,r,x,o,u){if(!t)return;!u&&o&&function(t,e,n,r){let x=t;do{0===x.z&&(x.z=v(x.x,x.y,e,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==t);x.prevZ.nextZ=null,x.prevZ=null,function(t){let e,n=1;do{let r,x=t;t=null;let o=null;for(e=0;x;){e++;let u=x,i=0;for(let t=0;t0||f>0&&u;)0!==i&&(0===f||!u||x.z<=u.z)?(r=x,x=x.nextZ,i--):(r=u,u=u.nextZ,f--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;x=u}o.nextZ=null,n*=2}while(e>1)}(x)}(t,r,x,o);let y=t;for(;t.prev!==t.next;){const h=t.prev,p=t.next;if(o?l(t,r,x,o):s(t))e.push(h.i,t.i,p.i),F(t),t=p.next,y=p.next;else if((t=p)===y){u?1===u?f(t=c(i(t),e),e,n,r,x,o,2):2===u&&a(t,e,n,r,x,o):f(i(t),e,n,r,x,o,1);break}}}function s(t){const e=t.prev,n=t,r=t.next;if(d(e,n,r)>=0)return!1;const x=e.x,o=n.x,u=r.x,i=e.y,f=n.y,s=r.y,l=xo?x>u?x:u:o>u?o:u,y=i>f?i>s?i:s:f>s?f:s;let h=r.next;for(;h!==e;){if(h.x>=l&&h.x<=a&&h.y>=c&&h.y<=y&&b(x,i,o,f,u,s,h.x,h.y)&&d(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function l(t,e,n,r){const x=t.prev,o=t,u=t.next;if(d(x,o,u)>=0)return!1;const i=x.x,f=o.x,s=u.x,l=x.y,c=o.y,a=u.y,y=if?i>s?i:s:f>s?f:s,g=l>c?l>a?l:a:c>a?c:a,Z=v(y,h,e,n,r),M=v(p,g,e,n,r);let w=t.prevZ,m=t.nextZ;for(;w&&w.z>=Z&&m&&m.z<=M;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;w&&w.z>=Z;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;m&&m.z<=M;){if(m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function c(t,e){let n=t;do{const r=n.prev,x=n.next.next;!M(r,x)&&w(r,n,n.next,x)&&E(r,x)&&E(x,r)&&(e.push(r.i,n.i,x.i),F(n),F(n.next),n=t=x),n=n.next}while(n!==t);return i(n)}function a(t,e,n,r,x,o){let u=t;do{let t=u.next.next;for(;t!==u.prev;){if(u.i!==t.i&&Z(u,t)){let s=I(u,t);return u=i(u,u.next),s=i(s,s.next),f(u,e,n,r,x,o,0),void f(s,e,n,r,x,o,0)}t=t.next}u=u.next}while(u!==t)}function y(t,e){return t.x-e.x}function h(t,e){const n=function(t,e){let n=e;const r=t.x,x=t.y;let o,u=-1/0;do{if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){const t=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>u&&(u=t,o=n.x=n.x&&n.x>=f&&r!==n.x&&b(xo.x||n.x===o.x&&p(o,n)))&&(o=n,l=e)}n=n.next}while(n!==i);return o}(t,e);if(!n)return e;const r=I(n,t);return i(r,r.next),i(n,n.next)}function p(t,e){return d(t.prev,t,e.prev)<0&&d(e.next,t,t.next)<0}function v(t,e,n,r,x){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){let e=t,n=t;do{(e.x=(t-u)*(o-i)&&(t-u)*(r-i)>=(n-u)*(e-i)&&(n-u)*(o-i)>=(x-u)*(r-i)}function Z(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){let n=t,r=!1;const x=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&x<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(d(t.prev,t,e.prev)||d(t,e.prev,e))||M(t,e)&&d(t.prev,t,t.next)>0&&d(e.prev,e,e.next)>0)}function d(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function M(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){const x=A(d(t,e,n)),o=A(d(t,e,r)),u=A(d(n,r,t)),i=A(d(n,r,e));return x!==o&&u!==i||(!(0!==x||!m(t,n,e))||(!(0!==o||!m(t,r,e))||(!(0!==u||!m(n,t,r))||!(0!==i||!m(n,e,r)))))}function m(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function E(t,e){return d(t.prev,t,t.next)<0?d(t,e,t.next)>=0&&d(t,t.prev,e)>=0:d(t,e,t.prev)<0||d(t,t.next,e)<0}function I(t,e){const n=P(t.i,t.x,t.y),r=P(e.i,e.x,e.y),x=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=x,x.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function z(t,e,n,r){const x=P(t,e,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function F(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function P(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}new Array(6);const B=[],N={vertexPosition:0,indexPosition:0};function R(t,e,n,r,x){t[e+0]=n,t[e+1]=r,t[e+2]=x}function S(t,e,n,r,x,o){const u=3+x,i=t[e+0],f=t[e+1],s=B;s.length=x;for(let n=0;n0?f:2*Math.PI-f}let Z=-1,d=-1,M=c;const w=null!==o;if(null!==x){Z=b(v,g,r(s,[...[t[x],t[x+1]]])),Math.cos(Z)<=.985&&(M+=Math.tan((Z-Math.PI)/2))}if(w){d=b(g,v,r(s,[...[t[o],t[o+1]]])),Math.cos(d)<=.985&&(M+=Math.tan((Math.PI-d)/2))}function m(t,e){return 0===e?1e4*t:Math.sign(e)*(1e4*t+Math.abs(e))}return u.push(h[0],h[1],p[0],p[1],Z,d,l,m(0,c)),u.push(...f),u.push(h[0],h[1],p[0],p[1],Z,d,l,m(1,c)),u.push(...f),u.push(h[0],h[1],p[0],p[1],Z,d,l,m(2,c)),u.push(...f),u.push(h[0],h[1],p[0],p[1],Z,d,l,m(3,c)),u.push(...f),i.push(y,y+1,y+2,y+1,y+3,y+2),{length:l+Math.sqrt((g[0]-v[0])*(g[0]-v[0])+(g[1]-v[1])*(g[1]-v[1])),angle:M}}function _(t,e,n,r,x){const u=2+x;let i=e;const f=t.slice(i,i+x);i+=x;const s=t[i++];let l=0;const c=new Array(s-1);for(let e=0;e{const o=r.data;switch(o.type){case e:{const t=3,e=2,n=o.customAttributesSize,r=e+n,x=new Float32Array(o.renderInstructions),u=x.length/r,i=4*u*(n+t),f=new Uint32Array(6*u),s=new Float32Array(i);let l;for(let t=0;t0?h=i+(n-1)*r:c&&(h=o-r);let p=null;n{const e=t.data;if(e.type===g){const i=e.projectionTransform;this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,(0,_.T9)(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const a=this.getLayer().getSource();this.sourceListenKeys_=[(0,y.KT)(a,s.A.ADDFEATURE,this.handleSourceFeatureAdded_,this),(0,y.KT)(a,s.A.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),(0,y.KT)(a,s.A.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),(0,y.KT)(a,s.A.CLEAR,this.handleSourceFeatureClear_,this)],a.forEachFeature((t=>{this.featureCache_[(0,v.v6)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new c(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[(0,v.v6)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[(0,v.v6)(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[i,n,s]=function(t,e){const i=t.viewState.projection,n=e.getSource().getWrapX()&&i.canWrapX(),s=i.getExtent(),r=t.extent,o=n?(0,p.RG)(s):null,a=n?Math.ceil((r[2]-s[2])/o)+1:1;return[n?Math.floor((r[0]-s[0])/o):0,a,o]}(t,this.getLayer());return this.renderWorlds(t,!1,i,n,s),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,i,n,s),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),i=e.getSource(),s=t.viewState,o=!t.viewHints[r.A.ANIMATING]&&!t.viewHints[r.A.INTERACTING],a=!(0,p.aI)(this.previousExtent_,t.extent),l=this.sourceRevision_ 0) {\n if (gl_FragColor.a < 0.05) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_parameters;\nattribute float a_distance;\nattribute vec2 a_joinAngles;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n float halfAngle = joinAngle / 2.0;\n float c = cos(halfAngle);\n float s = sin(halfAngle);\n vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n float length = 1.0 / s;\n return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n // if on a cap or the join angle is too high, offset the line along the segment normal\n if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n return point - normal * offsetPx;\n }\n // offset is applied along the inverted normal (positive offset goes "right" relative to line direction)\n return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n v_angleStart = a_joinAngles.x;\n v_angleEnd = a_joinAngles.y;\n float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);\n // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);\n\n float lineWidth = ${this.strokeWidthExpression_};\n float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n // compute segment start/end in px with offset\n vec2 segmentStartPx = worldToPx(a_segmentStart);\n vec2 segmentEndPx = worldToPx(a_segmentEnd);\n vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n \n // compute current vertex position\n float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n vec2 joinDirection;\n vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;\n // if angle is too high, do not make a proper join\n if (cos(angle) > 0.985 || isCap(angle)) {\n joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n } else {\n joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n }\n positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n gl_Position = pxToScreen(positionPx);\n\n v_segmentStart = segmentStartPx;\n v_segmentEnd = segmentEndPx;\n v_width = lineWidth;\n v_prop_hitColor = a_prop_hitColor;\n v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n vec2 tangent = normalize(end - start);\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 startToPoint = point - start;\n return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n float c = cos(joinAngle * 0.5);\n float s = sin(joinAngle * 0.5);\n float direction = -sign(sin(joinAngle));\n vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n float radius = width * 0.5 * s;\n return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n if (cos(joinAngle) > 0.985) { // avoid risking a division by zero\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n float miterLength = 1. / sin(joinAngle * 0.5);\n float miterLimit = ${this.strokeMiterLimitExpression_};\n if (miterLength > miterLimit) {\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n if (capType == ${(0,A.Tl)("butt")}) {\n return buttCapDistanceField(point, start, end);\n } else if (capType == ${(0,A.Tl)("square")}) {\n return squareCapDistanceField(point, start, end, width);\n }\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n if (joinType == ${(0,A.Tl)("bevel")}) {\n return bevelJoinField(point, start, end, width, joinAngle);\n } else if (joinType == ${(0,A.Tl)("miter")}) {\n return miterJoinDistanceField(point, start, end, width, joinAngle);\n }\n return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n if (isCap(joinAngle)) {\n return capDistanceField(point, start, end, width, capType);\n }\n return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nvoid main(void) {\n vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(currentPoint);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n\n float segmentLength = length(v_segmentEnd - v_segmentStart);\n vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;\n vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n vec2 startToPoint = currentPoint - v_segmentStart;\n float currentLengthPx = max(0., min(dot(segmentTangent, startToPoint), segmentLength)) + v_distanceOffsetPx; \n float currentRadiusPx = abs(dot(segmentNormal, startToPoint));\n float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;\n vec4 color = ${this.strokeColorExpression_} * u_globalAlpha;\n float capType = ${this.strokeCapExpression_};\n float joinType = ${this.strokeJoinExpression_};\n float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);\n float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);\n float distance = max(\n segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),\n max(segmentStartDistance, segmentEndDistance)\n );\n distance = max(distance, ${this.strokeDistanceFieldExpression_});\n gl_FragColor = color * smoothstep(0.5, -0.5, distance);\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}getFillVertexShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n v_prop_hitColor = a_prop_hitColor;\n${this.varyings_.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`${C}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n vec2 pxOrigin = worldToPx(u_patternOrigin);\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(pxPos);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_prop_hitColor;\n }\n}`:null}}var M=i(1597),F=i(8711);const D="blur",O="gradient",k="radius",N=["#00f","#0ff","#0f0","#ff0","#f00"];class G extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(O,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:N),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?t=>t.get(i):i,this.setRenderOrder(null)}getBlur(){return this.get(D)}getGradient(){return this.get(O)}getRadius(){return this.get(k)}handleGradientChanged_(){this.gradient_=function(t){const e=(0,F.Y)(1,256),i=e.createLinearGradient(0,0,1,256),n=1/(t.length-1);for(let e=0,s=t.length;e{const e=this.weightFunction_(t);return void 0!==e?(0,M.qE)(e,0,1):1}}],uniforms:{u_size:()=>2*(this.get(k)+this.get(D)),u_blurSlope:()=>this.get(k)/Math.max(1,this.get(D))},hitDetectionEnabled:!0,vertexShader:t.getSymbolVertexShader(),fragmentShader:t.getSymbolFragmentShader(),postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}const z=G},8044:(t,e,i)=>{i.d(e,{A:()=>_});var n=i(764);class s extends n.A{constructor(t){super(t=t||{})}}const r=s;var o=i(6769),a=i(6141),l=i(2703),h=i(9703),c=i(915),u=i(3407);class d extends o.A{constructor(t){super(t),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,r=this.getLayer().getSource(),o=t.viewHints;let h=t.extent;if(void 0!==e.extent&&(h=(0,c._N)(h,(0,u.SD)(e.extent,n.projection))),!o[l.A.ANIMATING]&&!o[l.A.INTERACTING]&&!(0,c.Im)(h))if(r){const t=n.projection,e=r.getImage(h,s,i,t);e&&(this.loadImage(e)?this.image=e:e.getState()===a.A.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,h.Bb)(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!(0,c.Ym)(s,n))return null;const r=this.image.getExtent(),o=this.image.getImage(),a=(0,c.RG)(r),l=Math.floor(o.width*((n[0]-r[0])/a));if(l<0||l>=o.width)return null;const u=(0,c.Oq)(r),d=Math.floor(o.height*((r[3]-n[1])/u));return d<0||d>=o.height?null:this.getImageData(o,l,d)}renderFrame(t,e){const i=this.image,n=i.getExtent(),s=i.getResolution(),[r,o]=Array.isArray(s)?s:[s,s],a=i.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],d=t.pixelRatio,g=t.viewState,_=g.center,f=g.resolution,p=d*r/(f*a),m=d*o/(f*a);this.prepareContainer(t,e);const x=this.context.canvas.width,v=this.context.canvas.height,y=this.getRenderContext(t);let E=!1,T=!0;if(l.extent){const e=(0,u.SD)(l.extent,g.projection);T=(0,c.HY)(e,t.extent),E=T&&!(0,c.ms)(e,t.extent),E&&this.clipUnrotated(y,t,e)}const A=i.getImage(),C=(0,h.Zz)(this.tempTransform,x/2,v/2,p,m,0,a*(n[0]-_[0])/r,a*(_[1]-n[3])/o);this.renderedResolution=o*d/a;const S=A.width*C[0],R=A.height*C[3];if(this.getLayer().getSource().getInterpolate()||(y.imageSmoothingEnabled=!1),this.preRender(y,t),T&&S>=.5&&R>=.5){const t=C[4],e=C[5],i=l.opacity;1!==i&&(y.save(),y.globalAlpha=i),y.drawImage(A,0,0,+A.width,+A.height,t,e,S,R),1!==i&&y.restore()}return this.postRender(this.context,t),E&&y.restore(),y.imageSmoothingEnabled=!0,this.container}}const g=d,_=class extends r{constructor(t){super(t)}createRenderer(){return new g(this)}getData(t){return super.getData(t)}}},764:(t,e,i)=>{i.d(e,{A:()=>g,l:()=>d});var n=i(8620),s=i(6837),r=i(5332),o=i(3984),a=i(3568),l=i(588),h=i(915),c=i(9438);class u extends n.A{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(r.A.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(r.A.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,c.JH)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,c.KT)(t,s.A.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.Ay?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return d(n,e.viewState)&&(!s||(0,h.HY)(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];const e=this.getSource()?.getAttributions();if(!e)return[];let i=e(t instanceof a.Ay?t.getViewStateAndExtent():t);return Array.isArray(i)||(i=[i]),i}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(r.A.MAP,t)}getMapInternal(){return this.get(r.A.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,c.JH)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,c.JH)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,c.KT)(t,o.A.PRECOMPOSE,(t=>{const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.v)(!e.some((function(t){return t.layer===i.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)})),this.mapRenderKey_=(0,c.KT)(this,s.A.CHANGE,t.render,t),this.changed())}setSource(t){this.set(r.A.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const g=u},5332:(t,e,i)=>{i.d(e,{A:()=>n});const n={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},945:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(2808),s=i(4029);class r extends n.A{constructor(t){super(t)}createRenderer(){return new s.A(this,{cacheSize:this.getCacheSize()})}}const o=r},5360:(t,e,i)=>{i.d(e,{A:()=>n});const n={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},2757:(t,e,i)=>{i.d(e,{A:()=>y});var n=i(2284),s=i(136),r=i(6769),o=i(7343),a=i(3984),l=i(2703),h=i(3663),c=i(915),u=i(8711),d=i(3608),g=i(6514),_=i(3407),f=i(4087),p=i(6933);class m extends r.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,c.S5)(),this.wrappedRenderedExtent_=(0,c.S5)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,a=s.resolution,h=s.projection,u=s.rotation,d=h.getExtent(),g=this.getLayer().getSource(),_=this.getLayer().getDeclutter(),f=e.pixelRatio,p=e.viewHints,m=!(p[l.A.ANIMATING]||p[l.A.INTERACTING]),x=this.context,v=Math.round((0,c.RG)(n)/a*f),y=Math.round((0,c.Oq)(n)/a*f),E=g.getWrapX()&&h.canWrapX(),T=E?(0,c.RG)(d):null,A=E?Math.ceil((n[2]-d[2])/T)+1:1;let C=E?Math.floor((n[0]-d[0])/T):0;do{let n=this.getRenderTransform(r,a,0,f,v,y,C*T);e.declutter&&(n=n.slice(0)),t.execute(x,[x.canvas.width,x.canvas.height],n,u,m,void 0===i?o.y2:i?o.$i:o.x$,i?_&&e.declutter[_]:void 0)}while(++C{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*h.tF,u=t[1]*h.tF;a.push(this.getRenderTransform(e,i,n,h.tF,l,u,0).slice());const g=o.getSource(),f=s.getExtent();if(g.getWrapX()&&s.canWrapX()&&!(0,c.ms)(f,r)){let t=r[0];const s=(0,c.RG)(f);let o,d=0;for(;tf[2];)++d,o=s*d,a.push(this.getRenderTransform(e,i,n,h.tF,l,u,o).slice()),t-=s}const p=(0,_.Tf)();this.hitDetectionImageData_=(0,h._7)(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n,(0,d.j)(i,this.renderedPixelRatio_),p?s:null)}e((0,h.F8)(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const r=(0,f.v6)(t),o=l[r];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,r,o,i,h,d&&e.declutter[d]?e.declutter[d].all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[l.A.ANIMATING],r=t.viewHints[l.A.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&n||!h&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const u=t.extent,f=t.viewState,m=f.projection,x=f.resolution,v=t.pixelRatio,y=e.getRevision(),E=e.getRenderBuffer();let T=e.getRenderOrder();void 0===T&&(T=d.Eo);const A=f.center.slice(),C=(0,c.r)(u,E*x),S=C.slice(),R=[C.slice()],w=m.getExtent();if(i.getWrapX()&&m.canWrapX()&&!(0,c.ms)(w,t.extent)){const t=(0,c.RG)(w),e=Math.max((0,c.RG)(C)/2,t);C[0]=w[0]-e,C[2]=w[2]+e,(0,p.Li)(A,m);const i=(0,c.Li)(R[0],m);i[0]w[0]&&i[2]>w[2]&&R.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==x&&this.renderedRevision_==y&&this.renderedRenderOrder_==T&&this.renderedFrameDeclutter_===!!t.declutter&&(0,c.ms)(this.wrappedRenderedExtent_,C))return(0,g.aI)(this.renderedExtent_,S)||(this.hitDetectionImageData_=null,this.renderedExtent_=S),this.renderedCenter_=A,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new s.A((0,d.gY)(x,v),C,x,v),I=(0,_.Tf)();let L;if(I){for(let t=0,e=R.length;t{let n;const s=t.getStyleFunction()||e.getStyleFunction();if(s&&(n=s(t,x)),n){const e=this.renderFeature(t,P,n,b,L,this.getLayer().getDeclutter(),i);M=M&&!e}},D=(0,_.JR)(C,m),O=i.getFeaturesInExtent(D);T&&O.sort(T);for(let t=0,e=O.length;t{i.d(e,{A:()=>S});var n=i(2284),s=i(136),r=i(7343),o=i(4029),a=i(1078),l=i(2703),h=i(808),c=i(3663),u=i(9703),d=i(6514),g=i(915),_=i(3608),f=i(4087),p=i(4401),m=i(6933);const x={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},v={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class y extends o.A{constructor(t,e){super(t,e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=(0,u.vt)(),this.tileClipContexts_=null}drawTile(t,e,i,n,s,r,o,a){this.updateExecutorGroup_(t,e.pixelRatio,e.viewState.projection),this.tileImageNeedsRender_(t)&&this.renderTileImage_(t,e),super.drawTile(t,e,i,n,s,r,o,a)}getTile(t,e,i,n){const s=this.getOrCreateTile(t,e,i,n);if(!s)return null;const r=n.viewState.resolution,o=n.viewHints;return!(!o[l.A.ANIMATING]&&!o[l.A.INTERACTING])&&s.wantedResolution||(s.wantedResolution=r),s}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),o=n.getRevision(),l=n.getRenderOrder()||null,h=t.wantedResolution,c=t.getReplayState(n);if(!c.dirty&&c.renderedResolution===h&&c.renderedRevision==o&&c.renderedRenderOrder==l)return;const u=n.getSource(),d=!!n.getDeclutter(),p=u.getTileGrid(),m=u.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),x=u.getSourceTiles(e,i,t),v=(0,f.v6)(n);delete t.hitDetectionImageData[v],t.executorGroups[v]=[],c.dirty=!1;for(let i=0,o=x.length;i{const s=x?e.declutter[x].all().map((t=>t.value)):null;for(let e=0,a=n.length;e{const n=this.getLayer(),s=(0,f.v6)(n),r=n.getSource(),o=this.renderedProjection,l=o.getExtent(),h=this.renderedResolution,d=r.getTileGridForProjection(o),_=(0,u.Bb)(this.renderedPixelToCoordinateTransform_,t.slice()),x=d.getTileCoordForCoordAndResolution(_,h);let v;for(let t=0,e=this.renderedTiles.length;t0)return void e([]);const y=d.getTileCoordExtent(v.wrappedTileCoord),E=(0,g.Py)(y),T=[(_[0]-E[0])/h,(E[1]-_[1])/h],A=v.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let C=v.hitDetectionImageData[s];if(!C){const t=(0,p.xq)(d.getTileSize(d.getZForResolution(h,r.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(d.getTileCoordCenter(v.wrappedTileCoord),h,0,c.tF,t[0]*c.tF,t[1]*c.tF,0)];C=(0,c._7)(t,i,A,n.getStyleFunction(),d.getTileCoordExtent(v.wrappedTileCoord),v.getReplayState(n).renderedResolution,e),v.hitDetectionImageData[s]=C}e((0,c.F8)(T,A,C))}))}getFeaturesInExtent(t){const e=[],i=this.getTileCache();if(0===i.getCount())return e;const n=this.getLayer().getSource().tileGrid,s=n.getZForResolution(this.renderedResolution);return i.forEach((i=>{if(i.tileCoord[0]!==s||i.getState()!==a.A.LOADED)return;const r=i.getSourceTiles();for(let i=0,s=r.length;i=0;--e)n[e].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(i,t),t.viewState.rotation,o,r.$i,s?t.declutter[s]:void 0)}i.globalAlpha=n}renderDeferredInternal(t){const e=this.renderedTiles.reduce(((t,e,i)=>(e.executorGroups[(0,f.v6)(this.getLayer())].forEach((e=>t.push({executorGroup:e,index:i}))),t)),[]),i=e.map((({executorGroup:t})=>t.getDeferredZIndexContexts())),n={};for(let t=0,i=e.length;t{i.forEach(((i,n)=>{i[t]&&(i[t].forEach((t=>{const{executorGroup:i,index:s}=e[n],r=i.getRenderedContext(),o=r.globalAlpha;r.globalAlpha=this.renderedOpacity_;const a=this.tileClipContexts_[s];a&&a.draw(r),t.draw(r),a&&r.restore(),r.globalAlpha=o,t.clear()})),i[t].length=0)}))}))}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,s=n.center,r=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),d=t.tileCoord,g=c.getTileCoordExtent(t.wrappedTileCoord),_=c.getTileCoordExtent(d,this.tempExtent)[0]-g[0];return(0,u.lw)((0,u.hs)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(s,r,o,i,l,h,_))}postRender(t,e){const i=e.viewHints,n=!(i[l.A.ANIMATING]||i[l.A.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation,this.renderedOpacity_=e.layerStatesArray[e.layerIndex].opacity;const s=this.getLayer(),o=s.getRenderMode(),a=t.globalAlpha;t.globalAlpha=this.renderedOpacity_;const c=s.getDeclutter(),u=c?v[o].filter((t=>!r.$i.includes(t))):v[o],d=e.viewState,_=d.rotation,p=s.getSource(),m=p.getTileGridForProjection(d.projection).getZForResolution(d.resolution,p.zDirection),x=this.renderedTiles,y=[],E=[],T=[];let A=!0;for(let i=x.length-1;i>=0;--i){const r=x[i];A=A&&!r.getReplayState(s).dirty;const o=r.executorGroups[(0,f.v6)(s)].filter((t=>t.hasExecutors(u)));if(0===o.length)continue;const a=this.getTileRenderTransform(r,e),l=r.tileCoord[0];let d=!1;const p=o[0].getClipCoords(a);let v,C=t;if(p){v=new h.A,C=v.getContext();for(let t=0,e=y.length;t{i.d(e,{A:()=>u});var n=i(2808),s=i(5332),r=i(2323),o=i(9825),a=i(5516);function l(t,e,i){const n=(0,o.SR)();return(0,a.nR)(e,i,n,t)}function h(t,e){const i=`\n attribute vec2 ${r.eS.TEXTURE_COORD};\n uniform mat4 ${r.gF.TILE_TRANSFORM};\n uniform float ${r.gF.TEXTURE_PIXEL_WIDTH};\n uniform float ${r.gF.TEXTURE_PIXEL_HEIGHT};\n uniform float ${r.gF.TEXTURE_RESOLUTION};\n uniform float ${r.gF.TEXTURE_ORIGIN_X};\n uniform float ${r.gF.TEXTURE_ORIGIN_Y};\n uniform float ${r.gF.DEPTH};\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ${r.eS.TEXTURE_COORD};\n v_mapCoord = vec2(\n ${r.gF.TEXTURE_ORIGIN_X} + ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n ${r.gF.TEXTURE_ORIGIN_Y} - ${r.gF.TEXTURE_RESOLUTION} * ${r.gF.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n );\n gl_Position = ${r.gF.TILE_TRANSFORM} * vec4(${r.eS.TEXTURE_COORD}, ${r.gF.DEPTH}, 1.0);\n }\n `,n={...(0,a.z0)(),inFragmentShader:!0,bandCount:e,style:t},s=[];if(void 0!==t.color){const e=l(n,t.color,o.mE);s.push(`color = ${e};`)}if(void 0!==t.contrast){const e=l(n,t.contrast,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=l(n,t.exposure,o.wl);s.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=l(n,t.saturation,o.wl);s.push(`\n float saturation = ${e} + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n `)}if(void 0!==t.gamma){const e=l(n,t.gamma,o.wl);s.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=l(n,t.brightness,o.wl);s.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const h={},c=Object.keys(n.variables).length;if(c>1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e ${r.gF.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${r.gF.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${r.gF.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${s.join("\n")}\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${r.gF.TRANSITION_ALPHA};\n }`,uniforms:h,paletteTextures:n.paletteTextures}}class c extends n.A{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.styleVariables_=this.style_.variables||{},this.addChangeListener(s.A.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=h(this.style_,this.getSourceBandCount_());return new r.Ay(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.getCacheSize(),paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let s=0,r=e.length;s{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}s=s&&"ready"==i}const r=this.renderSources(t,n);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=i.resolution,r;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return r}setStyle(t){if(this.styleVariables_=t.variables||{},this.style_=t,this.hasRenderer()){const t=h(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,paletteTextures:t.paletteTextures}),this.changed()}}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}c.prototype.dispose;const u=c},1597:(t,e,i)=>{function n(t,e,i){return Math.min(Math.max(t,e),i)}function s(t,e,i,n,s,o){const a=s-i,l=o-n;if(0!==a||0!==l){const r=((t-i)*a+(e-n)*l)/(a*a+l*l);r>1?(i=s,n=o):r>0&&(i+=a*r,n+=l*r)}return r(t,e,i,n)}function r(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function o(t){const e=t.length;for(let i=0;is&&(s=e,n=r)}if(0===s)return null;const r=t[n];t[n]=t[i],t[i]=r;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}function a(t){return 180*t/Math.PI}function l(t){return t*Math.PI/180}function h(t,e){const i=t%e;return i*e<0?i+e:i}function c(t,e,i){return t+i*(e-t)}function u(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function d(t,e){return Math.round(u(t,e))}function g(t,e){return Math.floor(u(t,e))}function _(t,e){return Math.ceil(u(t,e))}i.d(e,{Cc:()=>c,KU:()=>o,LI:()=>d,Mg:()=>u,Q1:()=>s,RI:()=>g,eh:()=>l,hG:()=>r,mk:()=>_,qE:()=>n,xP:()=>h,xW:()=>a})},3530:(t,e,i)=>{function n(t){for(const e in t)delete t[e]}function s(t){let e;for(e in t)return!1;return!e}i.d(e,{I:()=>n,p:()=>s})},613:(t,e,i)=>{i.d(e,{A:()=>n});const n={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3407:(t,e,i)=>{i.d(e,{Ig:()=>f.I,MF:()=>n.A,hB:()=>F,O3:()=>L,bF:()=>w,Av:()=>P,wU:()=>H,RJ:()=>C,tI:()=>k,Rb:()=>D,Ad:()=>W,SD:()=>Z,Jt:()=>b,hO:()=>I,RG:()=>G,FO:()=>N,Tf:()=>U,R6:()=>R,WP:()=>O,te:()=>X,JR:()=>Y,vN:()=>V,pd:()=>z,DI:()=>j});var n=i(5286);const s=6378137,r=Math.PI*s,o=[-r,-r,r,r],a=[-180,-85,180,85],l=s*Math.log(Math.tan(Math.PI/2));class h extends n.A{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/s)}})}}const c=[new h("EPSG:3857"),new h("EPSG:102100"),new h("EPSG:102113"),new h("EPSG:900913"),new h("http://www.opengis.net/def/crs/EPSG/0/3857"),new h("http://www.opengis.net/gml/srs/epsg.xml#3857")];const u=[-180,-90,180,90],d=6378137*Math.PI/180;class g extends n.A{constructor(t,e){super({code:t,units:"degrees",extent:u,axisOrientation:e,global:!0,metersPerUnit:d,worldExtent:u})}}const _=[new g("CRS:84"),new g("EPSG:4326","neu"),new g("urn:ogc:def:crs:OGC:1.3:CRS84"),new g("urn:ogc:def:crs:OGC:2:84"),new g("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new g("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new g("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var f=i(8100);let p={};var m=i(3158),x=i(915),v=i(1597),y=i(6933),E=i(2490),T=i(4422);let A=!0;function C(t){A=!(void 0===t||t)}function S(t,e){if(void 0!==e)for(let i=0,n=t.length;i=o?e[r+t]:s[t]}return i}}function F(t,e,i,n){const s=b(t),r=b(e);(0,m.WQ)(s,r,M(i)),(0,m.WQ)(r,s,M(n))}function D(t,e){return C(),z(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function O(t,e){const i=z(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=(0,v.xP)(n+180,360)-180),i}function k(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||N(t,e)===S)&&i}function N(t,e){const i=t.getCode(),n=e.getCode();let s=(0,m.Jt)(i,n);return s||(s=R),s}function G(t,e){return N(b(t),b(e))}function z(t,e,i){return G(e,i)(t,void 0,t.length)}function j(t,e,i,n){const s=G(e,i);return(0,x.NW)(t,s,void 0,n)}let B=null;function U(){return B}function X(t,e){return B?z(t,e,B):t}function W(t,e){return B?z(t,B,e):(A&&!(0,y.aI)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(A=!1,(0,T.R8)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Y(t,e){return B?j(t,e,B):t}function Z(t,e){return B?j(t,B,e):t}function V(t,e){if(!B)return t;const i=b(e).getMetersPerUnit(),n=B.getMetersPerUnit();return i&&n?t*i/n:t}function H(t,e,i){return function(n){let s,r;if(t.canWrapX()){const e=t.getExtent(),o=(0,x.RG)(e);n=n.slice(0),r=(0,y.U$)(n,t,o),r&&(n[0]=n[0]-r*o),n[0]=(0,v.qE)(n[0],e[0],e[2]),n[1]=(0,v.qE)(n[1],e[1],e[3]),s=i(n)}else s=i(n);return r&&e.canWrapX()&&(s[0]+=r*(0,x.RG)(e.getExtent())),s}}var K,q,$;L(c),L(_),K=c,q=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;ol?i=l:i<-l&&(i=-l),e[o+1]=i}return e},$=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o{i.d(e,{A:()=>s});var n=i(8100);const s=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.I[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}},8100:(t,e,i)=>{i.d(e,{I:()=>r,q:()=>s});const n={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function s(t){return n[t]}const r={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},3158:(t,e,i)=>{i.d(e,{Jt:()=>r,WQ:()=>s});let n={};function s(t,e,i){const s=t.getCode(),r=e.getCode();s in n||(n[s]={}),n[s][r]=i}function r(t,e){let i;return t in n&&e in n[t]&&(i=n[t][e]),i}},7331:(t,e,i)=>{i.d(e,{r2:()=>a});var n=i(2236),s=i(9703),r=i(3608),o=i(3407);function a(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=t.inversePixelTransform[0],i=t.inversePixelTransform[1],a=Math.sqrt(e*e+i*i),l=t.frameState,h=(0,s.lw)(t.inversePixelTransform.slice(),l.coordinateToPixelTransform),c=(0,r.j)(l.viewState.resolution,a);let u;const d=(0,o.Tf)();return d&&(u=(0,o.FO)(d,l.viewState.projection)),new n.A(t.context,a,l.extent,h,l.viewState.rotation,c,u)}},9960:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(1685);class s extends n.Ay{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const r=s},3984:(t,e,i)=>{i.d(e,{A:()=>n});const n={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},4778:(t,e,i)=>{i.d(e,{Ay:()=>p});var n=i(9703),s=i(915),r=i(3671),o=i(6514),a=i(2616),l=i(3407),h=i(3402),c=i(9969),u=i(4049),d=i(4238),g=i(7622);const _=(0,n.vt)();class f{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,s.dP)(this.flatCoordinates_):(0,s.Vy)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,s.q1)(this.getExtent());this.flatInteriorPoints_=(0,a.J)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,h.yJ)(this.flatCoordinates_,this.ends_),e=(0,u.C)(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=(0,a.p)(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,c.SH)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=(0,r.P4)(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=(0,r.AL)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=(0,r.Hg)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n)}return n&&(this.simplifiedGeometry_=new f(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}f.prototype.getFlatCoordinates=f.prototype.getOrientedFlatCoordinates;const p=f},2826:(t,e,i)=>{i.d(e,{A:()=>n});const n=class{drawCustom(t,e,i,n,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}},8774:(t,e,i)=>{i.d(e,{Jw:()=>L,M8:()=>m,MY:()=>p,NT:()=>f,Oq:()=>u,TA:()=>b,Tq:()=>x,ZV:()=>l,_K:()=>g,_m:()=>c,aq:()=>v,eL:()=>_,fZ:()=>C,jT:()=>I,qY:()=>h,vk:()=>d,yY:()=>y});var n=i(4120),s=i(7771),r=i(3530),o=i(8711),a=i(5176);const l="10px sans-serif",h="#000",c="round",u=[],d=0,g="round",_=10,f="#000",p="center",m="middle",x=[0,0,0,0],v=1,y=new n.A;let E,T=null;const A={},C=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,o;function l(s,r,a){let l=!0;for(let h=0;hMath.max(e,w(t,i))),0);return i[e]=n,n}function I(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=e[h+1]||t.font,g=w(d,u);i.push(g),o+=g;const _=S(d);n.push(_),l=Math.max(l,_)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}function L(t,e,i,n,s,r,o,a,l,h,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t{i.d(e,{A:()=>d});var n=i(6429),s=i(1580),r=i(2826),o=i(7295),a=i(915),l=i(8774),h=i(6514),c=i(6361);class u extends r.A{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,l=t.length;ol&&(this.instructions.push([n.Ay.CUSTOM,l,u,t,i,c.n2,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,c.n2,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),u=this.coordinates.length,this.instructions.push([n.Ay.CUSTOM,l,u,t,i,void 0,r]),this.hitDetectionInstructions.push([n.Ay.CUSTOM,l,u,t,s||i,void 0,r])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.Ay.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let s,r,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[n.Ay.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[n.Ay.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!(0,h.aI)(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[n.Ay.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.o8)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,a.r)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const d=u},136:(t,e,i)=>{i.d(e,{A:()=>p});var n=i(8130),s=i(6429),r=i(915);class o extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!(0,r.Ym)(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,l=this.appendFlatPointCoordinates(n,o);this.instructions.push([s.Ay.DRAW_IMAGE,a,l,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,a,l,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=[];for(let e=0,i=n.length;e{i.d(e,{y2:()=>R,$i:()=>w,x$:()=>b,Ay:()=>L});var n=i(6429),s=i(808),r=i(3624),o=i(9703),a=i(915),l=i(8774),h=i(1597),c=i(7622);function u(t,e,i,n,s,r,o,a,l,u,d,g){let _=t[e],f=t[e+1],p=0,m=0,x=0,v=0;function y(){p=_,m=f,_=t[e+=n],f=t[e+1],v+=x,x=Math.sqrt((_-p)*(_-p)+(f-m)*(f-m))}do{y()}while(et[2]}else I=T>w;const L=Math.PI,P=[],M=C+n===e;let F;if(x=0,v=S,_=t[e=C],f=t[e+1],M){y(),F=Math.atan2(f-m,_-p),I&&(F+=F>0?-L:L);const t=(w+T)/2,e=(b+A)/2;return P[0]=[t,e,(R-r)/2,F,s],P}for(let t=0,c=(s=s.replace(/\n/g," ")).length;t0?-L:L),void 0!==F){let t=g-F;if(t+=t>L?-2*L:t<-L?2*L:0,Math.abs(t)>o)return null}F=g;const T=t;let A=0;for(;t0&&t.push("\n",""),t.push(e,""),t}const A=class{constructor(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,o.vt)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new s.A:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,a=i?this.fillStates[i]:null,h=this.textStates[e],c=this.pixelRatio,u=[h.scale[0]*c,h.scale[1]*c],d=h.justify?r.E[h.justify]:E(Array.isArray(t)?t[0]:t,h.textAlign||l.MY),g=n&&o.lineWidth?o.lineWidth:0,_=Array.isArray(t)?t:String(t).split("\n").reduce(T,[]),{width:f,height:p,widths:m,heights:x,lineWidths:v}=(0,l.jT)(h,_),y=f+g,A=[],C=(y+2)*u[0],S=(p+g)*u[1],R={width:C<0?Math.floor(C):Math.ceil(C),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:A};1==u[0]&&1==u[1]||A.push("scale",u),n&&(A.push("strokeStyle",o.strokeStyle),A.push("lineWidth",g),A.push("lineCap",o.lineCap),A.push("lineJoin",o.lineJoin),A.push("miterLimit",o.miterLimit),A.push("setLineDash",[o.lineDash]),A.push("lineDashOffset",o.lineDashOffset)),i&&A.push("fillStyle",a.fillStyle),A.push("textBaseline","middle"),A.push("textAlign","center");const w=.5-d;let b=d*y+w*g;const I=[],L=[];let P,M=0,F=0,D=0,O=0;for(let t=0,e=_.length;tt?t-c:s,R=r+u>e?e-u:r,w=y[3]+S*g[0]+y[1],b=y[0]+R*g[1]+y[2],I=A-y[3],L=C-y[0];let P;return(E||0!==d)&&(f[0]=I,x[0]=I,f[1]=L,p[1]=L,p[0]=I+w,m[0]=p[0],m[1]=L+b,x[1]=m[1]),0!==d?(P=(0,o.Zz)((0,o.vt)(),i,n,1,1,d,-i,-n),(0,o.Bb)(P,f),(0,o.Bb)(P,p),(0,o.Bb)(P,m),(0,o.Bb)(P,x),(0,a.N)(Math.min(f[0],p[0],m[0],x[0]),Math.min(f[1],p[1],m[1],x[1]),Math.max(f[0],p[0],m[0],x[0]),Math.max(f[1],p[1],m[1],x[1]),_)):(0,a.N)(Math.min(I,I+w),Math.min(L,L+b),Math.max(I,I+w),Math.max(L,L+b),_),v&&(A=Math.round(A),C=Math.round(C)),{drawImageX:A,drawImageY:C,drawImageW:S,drawImageH:R,originX:c,originY:u,declutterBox:{minX:_[0],minY:_[1],maxX:_[2],maxY:_[3],value:T},canvasTransform:P,scale:g}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,c=o?o[2]*n.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(a&&this.replayTextBackground_(t,f,p,m,x,r,o),(0,l.Jw)(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=(0,o.Bb)(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),a=this.strokeStates[i],h=this.pixelRatio,c=E(Array.isArray(t)?t[0]:t,s.textAlign||l.MY),u=r.E[s.textBaseline||l.M8],d=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:c*(o.width/h-2*s.scale[0])+2*(.5-c)*d,anchorY:u*o.height/h+2*(.5-u)*d}}execute_(t,e,i,s,r,h,_,f){const p=this.zIndexContext_;let m;this.pixelCoordinates_&&(0,d.aI)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,c.Rc)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,o.k3)(this.renderedTransform_,i));let x=0;const y=s.length;let T,A,C,S,R,w,b,I,L,P,M,F,D,O=0,k=0,N=0,G=null,z=null;const j=this.coordinateCache_,B=this.viewRotation_,U=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,X={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:B},W=this.instructions!=s||this.overlaps?0:200;let Y,Z,V,H;for(;xW&&(this.fill_(t),k=0),N>W&&(t.stroke(),N=0),k||N||(t.beginPath(),R=NaN,w=NaN),++x;break;case n.Ay.CIRCLE:O=i[1];const s=m[O],o=m[O+1],c=m[O+2]-s,d=m[O+3]-o,y=Math.sqrt(c*c+d*d);t.moveTo(s+y,o),t.arc(s,o,y,0,2*Math.PI,!0),++x;break;case n.Ay.CLOSE_PATH:t.closePath(),++x;break;case n.Ay.CUSTOM:O=i[1],T=i[2];const K=i[3],q=i[4],$=i[5];X.geometry=K,X.feature=Y,x in j||(j[x]=[]);const J=j[x];$?$(m,O,T,2,J):(J[0]=m[O],J[1]=m[O+1],J.length=2),p&&(p.zIndex=i[6]),q(J,X),++x;break;case n.Ay.DRAW_IMAGE:O=i[1],T=i[2],L=i[3],A=i[4],C=i[5];let Q=i[6];const tt=i[7],et=i[8],it=i[9],nt=i[10];let st=i[11];const rt=i[12];let ot=i[13];S=i[14]||"declutter";const at=i[15];if(!L&&i.length>=20){P=i[19],M=i[20],F=i[21],D=i[22];const t=this.drawLabelWithPointPlacement_(P,M,F,D);L=t.label,i[3]=L;const e=i[23];A=(t.anchorX-e)*this.pixelRatio,i[4]=A;const n=i[24];C=(t.anchorY-n)*this.pixelRatio,i[5]=C,Q=L.height,i[6]=Q,ot=L.width,i[13]=ot}let lt,ht,ct,ut;i.length>25&&(lt=i[25]),i.length>17?(ht=i[16],ct=i[17],ut=i[18]):(ht=l.Tq,ct=!1,ut=!1),nt&&U?st+=B:nt||U||(st-=B);let dt=0;for(;O!w.includes(t))),I={},L=class{constructor(t,e,i,n,s,r,a){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,o.vt)(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,a)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const s=t[i];for(const t in s){const i=s[t];n[t]=new A(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;ei)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+s)*e+(t+r))+3),s>0&&a.push(4*((t-s)*e+(t+r))+3),r>0&&(a.push(4*((t+s)*e+(t-r))+3),s>0&&a.push(4*((t-s)*e+(t-r))+3))}const s=[];for(let t=0,e=n.length;t0){if(!r||"none"===i||"Image"!==f&&"Text"!==f||r.includes(t)){const i=(_[a]-3)/4,r=n-i%l,o=n-(i/l|0),h=s(t,e,r*r+o*o);if(h)return h}u.clearRect(0,0,l,l);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);let x,v,y,E,T;for(m.sort(d.V_),x=m.length-1;x>=0;--x){const t=m[x].toString();for(y=this.executorsByZIndex_[t],v=R.length-1;v>=0;--v)if(f=R[v],E=y[f],void 0!==E&&(T=E.executeHitDetection(u,h,i,p,g),T))return T}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return(0,c.Rc)(o,0,8,2,t,o),o}isEmpty(){return(0,S.p)(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(d.V_),r=r||R;const l=R.length;let h,c,u,g,_;for(o&&a.reverse(),h=0,c=a.length;hd.execute(t,e,i,n,s,o))):d.execute(g,e,i,n,s,o),_&&g.restore(),r){r.offset();const t=a[h]*l+u;this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(r)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(d.V_);for(let i=0,n=e.length;i{t.draw(this.renderedContext_),t.clear()})),t[e[i]].length=0}}},2236:(t,e,i)=>{i.d(e,{A:()=>g});var n=i(2826),s=i(7295),r=i(9703),o=i(8774),a=i(6514),l=i(915),h=i(1597),c=i(7622),u=i(2096);class d extends n.A{constructor(t,e,i,n,s,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,h.Mg)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,r.vt)()}drawImages_(t,e,i,n){if(!this.image_)return;const s=(0,c.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;tt*this.pixelRatio_)),lineDashOffset:(r||o.vk)*this.pixelRatio_,lineJoin:void 0!==a?a:o._K,lineWidth:(void 0!==l?l:o.aq)*this.pixelRatio_,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,s.F)(t||o.qY)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),a=i.getLineJoin(),l=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:o._m,lineDash:n||o.Oq,lineDashOffset:r||o.vk,lineJoin:void 0!==a?a:o._K,lineWidth:void 0!==l?l:o.aq,miterLimit:void 0!==h?h:o.eL,strokeStyle:(0,s.F)(t||o.NT)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),a=t.getOffsetY(),l=t.getRotateWithView(),h=t.getRotation(),c=t.getScaleArray(),u=t.getText(),d=t.getTextAlign(),g=t.getTextBaseline();this.textState_={font:void 0!==n?n:o.ZV,textAlign:void 0!==d?d:o.MY,textBaseline:void 0!==g?g:o.M8},this.text_=void 0!==u?Array.isArray(u)?u.reduce(((t,e,i)=>t+(i%2?" ":e)),""):u:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==a?this.pixelRatio_*a:0,this.textRotateWithView_=void 0!==l&&l,this.textRotation_=void 0!==h?h:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}else this.text_=""}}const g=d},6429:(t,e,i)=>{i.d(e,{Ay:()=>l,I5:()=>s,VD:()=>r,kx:()=>a,th:()=>o});const n={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},s=[n.FILL],r=[n.STROKE],o=[n.BEGIN_PATH],a=[n.CLOSE_PATH],l=n},3624:(t,e,i)=>{i.d(e,{E:()=>d,A:()=>_});var n=i(8130),s=i(6429),r=i(7295),o=i(8774),a=i(4087),l=i(915),h=i(1597);function c(t,e,i,n,s){const r=[];let o=i,a=0,l=e.slice(i,2);for(;a=t){const e=(t-a+d)/d,g=(0,h.Cc)(i,c,e),_=(0,h.Cc)(n,u,e);l.push(g,_),r.push(l),l=[g,_],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function u(t,e,i,n,s){let r,o,a,l,h,c,u,d,g,_,f=i,p=i,m=0,x=0,v=i;for(o=i;ot&&(x>m&&(m=x,f=v,p=o),x=0,v=o-s)),a=l,u=g,d=_),h=i,c=n}return x+=l,x>m?[v,o]:[f,p]}const d={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class g extends n.A{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[o.qY]={fillStyle:o.qY},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,r=this.textStrokeState_,a=this.textState_;if(""===this.text_||!a||!n&&!r)return;const h=this.coordinates;let d=h.length;const g=t.getType();let _=null,f=t.getStride();if("line"!==a.placement||"LineString"!=g&&"MultiLineString"!=g&&"Polygon"!=g&&"MultiPolygon"!=g){let n=a.overflow?null:[];switch(g){case"Point":case"MultiPoint":_=t.getFlatCoordinates();break;case"LineString":_=t.getFlatMidpoint();break;case"Circle":_=t.getCenter();break;case"MultiLineString":_=t.getFlatMidpoints(),f=2;break;case"Polygon":_=t.getFlatInteriorPoint(),a.overflow||n.push(_[2]/this.resolution),f=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();_=[];for(let t=0,i=e.length;t{const n=h[2*(t+i)]===_[i*f]&&h[2*(t+i)+1]===_[i*f+1];return n||--t,n}))}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let l=a.padding;if(l!=o.Tq&&(a.scale[0]<0||a.scale[1]<0)){let t=a.padding[0],e=a.padding[1],i=a.padding[2],n=a.padding[3];a.scale[0]<0&&(e=-e,n=-n),a.scale[1]<0&&(t=-t,i=-i),l=[t,e,i,n]}const c=this.pixelRatio;this.instructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,l==o.Tq?o.Tq:l.map((function(t){return t*c})),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const u=1/c,p=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=o.qY,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([s.Ay.DRAW_IMAGE,d,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[u,u],NaN,this.declutterMode_,this.declutterImageWithText_,l,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?o.qY:this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),a.backgroundFill&&(this.state.fillStyle=p,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,l.HY)(this.maxExtent,t.getExtent()))return;let n;if(_=t.getFlatCoordinates(),"LineString"==g)n=[_.length];else if("MultiLineString"==g)n=t.getEnds();else if("Polygon"==g)n=t.getEnds().slice(0,1);else if("MultiPolygon"==g){const e=t.getEndss();n=[];for(let t=0,i=e.length;t{i.d(e,{A:()=>s});var n=i(8711);const s=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy((0,n.lr)(),{get:(t,e)=>{if("function"==typeof(0,n.lr)()[e])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i{i.d(e,{F8:()=>d,_7:()=>u,tF:()=>c});var n=i(2236),s=i(9700),r=i(6514),o=i(1597),a=i(8711),l=i(3407),h=i(915);const c=.5;function u(t,e,i,o,u,d,g,_,f){const p=f?(0,l.JR)(u,f):u,m=t[0]*c,x=t[1]*c,v=(0,a.Y)(m,x);v.imageSmoothingEnabled=!1;const y=v.canvas,E=new n.A(v,c,u,null,g,_,f?(0,l.FO)((0,l.Tf)(),f):null),T=i.length,A=Math.floor(16777215/T),C={};for(let t=1;t<=T;++t){const e=i[t-1],n=e.getStyleFunction()||o;if(!n)continue;let r=n(e,d);if(!r)continue;Array.isArray(r)||(r=[r]);const l=(t*A).toString(16).padStart(7,"#00000");for(let t=0,i=r.length;t{i.d(e,{A:()=>l});var n=i(6837),s=i(6141),r=i(1854),o=i(4087);class a extends r.A{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=5}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return(0,o.b0)()}getData(t){return null}prepareFrame(t){return(0,o.b0)()}renderFrame(t,e){return(0,o.b0)()}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==s.A.LOADED&&e.getState()!==s.A.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=s.A.LOADED&&e!=s.A.ERROR&&t.addEventListener(n.A.CHANGE,this.boundHandleImageChange_),e==s.A.IDLE&&(t.load(),e=t.getState()),e==s.A.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const l=a},6769:(t,e,i)=>{i.d(e,{A:()=>f,B:()=>d});var n=i(5986),s=i(9960),r=i(3984),o=i(808),a=i(9703),l=i(3730),h=i(8711),c=i(6514),u=i(915);const d=[];let g=null;class _ extends n.A{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,a.vt)(),this.pixelTransform=(0,a.vt)(),this.inversePixelTransform=(0,a.vt)(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(t,e,i){let n;g||(g=(0,h.Y)(1,1,void 0,{willReadFrequently:!0})),g.clearRect(0,0,1,1);try{g.drawImage(t,e,i,1,1,0,0,1,1),n=g.getImageData(0,0,1,1).data}catch(t){return g=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,c.aI)((0,l._j)(t.style.backgroundColor),(0,l._j)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.getContext("2d"))}if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=(0,h.Y)();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,u.Py)(i),s=(0,u.WU)(i),r=(0,u.k_)(i),o=(0,u.R)(i);(0,a.Bb)(e.coordinateToPixelTransform,n),(0,a.Bb)(e.coordinateToPixelTransform,s),(0,a.Bb)(e.coordinateToPixelTransform,r),(0,a.Bb)(e.coordinateToPixelTransform,o);const l=this.inversePixelTransform;(0,a.Bb)(l,n),(0,a.Bb)(l,s),(0,a.Bb)(l,r),(0,a.Bb)(l,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,s=t.viewState.rotation,r=t.pixelRatio,o=Math.round((0,u.RG)(i)/n*r),l=Math.round((0,u.Oq)(i)/n*r);(0,a.Zz)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/r,1/r,s,-o/2,-l/2),(0,a.T9)(this.inversePixelTransform,this.pixelTransform);const h=(0,a.dI)(this.pixelTransform);if(this.useContainer(e,h,this.getBackground(t)),!this.containerReused){const t=this.context.canvas;t.width!=o||t.height!=l?(t.width=o,t.height=l):this.context.clearRect(0,0,o,l),h!==t.style.transform&&(t.style.transform=h)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new s.A(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(r.A.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(r.A.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new o.A),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(r.A.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(r.A.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const l=s/2,h=r/2,c=n/e,u=-c,d=-t[0]+o,g=-t[1];return(0,a.Zz)(this.tempTransform,l,h,c,u,-i,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const f=_},4029:(t,e,i)=>{i.d(e,{A:()=>A});var n=i(6769),s=i(7607),r=i(190),o=i(4969),a=i(8596),l=i(7404),h=i(1110),c=i(1078),u=i(9703),d=i(6514),g=i(915),_=i(186),f=i(3407),p=i(4087),m=i(4401);function x(t,e,i,n){return`${t},${(0,_.dp)(e,i,n)}`}function v(t,e,i){if(!(i in t))return t[i]=new Set([e]),!0;const n=t[i],s=n.has(e);return s||n.add(e),!s}function y(t,e,i){const n=t[i];return!!n&&n.delete(e)}function E(t,e){const i=t.layerStatesArray[t.layerIndex];i.extent&&(e=(0,g._N)(e,(0,f.SD)(i.extent,t.viewState.projection)));const n=i.layer.getRenderSource();if(!n.getWrapX()){const i=n.getTileGridForProjection(t.viewState.projection).getExtent();i&&(e=(0,g._N)(e,i))}return e}class T extends n.A{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=(0,g.S5)(),this.tempTileRange_=new h.A(0,0,0,0),this.tempTileCoord_=(0,_.N)(0,0,0);const i=void 0!==e.cacheSize?e.cacheSize:512;this.tileCache_=new o.A(i),this.maxStaleKeys=.5*i}getTileCache(){return this.tileCache_}getOrCreateTile(t,e,i,n){const s=this.tileCache_,r=this.getLayer().getSource(),o=x(r.getKey(),t,e,i);let a;if(s.containsKey(o))a=s.get(o);else{if(a=r.getTile(t,e,i,n.pixelRatio,n.viewState.projection),!a)return null;s.set(o,a)}return a}getTile(t,e,i,n){return this.getOrCreateTile(t,e,i,n)||null}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,u.Bb)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,g.Ym)(o,n))return null;const a=e.viewState,l=i.getRenderSource(),h=l.getTileGridForProjection(a.projection),d=l.getTilePixelRatio(e.pixelRatio);for(let t=h.getZForResolution(a.resolution);t>=h.getMinZoom();--t){const i=h.getTileCoordForCoordAndZ(n,t),o=this.getTile(t,i[1],i[2],e);if(!o||o.getState()!==c.A.LOADED)continue;const u=h.getOrigin(t),g=(0,m.xq)(h.getTileSize(t)),_=h.getResolution(t);let f;if(o instanceof r.A)f=o.getImage();else{if(!(o instanceof s.Ay))continue;if(f=(0,s.xo)(o.getData()),!f)continue}const p=Math.floor(d*((n[0]-u[0])/_-i[1]*g[0])),x=Math.floor(d*((u[1]-n[1])/_-i[2]*g[1])),v=Math.round(d*l.getGutterForProjection(a.projection));return this.getImageData(f,p+v,x+v)}return null}prepareFrame(t){const e=this.getLayer().getSource();if(!e)return!1;const i=this.getLayer().getSource().getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===e.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(t,e,i,n,s){const r=t.viewState,o=this.getLayer(),a=o.getRenderSource(),l=a.getTileGridForProjection(r.projection),h=(0,p.v6)(a);h in t.wantedTiles||(t.wantedTiles[h]={});const u=t.wantedTiles[h],d=o.getMapInternal(),g=Math.max(i-s,l.getMinZoom(),l.getZForResolution(Math.min(o.getMaxResolution(),d?d.getView().getResolutionForZoom(Math.max(o.getMinZoom(),0)):l.getResolution(0)),a.zDirection));for(let s=i;s>=g;--s){const i=l.getTileRangeForExtentAndZ(e,s,this.tempTileRange_),r=l.getResolution(s);for(let e=i.minX;e<=i.maxX;++e)for(let o=i.minY;o<=i.maxY;++o){const i=this.getTile(s,e,o,t);if(!i)continue;if(!v(n,i,s))continue;const a=i.getKey();if(u[a]=!0,i.getState()===c.A.IDLE&&!t.tileQueue.isKeyQueued(a)){const n=(0,_.N)(s,e,o,this.tempTileCoord_);t.tileQueue.enqueue([i,h,l.getTileCoordCenter(n),r])}}}}findStaleTile_(t,e){const i=this.tileCache_,n=t[0],s=t[1],r=t[2],o=this.getStaleKeys();for(let t=0;t0&&setTimeout((()=>{this.enqueueTiles(t,O,T-1,F,D-1)}),0);const k=(0,p.v6)(this),N=t.time;for(const e of F[T]){const i=e.getState();if((e instanceof l.A||e instanceof a.A)&&i===c.A.EMPTY)continue;const n=e.tileCoord;if(i===c.A.LOADED&&1===e.getAlpha(k,N)){e.endTransition(k);continue}if(this.renderComplete=!1,this.findStaleTile_(n,F)){y(F,e,T),t.animate=!0;continue}if(this.findAltTiles_(v,n,T+1,F))continue;const s=v.getMinZoom();for(let t=T-1;t>=s&&!this.findAltTiles_(v,n,t,F);--t);}const G=A/r*h/R,z=this.getRenderContext(t);(0,u.Zz)(this.tempTransform,w/2,b/2,G,G,0,-w/2,-b/2),i.extent&&this.clipUnrotated(z,t,I),m.getInterpolate()||(z.imageSmoothingEnabled=!1),this.preRender(z,t),this.renderedTiles.length=0;const j=Object.keys(F).map(Number);let B;j.sort(d.V_);const U=[],X=[];for(let e=j.length-1;e>=0;--e){const i=j[e],n=m.getTilePixelSize(i,h,s),r=v.getResolution(i)/A,o=n[0]*r*G,a=n[1]*r*G,l=v.getTileCoordForCoordAndZ((0,g.Py)(M),i),d=v.getTileCoordExtent(l),_=(0,u.Bb)(this.tempTransform,[R*(d[0]-M[0])/A,R*(M[3]-d[3])/A]),f=R*m.getGutterForProjection(s);for(const e of F[i]){if(e.getState()!==c.A.LOADED)continue;const n=e.tileCoord,s=l[1]-n[1],r=Math.round(_[0]-(s-1)*o),h=l[2]-n[2],u=Math.round(_[1]-(h-1)*a),d=Math.round(_[0]-s*o),p=Math.round(_[1]-h*a),x=r-d,v=u-p,y=1===j.length;let E=!1;B=[d,p,d+x,p,d+x,p+v,d,p+v];for(let t=0,e=U.length;t{const i=(0,p.v6)(m),n=e.wantedTiles[i],s=n?Object.keys(n).length:0;this.updateCacheSize(s),this.tileCache_.expireCache()})),this.container}updateCacheSize(t){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,2*t)}drawTile(t,e,i,n,r,o,a,l){let h;if(t instanceof s.Ay){if(h=(0,s.xo)(t.getData()),!h)throw new Error("Rendering array data is not yet supported")}else h=this.getTileImage(t);if(!h)return;const c=this.getRenderContext(e),u=(0,p.v6)(this),d=e.layerStatesArray[e.layerIndex],g=d.opacity*(l?t.getAlpha(u,e.time):1),_=g!==c.globalAlpha;_&&(c.save(),c.globalAlpha=g),c.drawImage(h,a,a,h.width-2*a,h.height-2*a,i,n,r,o),_&&c.restore(),g!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}updateUsedTiles(t,e,i){const n=(0,p.v6)(e);n in t||(t[n]={}),t[n][i.getKey()]=!0}}const A=T},3608:(t,e,i)=>{i.d(e,{Eo:()=>a,gY:()=>h,j:()=>l,nl:()=>c});var n=i(6141),s=i(4087);const r=.5,o={Point:function(t,e,i,s,r,o){const a=i.getImage(),l=i.getText(),h=l&&l.getText(),c=o&&a&&h?{}:void 0;if(a){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,c),o.drawPoint(e,s,r)}if(h){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(l,c),n.drawText(e,s,r)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},MultiPoint:function(t,e,i,s,r,o){const a=i.getImage(),l=a&&0!==a.getOpacity(),h=i.getText(),c=h&&h.getText(),u=o&&l&&c?{}:void 0;if(l){if(a.getImageState()!=n.A.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(a,u),o.drawMultiPoint(e,s,r)}if(c){const n=t.getBuilder(i.getZIndex(),"Text");n.setTextStyle(h,u),n.drawText(e,s,r)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},GeometryCollection:function(t,e,i,n,s,r){const a=e.getGeometriesArray();let l,h;for(l=0,h=a.length;l0;return _&&Promise.all(c).then((()=>r(null))),function(t,e,i,n,s,r,a){const l=i.getGeometryFunction()(e);if(!l)return;const h=l.simplifyTransformed(n,s);i.getRenderer()?u(t,h,i,e,a):(0,o[h.getType()])(t,h,i,e,a,r)}(t,e,i,s,a,l,h),_}function u(t,e,i,n,s){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),s);else{const r=e.getGeometries();for(let e=0,o=r.length;e{i.d(e,{A:()=>c});var n=i(5332),s=i(5986),r=i(9960),o=i(3984),a=i(9777),l=i(9703);class h extends s.A{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=(0,l.vt)(),this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(n.A.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.PRECOMPOSE)){const n=new r.A(o.A.PRECOMPOSE,void 0,e,t);i.dispatchEvent(n)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(o.A.POSTCOMPOSE)){const n=new r.A(o.A.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(n)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e,i=!0,n=-1;for(let s=0,r=t.layerStatesArray.length;s{i.d(e,{eS:()=>j,gF:()=>z,Ay:()=>U});var n=i(8596),s=i(7404),r=i(1078),o=i(9332),a=i(6837),l=i(190),h=i(4087);class c extends o.A{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter=t.gutter||0,this.helper=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===r.A.LOADED,this.loaded)this.uploadTile();else{if(t instanceof l.A){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(a.A.CHANGE,this.handleTileChange_)}}uploadTile(){(0,h.b0)()}setReady(){this.ready=!0,this.dispatchEvent(a.A.CHANGE)}handleTileChange_(){this.tile.getState()===r.A.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(a.A.CHANGE,this.handleTileChange_)}}const u=c;var d=i(7607),g=i(259),_=i(130),f=i(8711),p=i(4401);function m(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function x(t,e,i,n,s,r){const o=t.getGL();let a,l;i instanceof Float32Array?(a=o.FLOAT,t.getExtension("OES_texture_float"),l=null!==t.getExtension("OES_texture_float_linear")):(a=o.UNSIGNED_BYTE,l=!0),m(o,e,r&&l);const h=i.byteLength/n[1];let c,u=1;switch(h%8==0?u=8:h%4==0?u=4:h%2==0&&(u=2),s){case 1:c=o.LUMINANCE;break;case 2:c=o.LUMINANCE_ALPHA;break;case 3:c=o.RGB;break;case 4:c=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${s}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,u),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let v=null;const y=class extends u{constructor(t){super(t),this.textures=[],this.renderSize_=(0,p.xq)(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new g.Ay(_.H7,_.Ek);e.fromArray([0,1,1,1,1,0,0,0]),this.helper.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper,e=t.getGL(),i=this.tile;let n;this.textures.length=0,n=i instanceof l.A||i instanceof s.A?i.getImage():i.getData();const r=(0,d.xo)(n);if(r){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,function(t,e,i,n){m(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,r,i.interpolate),void this.setReady()}n=(0,d.bL)(n);const o=i.getSize(),a=[o[0]+2*this.gutter,o[1]+2*this.gutter],h=n instanceof Float32Array,c=a[0]*a[1],u=h?Float32Array:Uint8Array,g=u.BYTES_PER_ELEMENT,_=n.byteLength/a[1];this.bandCount=Math.floor(_/g/a[0]);const f=Math.ceil(this.bandCount/4);if(1===f){const s=e.createTexture();return this.textures.push(s),x(t,s,n,a,this.bandCount,i.interpolate),void this.setReady()}const p=new Array(f);for(let t=0;t=p;--s){const i=c.getTileRangeForExtentAndZ(e,s,this.tempTileRange_),a=c.getResolution(s);for(let e=i.minX;e<=i.maxX;++e)for(let h=i.minY;h<=i.maxY;++h){const i=(0,S.N)(s,e,h,this.tempTileCoord_),f=O(l,i);let p,m;if(_.containsKey(f)&&(p=_.get(f),m=p.tile),!(p&&p.tile.key===l.getKey()||(m=l.getTile(s,e,h,t.pixelRatio,o.projection),m)))continue;if(M(n,m))continue;p?p.setTile(m):(p=this.createTileRepresentation({tile:m,grid:c,helper:this.helper,gutter:u}),_.set(f,p)),F(n,p,s);const x=m.getKey();g[x]=!0,m.getState()===r.A.IDLE&&(t.tileQueue.isKeyQueued(x)||t.tileQueue.enqueue([m,d,c.getTileCoordCenter(i),a]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}beforeTilesMaskRender(t){return!1}renderTile(t,e,i,n,s,r,o,a,l,h,c){}renderTileMask(t,e,i,n){}drawTile_(t,e,i,n,s,r,o){if(!e.ready)return;const a=e.tile.tileCoord,l=(0,S.i7)(a),h=l in r?r[l]:1,c=o.getResolution(i),u=(0,p.xq)(o.getTileSize(i),this.tempSize_),d=o.getOrigin(i),g=o.getTileCoordExtent(a),_=h<1?-1:P(i);h<1&&(t.animate=!0);const f=t.viewState,m=f.center[0],x=f.center[1],v=u[0]+2*n,y=u[1]+2*n,E=v/y,T=(m-d[0])/(u[0]*c),A=(d[1]-x)/(u[1]*c),C=f.resolution/c,w=a[1],b=a[2];(0,R.cL)(this.tileTransform_),(0,R.hs)(this.tileTransform_,2/(t.size[0]*C/v),-2/(t.size[1]*C/v)),(0,R.e$)(this.tileTransform_,f.rotation),(0,R.hs)(this.tileTransform_,1,1/E),(0,R.Tl)(this.tileTransform_,(u[0]*(w-T)-n)/v,(u[1]*(b-A)-n)/y),this.renderTile(e,this.tileTransform_,t,s,c,u,d,g,_,n,h)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,o=this.getLayer(),a=o.getRenderSource(),l=a.getTileGridForProjection(i.projection),c=a.getGutterForProjection(i.projection),u=D(t,t.extent),d=l.getZForResolution(i.resolution,a.zDirection),g={tileIds:new Set,representationsByZ:{}},_=o.getPreload();if(t.nextExtent){const e=l.getZForResolution(i.nextResolution,a.zDirection),n=D(t,t.nextExtent);this.enqueueTiles(t,n,e,g,_)}this.enqueueTiles(t,u,d,g,0),_>0&&setTimeout((()=>{this.enqueueTiles(t,u,d-1,g,_-1)}),0);const f={},p=(0,h.v6)(this),m=t.time;let x=!1;const v=g.representationsByZ;if(d in v)for(const t of v[d]){const e=t.tile;if((e instanceof s.A||e instanceof n.A)&&e.getState()===r.A.EMPTY)continue;const i=e.tileCoord;if(t.ready){const t=e.getAlpha(p,m);if(1===t){e.endTransition(p);continue}x=!0,f[(0,S.i7)(i)]=t}if(this.renderComplete=!1,this.findAltTiles_(l,i,d+1,g))continue;const o=l.getMinZoom();for(let t=d-1;t>=o&&!this.findAltTiles_(l,i,t,g);--t);}const y=Object.keys(v).map(Number).sort(w.rG);if(this.beforeTilesMaskRender(t))for(let t=0,e=y.length;tt.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}}const N=k;var G=i(9777);const z={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},j={TEXTURE_COORD:"a_textureCoord"},B=[{name:j.TEXTURE_COORD,size:2,type:G.jQ.FLOAT}],U=class extends N{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new g.Ay(_.IP,_.Ek),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){if(super.reset(t),this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}removeHelper(){if(this.helper){const t=this.helper.getGL();for(const e of this.paletteTextures_)e.delete(t)}super.removeHelper()}createTileRepresentation(t){return new y(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,i,n,s,r,o,a,l,h,c){const u=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(B);let d=0;for(;d0&&(v=a,(0,I._N)(v,n,v)),this.helper.setUniformFloatVec4(z.RENDER_EXTENT,v),this.helper.setUniformFloatValue(z.RESOLUTION,g.resolution),this.helper.setUniformFloatValue(z.ZOOM,g.zoom),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_WIDTH,_),this.helper.setUniformFloatValue(z.TEXTURE_PIXEL_HEIGHT,f),this.helper.setUniformFloatValue(z.TEXTURE_RESOLUTION,s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_X,o[0]+m*r[0]*s-h*s),this.helper.setUniformFloatValue(z.TEXTURE_ORIGIN_Y,o[1]-x*r[1]*s+h*s),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const e=this.frameState;if(!e)return null;const i=this.getLayer(),o=(0,R.Bb)(e.pixelToCoordinateTransform,t.slice()),a=e.viewState,l=i.getExtent();if(l&&!(0,I.Ym)((0,b.SD)(l,a.projection),o))return null;const h=i.getSources((0,I.Tr)([o]),a.resolution);let c,u,d;for(c=h.length-1;c>=0;--c)if(u=h[c],"ready"===u.getState()){if(d=u.getTileGridForProjection(a.projection),u.getWrapX())break;const t=d.getExtent();if(!t||(0,I.Ym)(t,o))break}if(c<0)return null;const g=this.tileRepresentationCache;for(let t=d.getZForResolution(a.resolution);t>=d.getMinZoom();--t){const e=d.getTileCoordForCoordAndZ(o,t),i=O(u,e);if(!g.containsKey(i))continue;const a=g.get(i),l=a.tile;if((l instanceof s.A||l instanceof n.A)&&l.getState()===r.A.EMPTY)return null;if(!a.loaded)continue;const h=d.getOrigin(t),c=(0,p.xq)(d.getTileSize(t)),_=d.getResolution(t),f=(o[0]-h[0])/_-e[1]*c[0],m=(h[1]-o[1])/_-e[2]*c[1];return a.getPixelData(f,m)}return null}disposeInternal(){const t=this.helper;if(t){const e=t.getGL();for(const t of this.paletteTextures_)t.delete(e);this.paletteTextures_.length=0,e.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_}}},3513:(t,e,i)=>{i.d(e,{BV:()=>l,KQ:()=>u,XX:()=>g,aY:()=>d});var n=i(915),s=i(8711),r=i(3407),o=i(1597);let a;const l=[];function h(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function c(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function u(t,e,i,s){const o=(0,r.pd)(i,e,t);let a=(0,r.hO)(e,s,i);const l=e.getMetersPerUnit();void 0!==l&&(a*=l);const h=t.getMetersPerUnit();void 0!==h&&(a/=h);const c=t.getExtent();if(!c||(0,n.Ym)(c,o)){const e=(0,r.hO)(t,a,o)/a;isFinite(e)&&e>0&&(a/=e)}return a}function d(t,e,i,s){const r=(0,n.q1)(i);let o=u(t,e,r,s);return(!isFinite(o)||o<=0)&&(0,n.sB)(i,(function(i){return o=u(t,e,i,s),isFinite(o)&&o>0})),o}function g(t,e,i,r,u,d,g,_,f,p,m,x,v,y){const E=(0,s.Y)(Math.round(i*t),Math.round(i*e),l);if(x||(E.imageSmoothingEnabled=!1),0===f.length)return E.canvas;function T(t){return Math.round(t*i)/i}E.scale(i,i),E.globalCompositeOperation="lighter";const A=(0,n.S5)();let C;f.forEach((function(t,e,i){(0,n.X$)(A,t.extent)}));const S=i/r,R=(x?1:1+Math.pow(2,-24))/S;if(!v||1!==f.length||0!==p){if(C=(0,s.Y)(Math.round((0,n.RG)(A)*S),Math.round((0,n.Oq)(A)*S),l),x||(C.imageSmoothingEnabled=!1),u&&y){const t=(u[0]-A[0])*S,e=-(u[3]-A[3])*S,i=(0,n.RG)(u)*S,s=(0,n.Oq)(u)*S;C.rect(t,e,i,s),C.clip()}f.forEach((function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){C.save();const e=(t.clipExtent[0]-A[0])*S,i=-(t.clipExtent[3]-A[3])*S,s=(0,n.RG)(t.clipExtent)*S,r=(0,n.Oq)(t.clipExtent)*S;C.rect(x?e:Math.round(e),x?i:Math.round(i),x?s:Math.round(e+s)-Math.round(e),x?r:Math.round(i+r)-Math.round(i)),C.clip()}const e=(t.extent[0]-A[0])*S,i=-(t.extent[3]-A[3])*S,s=(0,n.RG)(t.extent)*S,r=(0,n.Oq)(t.extent)*S;C.drawImage(t.image,p,p,t.image.width-2*p,t.image.height-2*p,x?e:Math.round(e),x?i:Math.round(i),x?s:Math.round(e+s)-Math.round(e),x?r:Math.round(i+r)-Math.round(i)),t.clipExtent&&C.restore()}}))}const w=(0,n.Py)(g);return _.getTriangles().forEach((function(t,e,i){const r=t.source,u=t.target;let g=r[0][0],_=r[0][1],p=r[1][0],m=r[1][1],v=r[2][0],y=r[2][1];const S=T((u[0][0]-w[0])/d),b=T(-(u[0][1]-w[1])/d),I=T((u[1][0]-w[0])/d),L=T(-(u[1][1]-w[1])/d),P=T((u[2][0]-w[0])/d),M=T(-(u[2][1]-w[1])/d),F=g,D=_;g=0,_=0,p-=F,m-=D,v-=F,y-=D;const O=[[p,m,0,0,I-S],[v,y,0,0,P-S],[0,0,p,m,L-b],[0,0,v,y,M-b]],k=(0,o.KU)(O);if(!k)return;if(E.save(),E.beginPath(),function(){if(void 0===a){const t=(0,s.Y)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",h(t,4,5,4,0),h(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;a=c(e,0)||c(e,4)||c(e,8),(0,s.Yg)(t),l.push(t.canvas)}return a}()||!x){E.moveTo(I,L);const t=4,e=S-I,i=b-L;for(let n=0;n{i.d(e,{A:()=>_});var n=i(3101),s=i(7607),r=i(6837),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(8711),u=i(915),d=i(9438);class g extends s.Ay{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,i=e.getExtent(),s=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?s?(0,u._N)(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),c=this.targetTileGrid_.getExtent();let d=this.sourceTileGrid_.getExtent();const g=c?(0,u._N)(r,c):r;if(0===(0,u.UG)(g))return void(this.state=o.A.EMPTY);i&&(d=d?(0,u._N)(d,i):i);const _=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),f=t.targetProj,p=(0,l.aY)(e,f,g,_);if(!isFinite(p)||p<=0)return void(this.state=o.A.EMPTY);const m=void 0!==t.errorThreshold?t.errorThreshold:n.l;if(this.triangulation_=new a.A(e,f,g,d,p*m,_),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=this.sourceTileGrid_.getZForResolution(p);let x=this.triangulation_.calculateSourceExtent();if(d&&(e.canWrapX()?(x[1]=(0,h.qE)(x[1],d[1],d[3]),x[3]=(0,h.qE)(x[3],d[1],d[3])):x=(0,u._N)(x,d)),(0,u.UG)(x)){let n=0,s=0;e.canWrapX()&&(n=(0,u.RG)(i),s=Math.floor((x[0]-i[0])/n)),(0,u.QJ)(x.slice(),e,!0).forEach((e=>{const i=this.sourceTileGrid_.getTileRangeForExtentAndZ(e,this.sourceZ_),r=t.getTileFunction;for(let t=i.minX;t<=i.maxX;t++)for(let e=i.minY;e<=i.maxY;e++){const i=r(this.sourceZ_,t,e,this.pixelRatio_);if(i){const t=s*n;this.sourceTiles_.push({tile:i,offset:t})}}++s})),0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];let e=!1;if(this.sourceTiles_.forEach((i=>{const n=i.tile;if(!n||n.getState()!==o.A.LOADED)return;const r=n.getSize(),a=this.gutter_;let l;const h=(0,s.bL)(n.getData());h?l=h:(e=!0,l=(0,s.$r)((0,s.xo)(n.getData())));const c=[r[0]+2*a,r[1]+2*a],u=l instanceof Float32Array,d=c[0]*c[1],g=u?Float32Array:Uint8ClampedArray,_=new g(l.buffer),f=g.BYTES_PER_ELEMENT,p=f*_.length/d,m=_.byteLength/c[1],x=Math.floor(m/f/c[0]),v=d*x;let y=_;if(_.length!==v){y=new g(v);let t=0,e=0;const i=c[0]*x;for(let n=0;n=0;--e){const i=[];for(let n=0,s=t.length;n{const i=e.getState();if(i!==o.A.IDLE&&i!==o.A.LOADING)return;t++;const n=(0,d.KT)(e,r.A.CHANGE,(()=>{const i=e.getState();i!=o.A.LOADED&&i!=o.A.ERROR&&i!=o.A.EMPTY||((0,d.JH)(n),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}));this.sourcesListenerKeys_.push(n)})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t}){t.getState()==o.A.IDLE&&t.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(d.JH),this.sourcesListenerKeys_=null}}const _=g},7404:(t,e,i)=>{i.d(e,{A:()=>_});var n=i(3101),s=i(6837),r=i(8143),o=i(1078),a=i(2913),l=i(3513),h=i(1597),c=i(915),u=i(9438),d=i(8711);class g extends r.A{constructor(t,e,i,s,r,u,d,g,_,f,p,m){super(r,o.A.IDLE,m),this.renderEdges_=void 0!==p&&p,this.pixelRatio_=d,this.gutter_=g,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=u||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const x=s.getTileCoordExtent(this.wrappedTileCoord_),v=this.targetTileGrid_.getExtent();let y=this.sourceTileGrid_.getExtent();const E=v?(0,c._N)(x,v):x;if(0===(0,c.UG)(E))return void(this.state=o.A.EMPTY);const T=t.getExtent();T&&(y=y?(0,c._N)(y,T):T);const A=s.getResolution(this.wrappedTileCoord_[0]),C=(0,l.aY)(t,i,E,A);if(!isFinite(C)||C<=0)return void(this.state=o.A.EMPTY);const S=void 0!==f?f:n.l;if(this.triangulation_=new a.A(t,i,E,y,C*S,A),0===this.triangulation_.getTriangles().length)return void(this.state=o.A.EMPTY);this.sourceZ_=e.getZForResolution(C);let R=this.triangulation_.calculateSourceExtent();if(y&&(t.canWrapX()?(R[1]=(0,h.qE)(R[1],y[1],y[3]),R[3]=(0,h.qE)(R[3],y[1],y[3])):R=(0,c._N)(R,y)),(0,c.UG)(R)){let i=0,n=0;t.canWrapX()&&(i=(0,c.RG)(T),n=Math.floor((R[0]-T[0])/i)),(0,c.QJ)(R.slice(),t,!0).forEach((t=>{const s=e.getTileRangeForExtentAndZ(t,this.sourceZ_);for(let t=s.minX;t<=s.maxX;t++)for(let e=s.minY;e<=s.maxY;e++){const s=_(this.sourceZ_,t,e,d);if(s){const t=n*i;this.sourceTiles_.push({tile:s,offset:t})}}++n})),0===this.sourceTiles_.length&&(this.state=o.A.EMPTY)}else this.state=o.A.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{const i=e.tile;if(i&&i.getState()==o.A.LOADED){const n=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);n[0]+=e.offset,n[2]+=e.offset;const s=this.clipExtent_?.slice();s&&(s[0]+=e.offset,s[2]+=e.offset),t.push({extent:n,clipExtent:s,image:i.getImage()})}})),this.sourceTiles_.length=0,0===t.length)this.state=o.A.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.XX)(n,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),r,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=o.A.LOADED}this.changed()}load(){if(this.state==o.A.IDLE){this.state=o.A.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:e})=>{const i=e.getState();if(i==o.A.IDLE||i==o.A.LOADING){t++;const i=(0,u.KT)(e,s.A.CHANGE,(n=>{const s=e.getState();s!=o.A.LOADED&&s!=o.A.ERROR&&s!=o.A.EMPTY||((0,u.JH)(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}));this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t},e,i){t.getState()==o.A.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(u.JH),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,d.Yg)(this.canvas_.getContext("2d")),l.BV.push(this.canvas_),this.canvas_=null),super.release()}}const _=g},2913:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(915),s=i(3407),r=i(1597);const o=class{constructor(t,e,i,r,o,a){this.sourceProj_=t,this.targetProj_=e;let l={};const h=(0,s.RG)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return l[e]||(l[e]=h(t)),l[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&(0,n.RG)(r)>=(0,n.RG)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,n.RG)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,n.RG)(this.targetProj_.getExtent()):null;const c=(0,n.Py)(i),u=(0,n.WU)(i),d=(0,n.k_)(i),g=(0,n.R)(i),_=this.transformInv_(c),f=this.transformInv_(u),p=this.transformInv_(d),m=this.transformInv_(g),x=10+(a?Math.max(0,Math.ceil(Math.log2((0,n.UG)(i)/(a*a*256*256)))):0);if(this.addQuad_(c,u,d,g,_,f,p,m,x),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&d<1;let f=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const r=(0,n.Tr)([t,e,i,s]);f=(0,n.RG)(r)/this.targetWorldWidth_>.25||f}!_&&this.sourceProj_.isGlobal()&&d&&(f=d>.25||f)}if(!f&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!(0,n.HY)(u,this.maxSourceExtent_))return;let p=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(h[0])&&isFinite(h[1])))if(c>0)f=!0;else if(p=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1),1!=p&&2!=p&&4!=p&&8!=p)return;if(c>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let s;s=_?((0,r.xP)(o[0],g)+(0,r.xP)(l[0],g))/2-(0,r.xP)(n[0],g):(o[0]+l[0])/2-n[0];const a=(o[1]+l[1])/2-n[1];f=s*s+a*a>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const n=[(e[0]+i[0])/2,(e[1]+i[1])/2],r=this.transformInv_(n),u=[(s[0]+t[0])/2,(s[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,n,u,o,a,r,d,c-1),this.addQuad_(u,n,i,s,d,r,l,h,c-1)}else{const n=[(t[0]+e[0])/2,(t[1]+e[1])/2],r=this.transformInv_(n),u=[(i[0]+s[0])/2,(i[1]+s[1])/2],d=this.transformInv_(u);this.addQuad_(t,n,u,s,o,r,d,h,c-1),this.addQuad_(n,e,i,u,r,a,l,d,c-1)}return}}if(_){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&p||this.addTriangle_(t,i,s,o,l,h),14&p||this.addTriangle_(t,i,e,o,l,a),p&&(13&p||this.addTriangle_(e,s,t,a,h,o),7&p||this.addTriangle_(e,s,i,a,h,l))}calculateSourceExtent(){const t=(0,n.S5)();return this.triangles_.forEach((function(e,i,s){const r=e.source;(0,n.$C)(t,r[0]),(0,n.$C)(t,r[1]),(0,n.$C)(t,r[2])})),t}getTriangles(){return this.triangles_}}},3101:(t,e,i)=>{i.d(e,{l:()=>n});const n=.5},4498:(t,e,i)=>{i.d(e,{a$:()=>o,b8:()=>s,cq:()=>a,dv:()=>r});var n=i(1597);function s(t){if(void 0!==t)return 0}function r(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function a(t){const e=void 0===t?(0,n.eh)(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}},4401:(t,e,i)=>{function n(t){return t[0]>0&&t[1]>0}function s(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function r(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Ie:()=>n,hs:()=>s,xq:()=>r})},6203:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(6837),s=i(6717),r=i(4294),o=i(731),a=i(6933),l=i(588),h=i(915),c=i(4087);class u extends o.A{constructor(t){super({attributions:(t=t||{}).attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return(0,l.v)(!e||"Point"===e.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source?.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(n.A.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(n.A.CHANGE,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=(0,h.S5)(),e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let s=0,r=i.length;s=0;--e){const n=this.geometryFunction(t[e]);n?(0,a.WQ)(i,n.getCoordinates()):t.splice(e,1)}(0,a.hs)(i,1/t.length);const n=(0,h.q1)(e),o=this.interpolationRatio,l=new r.A([i[0]*(1-o)+n[0]*o,i[1]*(1-o)+n[1]*o]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new s.A({geometry:l,features:t})}}const d=u},4977:(t,e,i)=>{i.d(e,{A:()=>m});var n=i(7607),s=i(6837),r=i(8596),o=i(61),a=i(8469),l=i(6017),h=i(1078),c=i(4863),u=i(3407),d=i(186),g=i(4087),_=i(4238),f=i(4401);class p extends l.A{constructor(t){const e=void 0===t.projection?"EPSG:3857":t.projection;let i=t.tileGrid;void 0===i&&e&&(i=(0,c.EN)({extent:(0,c.kZ)(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize})),super({cacheSize:.1,attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:e,tileGrid:i,state:t.state,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.tileSize_=t.tileSize?(0,f.xq)(t.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=t.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===t.bandCount?4:t.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={},this.crossOrigin_=t.crossOrigin||"anonymous"}setTileSizes(t){this.tileSizes_=t}getTileSize(t){if(this.tileSizes_)return this.tileSizes_[t];if(this.tileSize_)return this.tileSize_;const e=this.getTileGrid();return e?(0,f.xq)(e.getTileSize(t)):[256,256]}getGutterForProjection(t){const e=this.getProjection();return!e||(0,u.tI)(e,t)?this.gutter_:0}setLoader(t){this.loader_=t}getReprojTile_(t,e,i,n,s){const o=this.getTileCacheForProjection(n),a=(0,d.dp)(t,e,i);if(o.containsKey(a)){const t=o.get(a);if(t&&t.key==this.getKey())return t}const l=this.getTileGrid(),h=Math.max.apply(null,l.getResolutions().map(((t,e)=>{const i=(0,f.xq)(l.getTileSize(e)),n=this.getTileSize(e);return Math.max(n[0]/i[0],n[1]/i[1])}))),c=this.getTileGridForProjection(s),u=this.getTileGridForProjection(n),g=[t,e,i],_=this.getTileCoordForTileUrlFunction(g,n),p=Object.assign({sourceProj:s,sourceTileGrid:c,targetProj:n,targetTileGrid:u,tileCoord:g,wrappedTileCoord:_,pixelRatio:h,gutter:this.getGutterForProjection(s),getTileFunction:(t,e,i,n)=>this.getTile(t,e,i,n,s)},this.tileOptions),m=new r.A(p);return m.key=this.getKey(),m}getTile(t,e,i,r,o){const a=this.getProjection();if(a&&o&&!(0,u.tI)(a,o))return this.getReprojTile_(t,e,i,o,a);const l=this.getTileSize(t),h=(0,d.dp)(t,e,i);if(this.tileCache.containsKey(h))return this.tileCache.get(h);const c=this.loader_,g=new AbortController,f={signal:g.signal,crossOrigin:this.crossOrigin_},p=this.getTileCoordForTileUrlFunction([t,e,i]);if(!p)return null;const m=p[0],x=p[1],v=p[2],y=Object.assign({tileCoord:[t,e,i],loader:function(){return(0,_.hq)((function(){return c(m,x,v,f)}))},size:l,controller:g},this.tileOptions),E=new n.Ay(y);return E.key=this.getKey(),E.addEventListener(s.A.CHANGE,this.handleTileChange_),this.tileCache.set(h,E),E}handleTileChange_(t){const e=t.target,i=(0,g.v6)(e),n=e.getState();let s;n==h.A.LOADING?(this.tileLoadingKeys_[i]=!0,s=a.A.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=n==h.A.ERROR?a.A.TILELOADERROR:n==h.A.LOADED?a.A.TILELOADEND:void 0),s&&this.dispatchEvent(new l.c(s,e))}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,u.tI)(e,t)))return this.tileGrid;const i=(0,g.v6)(t);return i in this.tileGridForProjection_||(this.tileGridForProjection_[i]=(0,c.pr)(t)),this.tileGridForProjection_[i]}setTileGridForProjection(t,e){const i=(0,u.Jt)(t);if(i){const t=(0,g.v6)(i);t in this.tileGridForProjection_||(this.tileGridForProjection_[t]=e)}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,u.tI)(e,t))return this.tileCache;const i=(0,g.v6)(t);return i in this.tileCacheForProjection_||(this.tileCacheForProjection_[i]=new o.A(.1)),this.tileCacheForProjection_[i]}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection_){const n=this.tileCacheForProjection_[t];n.expireCache(n==i?e:{})}}clear(){super.clear();for(const t in this.tileCacheForProjection_)this.tileCacheForProjection_[t].clear()}}const m=p},9925:(t,e,i)=>{i.d(e,{Ay:()=>C,VV:()=>T,QD:()=>A});var n=i(1685),s=i(6837),r=i(6141),o=i(3938),a=i(3101),l=i(2913),h=i(3513);function c(t){return Array.isArray(t)?Math.min(...t):t}var u=i(915),d=i(9438);class g extends o.Ay{constructor(t,e,i,n,s,o,c){let d=t.getExtent();d&&t.canWrapX()&&(d=d.slice(),d[0]=-1/0,d[2]=1/0);let g=e.getExtent();g&&e.canWrapX()&&(g=g.slice(),g[0]=-1/0,g[2]=1/0);const _=g?(0,u._N)(i,g):i,f=(0,u.q1)(_),p=(0,h.KQ)(t,e,f,n),m=a.l,x=new l.A(t,e,_,d,p*m,n),v=x.calculateSourceExtent(),y=(0,u.Im)(v)?null:o(v,p,s),E=y?r.A.IDLE:r.A.EMPTY,T=y?y.getPixelRatio():1;super(i,n,T,E),this.targetProj_=e,this.maxSourceExtent_=d,this.triangulation_=x,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=y,this.sourcePixelRatio_=T,this.interpolate_=c,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==r.A.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==r.A.LOADED){const t=(0,u.RG)(this.targetExtent_)/this.targetResolution_,e=(0,u.Oq)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,h.XX)(t,e,this.sourcePixelRatio_,c(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=t,this.changed()}load(){if(this.state==r.A.IDLE){this.state=r.A.LOADING,this.changed();const t=this.sourceImage_.getState();t==r.A.LOADED||t==r.A.ERROR?this.reproject_():(this.sourceListenerKey_=(0,d.KT)(this.sourceImage_,s.A.CHANGE,(t=>{const e=this.sourceImage_.getState();e!=r.A.LOADED&&e!=r.A.ERROR||(this.unlistenSource_(),this.reproject_())})),this.sourceImage_.load())}}unlistenSource_(){(0,d.JH)(this.sourceListenerKey_),this.sourceListenerKey_=null}}const _=g;var f=i(6444),p=i(2192),m=i(1597),x=i(3407),v=i(6514);class y extends n.Ay{constructor(t,e){super(t),this.image=e}}class E extends f.A{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.loader=t.loader||null,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!t.loader&&0===t.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();return e&&(t=e[(0,v.FT)(e,t,0)]),t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||(0,x.tI)(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,x.tI)(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&(0,u.aI)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new _(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){if(this.loader){const r=A(t,e,i,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===n&&(this.wantedExtent_&&(0,u.ms)(this.wantedExtent_,r)||(0,u.ms)(this.image.getExtent(),r))&&(this.wantedResolution_&&c(this.wantedResolution_)===a||c(this.image.getResolution())===a)))return this.image;this.wantedProjection_=n,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new o.Ay(r,a,i,this.loader),this.image.addEventListener(s.A.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case r.A.LOADING:this.loading=!0,i="imageloadstart";break;case r.A.LOADED:this.loading=!1,i="imageloadend";break;case r.A.ERROR:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new y(i,e))}}function T(t,e){t.getImage().src=e}function A(t,e,i,n){const s=e/i,r=(0,u.q1)(t),o=(0,m.mk)((0,u.RG)(t)/s,p.B),a=(0,m.mk)((0,u.Oq)(t)/s,p.B),l=o+2*(0,m.mk)((n-1)*o/2,p.B),h=a+2*(0,m.mk)((n-1)*a/2,p.B);return(0,u.Bg)(r,s,0,[l,h])}const C=E},8270:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(6837),s=i(9925),r=i(3938),o=i(915),a=i(3407);class l extends s.Ay{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:s.VV;super({attributions:t.attributions,interpolate:t.interpolate,projection:(0,a.Jt)(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new r.Ay(this.imageExtent_,void 0,1,function(t){const e=t.load||r.D4,i=t.imageExtent,n=t.crossOrigin??null;return()=>{const s=new Image;return s.crossOrigin=n,e(s,t.url).then((t=>{const e=(0,o.RG)(i)/t.width,n=(0,o.Oq)(i)/t.height;return{image:t,extent:i,resolution:e!==n?[e,n]:n,pixelRatio:1}}))}}({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,load:(t,e)=>(this.image.setImage(t),i(this.image,e),(0,r.D4)(t))})),this.image.addEventListener(n.A.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return(0,o.HY)(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}const h=l},3080:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(4977),s=i(4465);const r=new Error("Image failed to load");function o(t,e,i,n,o){return new Promise(((a,l)=>{const h=new Image;h.crossOrigin=o.crossOrigin??null,h.addEventListener("load",(()=>a(h))),h.addEventListener("error",(()=>l(r))),h.src=(0,s.M)(t,e,i,n,o.maxY)}))}function a(t){return function(e,i,n,r){return o((0,s.de)(t,e,i,n),e,i,n,r)}}function l(t){let e;if(Array.isArray(t))e=a(t);else if("string"==typeof t)e=a((0,s.Uu)(t));else{if("function"!=typeof t)throw new Error("The url option must be a single template, an array of templates, or a function for getting a URL");i=t,e=function(t,e,n,s){return o(i(t,e,n,s),t,e,n,s)}}var i;return e}let h=0;function c(t){return Array.isArray(t)?t.join("\n"):"string"==typeof t?t:(++h,"url-function-key-"+h)}class u extends n.A{constructor(t){let e,i=(t=t||{}).loader;t.url&&(i=l(t.url),e=c(t.url));const n=i?t.state:"loading",s=void 0===t.wrapX||t.wrapX;super({loader:i,key:e,attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize,gutter:t.gutter,maxResolution:t.maxResolution,projection:t.projection,tileGrid:t.tileGrid,state:n,wrapX:s,transition:t.transition,interpolate:!1!==t.interpolate,crossOrigin:t.crossOrigin})}setUrl(t){const e=l(t);this.setLoader(e),this.setKey(c(t)),"ready"!==this.getState()&&this.setState("ready")}}const d=u},1011:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(9925),s=i(3513),r=i(7500),o=i(3938),a=i(3407);class l extends n.Ay{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:n.VV,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,i,n){const o=(0,a.Jt)(i),l=this.getProjection();l&&l!==o&&(e=(0,s.KQ)(l,o,t,e),t=(0,a.pd)(t,o,l));const h={url:this.url_,params:{...this.params_,...n},projection:l||o};return(0,r.y4)(h,t,e)}getLegendUrl(t,e){return(0,r.$q)({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,i,n){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===n||(this.loaderProjection_=n,this.loader=(0,r.Eq)({crossOrigin:this.crossOrigin_,params:this.params_,projection:n,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(t,e)=>(this.image.setImage(t),this.imageLoadFunction_(this.image,e),(0,o.D4)(t))})),super.getImageInternal(t,e,i,n))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}const h=l},7896:(t,e,i)=>{i.d(e,{A:()=>o,o:()=>s});var n=i(702);const s='© OpenStreetMap contributors.';class r extends n.A{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[s];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}}const o=r},6444:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(4120),s=i(3407);class r extends n.A{constructor(t){super(),this.projection=(0,s.Jt)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible??!0,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?"function"==typeof t?t:(Array.isArray(t)||(t=[t]),e=>t):null}const a=r},6017:(t,e,i)=>{i.d(e,{A:()=>_,c:()=>g});var n=i(1685),s=i(6444),r=i(61),o=i(4087),a=i(588),l=i(3407),h=i(4863),c=i(4401),u=i(186);class d extends s.A{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&(0,c.xq)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new r.A(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s){return(0,o.b0)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:(0,h.pr)(t)}getTileCacheForProjection(t){const e=this.getProjection();return(0,a.v)(null===e||(0,l.tI)(e,t),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),r=(0,c.xq)(n.getTileSize(t),this.tmpSize);return 1==s?r:(0,c.hs)(r,s,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=(0,h.Li)(i,t,e)),(0,u.N5)(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}useTile(t,e,i,n){}}class g extends n.Ay{constructor(t,e){super(t),this.tile=e}}const _=d},8469:(t,e,i)=>{i.d(e,{A:()=>n});const n={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},8512:(t,e,i)=>{i.d(e,{A:()=>f});var n=i(6837),s=i(190),r=i(7404),o=i(61),a=i(1078),l=i(6164),h=i(3407),c=i(186),u=i(4863),d=i(4087);class g extends l.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:_,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:s.A,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!(0,h.tI)(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,h.tI)(e,t)))return this.tileGrid;const i=(0,d.v6)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,u.pr)(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,h.tI)(e,t))return this.tileCache;const i=(0,d.v6)(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new o.A(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,s,r,o){const l=[t,e,i],h=this.getTileCoordForTileUrlFunction(l,r),c=h?this.tileUrlFunction(h,s,r):void 0,u=new this.tileClass(l,void 0!==c?a.A.IDLE:a.A.EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(n.A.CHANGE,this.handleTileChange.bind(this)),u}getTile(t,e,i,n,s){const o=this.getProjection();if(!o||!s||(0,h.tI)(o,s))return this.getTileInternal(t,e,i,n,o||s);const a=this.getTileCacheForProjection(s),l=[t,e,i];let u;const d=(0,c.i7)(l);a.containsKey(d)&&(u=a.get(d));const g=this.getKey();if(u&&u.key==g)return u;const _=this.getTileGridForProjection(o),f=this.getTileGridForProjection(s),p=this.getTileCoordForTileUrlFunction(l,s),m=new r.A(o,_,s,f,l,p,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return m.key=g,u?a.replace(d,m):a.set(d,m),m}getTileInternal(t,e,i,n,s){const r=(0,c.dp)(t,e,i),o=this.getKey();if(!this.tileCache.containsKey(r)){const a=this.createTile_(t,e,i,n,s,o);return this.tileCache.set(r,a),a}let a=this.tileCache.get(r);return a.key!=o&&(a=this.createTile_(t,e,i,n,s,o),this.tileCache.replace(r,a)),a}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=(0,h.Jt)(t);if(i){const t=(0,d.v6)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function _(t,e){t.getImage().src=e}const f=g},4218:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(8512),s=i(915),r=i(2654),o=i(4863),a=i(3407),l=i(4087);Error,Error;class h extends n.A{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:(0,a.Jt)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)!function(t,e,i){const n=document.createElement("script"),s="olc_"+(0,l.v6)(e);function r(){delete window[s],n.parentNode.removeChild(n)}n.async=!0,n.src=t+(t.includes("?")?"&":"?")+"callback="+s;const o=setTimeout((function(){r(),i&&i()}),1e4);window[s]=function(t){clearTimeout(o),r(),e(t)},document.head.appendChild(n)}(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else{if(!t.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(t.tileJSON)}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=(0,a.Jt)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=(0,a.FO)(e,i);n=(0,s.NW)(t.bounds,r)}const l=(0,o.kZ)(i),h=t.minzoom||0,c=t.maxzoom||22,u=(0,o.EN)({extent:l,maxZoom:c,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=u,this.tileUrlFunction=(0,r.Qz)(t.tiles,u),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:l;this.setAttributions((function(i){return(0,s.HY)(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const c=h},2728:(t,e,i)=>{i.d(e,{A:()=>g});var n=i(8512),s=i(7500),r=i(4465),o=i(915),a=i(3513),l=i(2806),h=i(3407),c=i(1597),u=i(186);class d extends n.A{constructor(t){t=t||{};const e=Object.assign({},t.params);super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=(0,o.S5)(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const r=(0,h.Jt)(i),l=this.getProjection()||r;let c=this.getTileGrid();c||(c=this.getTileGridForProjection(l));const u=(0,h.pd)(t,r,l),d=(0,a.KQ)(l,r,t,e),g=c.getZForResolution(d,this.zDirection),_=c.getResolution(g),f=c.getTileCoordForCoordAndZ(u,g);if(c.getResolutions().length<=f[0])return;let p=c.getTileCoordExtent(f,this.tmpExtent_);const m=this.gutter_;0!==m&&(p=(0,o.r)(p,_*m,p));const x={QUERY_LAYERS:this.params_.LAYERS};Object.assign(x,(0,s.W3)(this.params_,"GetFeatureInfo"),n);const v=Math.floor((u[0]-p[0])/_),y=Math.floor((p[3]-u[1])/_);return x[this.v13_?"I":"X"]=v,x[this.v13_?"J":"Y"]=y,this.getRequestUrl_(f,p,1,l||r,x)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:s.jD,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),(0,r.LW)(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r){const o=this.urls;if(!o)return;let a;return a=1==o.length?o[0]:o[(0,c.xP)((0,u.tW)(t),o.length)],(0,s.AE)(e,(this.tileGrid||this.getTileGridForProjection(n)).getResolution(t[0]),i,n,a,r,this.serverType_)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||s.jD;this.v13_=(0,l.Z)(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const r=n.getResolution(t[0]);let a=n.getTileCoordExtent(t,this.tmpExtent_);const l=this.gutter_;0!==l&&(a=(0,o.r)(a,r*l,a));const h=Object.assign({},(0,s.W3)(this.params_,"GetMap"));return this.getRequestUrl_(t,a,e,i,h)}}const g=d},6164:(t,e,i)=>{i.d(e,{A:()=>u});var n=i(8469),s=i(6017),r=i(1078),o=i(2654),a=i(4465),l=i(186),h=i(4087);class c extends s.A{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===c.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=(0,h.v6)(e),o=e.getState();let a;o==r.A.LOADING?(this.tileLoadingKeys_[i]=!0,a=n.A.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],a=o==r.A.ERROR?n.A.TILELOADERROR:o==r.A.LOADED?n.A.TILELOADEND:void 0),null!=a&&this.dispatchEvent(new s.c(a,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=(0,a.Uu)(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,o.Qz)(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=(0,l.dp)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const u=c},731:(t,e,i)=>{i.d(e,{A:()=>A});var n=i(71),s=i(2135),r=i(1685),o=i(6837),a=i(8450),l=i(5902),h=i(4778),c=i(6444),u=i(8280),d=i(4238);function g(t,e){return[[-1/0,-1/0,1/0,1/0]]}i(3407);var _=i(588),f=i(915),p=i(6514),m=i(4087),x=i(3530),v=i(9438),y=i(1142);class E extends r.Ay{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class T extends c.A{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=d.tV,this.format_=t.format||null,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,_.v)(this.format_,"`format` must be set when `url` is set"),this.loader_=(0,y.nF)(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:g;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,s;this.featuresRtree_=e?new l.A:null,this.loadedExtentsRtree_=new l.A,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),e||void 0!==i||(i=new n.A(s)),void 0!==s&&this.addFeaturesInternal(s),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=(0,m.v6)(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new E(u.A.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof h.Ay||(this.featureChangeKeys_[t]=[(0,v.KT)(e,o.A.CHANGE,this.handleFeatureChange_,this),(0,v.KT)(e,a.A.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof h.Ay){const n=this.idIndex_[t];n instanceof h.Ay?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&((0,_.v)(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(s.A.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(v.JH);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new E(u.A.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof h.Ay||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,x.p)(this.nullGeometryFeatures_)||(0,p.X$)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=(0,f.QJ)(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||d.rT,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e instanceof h.Ay?0:e.closestPointXY(i,n,r,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new E(u.A.FEATURESLOADERROR))})),n.insert(r,{extent:r.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,f.aI)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,n=t.length;i{i.d(e,{A:()=>n});const n={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},5620:(t,e,i)=>{i.d(e,{A:()=>C});var n=i(6837),s=i(8143),r=i(1078);class o extends s.A{constructor(t,e,i,n,s,r){super(t,e,r),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==r.A.IDLE&&(this.setState(r.A.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(r.A.ERROR)}setFeatures(t){this.features_=t,this.setState(r.A.LOADED)}setLoader(t){this.loader_=t}}const a=o;var l=i(61),h=i(6758),c=i(6164),u=i(8711),d=i(4087);const g=[];class _ extends s.A{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_=null,this.executorGroups=[],this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(){return this.context_||(this.context_=(0,u.Y)(1,1,g)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(t){const e=(0,d.v6)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){(0,u.Yg)(this.context_),g.push(this.context_.canvas),this.context_=null,super.release()}}const f=_;var p=i(9496),m=i(915),x=i(4863),v=i(186),y=i(3530),E=i(1142),T=i(4401);class A extends c.A{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||(0,x.kZ)(e),n=t.tileGrid||(0,x.EN)({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:S,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache_=new l.A(128),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:a,this.tileGrids_={}}getOverlaps(){return this.overlaps_}clear(){this.sourceTileCache_.clear()}expireCache(t,e){const i=this.getTileCacheForProjection(t),n=Object.keys(e).reduce(((t,e)=>{const n=(0,v.gr)(e),s=i.peek(n);if(s){const e=s.sourceTiles;for(let i=0,n=e.length;i{const o=this.tileUrlFunction(s,t,e),a=this.sourceTileCache_.containsKey(o)?this.sourceTileCache_.get(o):new this.tileClass(s,o?r.A.IDLE:r.A.EMPTY,o,this.format_,this.tileLoadFunction);i.sourceTiles.push(a);const l=a.getState();if(l{this.handleTileChange(e);const s=a.getState();if(s===r.A.LOADED||s===r.A.ERROR){const e=a.getKey();e in i.errorTileKeys?a.getState()===r.A.LOADED&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,s===r.A.ERROR?i.errorTileKeys[e]=!0:a.removeEventListener(n.A.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,y.p)(i.errorTileKeys)?r.A.LOADED:r.A.ERROR)}};a.addEventListener(n.A.CHANGE,t),i.loadingSourceTiles++}l===r.A.IDLE&&(a.extent=c.getTileCoordExtent(s),a.projection=e,a.resolution=c.getResolution(s[0]),this.sourceTileCache_.set(o,a),a.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===r.A.ERROR))?r.A.ERROR:r.A.LOADED)}return i.sourceTiles}getTile(t,e,i,n,s){const o=[t,e,i];let a=this.getTileCoordForTileUrlFunction(o,s);const l=this.getTileGrid().getExtent(),h=this.getTileGridForProjection(s);if(a&&l){const e=h.getTileCoordExtent(a);(0,m.r)(e,-h.getResolution(t),e),(0,m.HY)(l,e)||(a=null)}let c=!0;if(null!==a){const e=this.tileGrid,i=h.getResolution(t),r=e.getZForResolution(i,1),o=h.getTileCoordExtent(a);(0,m.r)(o,-i,o),e.forEachTileCoord(o,r,(t=>{c=c&&!this.tileUrlFunction(t,n,s)}))}const u=new f(o,c?r.A.EMPTY:r.A.IDLE,a,this.getSourceTiles.bind(this,n,s));return u.key=this.getKey(),u}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),s=n.map((function(e,i){return t.getOrigin(i)})),r=n.map((function(e,i){return t.getTileSize(i)})),o=p.L+1;for(let t=n.length;t{i.d(e,{A:()=>u,t:()=>d});var n=i(8512),s=i(4465),r=i(915),o=i(6758),a=i(3407);class l extends o.A{constructor(t){super({extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes}),this.matrixIds_=t.matrixIds}getMatrixId(t){return this.matrixIds_[t]}getMatrixIds(){return this.matrixIds_}}var h=i(2654);class c extends n.A{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=(0,s.Uu)(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=(0,h.FD)(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction((0,h.FD)(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?(0,s.LW)(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,o,a){if(!i)return;const l={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(l,r);let h=t;return h="KVP"==e?(0,s.LW)(h,l):h.replace(/\{(\w+?)\}/g,(function(t,e){return l[e]})),h}}}const u=c;function d(t,e){const i=t.Contents.Layer,n=i?.find((function(t){return t.Identifier==e.layer}));if(!n)return null;const s=t.Contents.TileMatrixSet;let o;o=n.TileMatrixSetLink.length>1?"projection"in e?n.TileMatrixSetLink.findIndex((function(t){const i=s.find((function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,n=(0,a.Jt)(i),r=(0,a.Jt)(e.projection);return n&&r?(0,a.tI)(n,r):i==e.projection})):n.TileMatrixSetLink.findIndex((function(t){return t.TileMatrixSet==e.matrixSet})):0,o<0&&(o=0);const h=n.TileMatrixSetLink[o].TileMatrixSet,c=n.TileMatrixSetLink[o].TileMatrixSetLimits;let u=n.Format[0];"format"in e&&(u=e.format),o=n.Style.findIndex((function(t){return"style"in e?t.Title==e.style:t.isDefault})),o<0&&(o=0);const d=n.Style[o].Identifier,g={};"Dimension"in n&&n.Dimension.forEach((function(t,e,i){const n=t.Identifier;let s=t.Default;void 0===s&&(s=t.Value[0]),g[n]=s}));const _=t.Contents.TileMatrixSet.find((function(t){return t.Identifier==h}));let f;const p=_.SupportedCRS;if(p&&(f=(0,a.Jt)(p)),"projection"in e){const t=(0,a.Jt)(e.projection);t&&(f&&!(0,a.tI)(t,f)||(f=t))}let m=!1;const x=f.getAxisOrientation().startsWith("ne");let v=_.TileMatrix[0],y={MinTileCol:0,MinTileRow:0,MaxTileCol:v.MatrixWidth-1,MaxTileRow:v.MatrixHeight-1};if(c){y=c[c.length-1];const t=_.TileMatrix.find((t=>t.Identifier===y.TileMatrix||_.Identifier+":"+t.Identifier===y.TileMatrix));t&&(v=t)}const E=28e-5*v.ScaleDenominator/f.getMetersPerUnit(),T=x?[v.TopLeftCorner[1],v.TopLeftCorner[0]]:v.TopLeftCorner,A=v.TileWidth*E,C=v.TileHeight*E;let S=_.BoundingBox;S&&x&&(S=[S[1],S[0],S[3],S[2]]);let R=[T[0]+A*y.MinTileCol,T[1]-C*(1+y.MaxTileRow),T[0]+A*(1+y.MaxTileCol),T[1]-C*y.MinTileRow];if(void 0!==S&&!(0,r.ms)(S,R)){const t=n.WGS84BoundingBox,e=(0,a.Jt)("EPSG:4326").getExtent();if(R=S,t)m=t[0]===e[0]&&t[2]===e[2];else{const t=(0,a.DI)(S,_.SupportedCRS,"EPSG:4326");m=t[0]-1e-10<=e[0]&&t[2]+1e-10>=e[2]}}const w=function(t,e,i){const n=[],s=[],r=[],o=[],h=[];i=void 0!==i?i:[];const c="TileMatrix",u="Identifier",d="ScaleDenominator",g="TopLeftCorner",_=t.SupportedCRS,f=(0,a.Jt)(_),p=f.getMetersPerUnit(),m=f.getAxisOrientation().startsWith("ne");return t[c].sort((function(t,e){return e[d]-t[d]})),t[c].forEach((function(e){let a;if(a=!(i.length>0)||i.find((function(i){return e[u]==i[c]||!e[u].includes(":")&&t[u]+":"+e[u]===i[c]})),a){s.push(e[u]);const t=28e-5*e[d]/p,i=e.TileWidth,a=e.TileHeight;m?r.push([e[g][1],e[g][0]]):r.push(e[g]),n.push(t),o.push(i==a?i:[i,a]),h.push([e.MatrixWidth,e.MatrixHeight])}})),new l({extent:e,origins:r,resolutions:n,matrixIds:s,tileSizes:o,sizes:h})}(_,R,c),b=[];let I=e.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata){const e=t.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let t=0,i=e.length;t{i.d(e,{A:()=>o});var n=i(8512),s=i(4863);class r extends n.A{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:(0,s.EN)({extent:(0,s.kZ)(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,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}const o=r},2192:(t,e,i)=>{i.d(e,{B:()=>n});const n=4},7500:(t,e,i)=>{i.d(e,{$q:()=>x,AE:()=>_,Eq:()=>p,W3:()=>f,jD:()=>u,y4:()=>m});var n=i(2192),s=i(4465),r=i(2806),o=i(3938),a=i(1597),l=i(915),h=i(3407),c=i(9925);const u="1.3.0",d=[101,101];function g(t,e,i,n,o){o.WIDTH=i[0],o.HEIGHT=i[1];const a=n.getAxisOrientation(),l=(0,r.Z)(o.VERSION,"1.3")>=0;o[l?"CRS":"SRS"]=n.getCode();const h=l&&a.startsWith("ne")?[e[1],e[0],e[3],e[2]]:e;return o.BBOX=h.join(","),(0,s.LW)(t,o)}function _(t,e,i,s,r,o,h){o=Object.assign({REQUEST:"GetMap"},o);const c=e/i,u=[(0,a.LI)((0,l.RG)(t)/c,n.B),(0,a.LI)((0,l.Oq)(t)/c,n.B)];if(1!=i)switch(h){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+t:o.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:throw new Error("Unknown `serverType` configured")}return g(r,t,u,s,o)}function f(t,e){return Object.assign({REQUEST:e,SERVICE:"WMS",VERSION:u,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},t)}function p(t){const e=void 0===t.hidpi||t.hidpi,i=(0,h.Jt)(t.projection||"EPSG:3857"),n=t.ratio||1.5,s=t.load||o.D4,r=t.crossOrigin??null;return(o,a,l)=>{o=(0,c.QD)(o,a,l,n),1==l||e&&void 0!==t.serverType||(l=1);const h=_(o,a,l,i,t.url,f(t.params,"GetMap"),t.serverType),u=new Image;return u.crossOrigin=r,s(u,h).then((t=>({image:t,extent:o,pixelRatio:l})))}}function m(t,e,i){if(void 0===t.url)return;const s=(0,h.Jt)(t.projection||"EPSG:3857"),o=(0,l.Bg)(e,i,0,d),c={QUERY_LAYERS:t.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(c,f(t.params,"GetFeatureInfo"),t.params);const u=(0,a.RI)((e[0]-o[0])/i,n.B),_=(0,a.RI)((o[3]-e[1])/i,n.B),p=(0,r.Z)(c.VERSION,"1.3")>=0;return c[p?"I":"X"]=u,c[p?"J":"Y"]=_,g(t.url,o,d,s,c)}function x(t,e){if(void 0===t.url)return;const i={SERVICE:"WMS",VERSION:u,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0!==e){const n=(0,h.Jt)(t.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;i.SCALE=e*n/s}if(Object.assign(i,t.params),void 0!==t.params&&void 0===i.LAYER){const t=i.LAYERS;if(Array.isArray(t)&&1===t.length)return;i.LAYER=t}return(0,s.LW)(t.url,i)}},2490:(t,e,i)=>{i.d(e,{Yf:()=>r,cY:()=>o});var n=i(1597);const s=6371008.8;function r(t,e,i){i=i||s;const r=(0,n.eh)(t[1]),o=(0,n.eh)(e[1]),a=(o-r)/2,l=(0,n.eh)(e[0]-t[0])/2,h=Math.sin(a)*Math.sin(a)+Math.sin(l)*Math.sin(l)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function o(t,e,i,r){r=r||s;const o=(0,n.eh)(t[1]),a=(0,n.eh)(t[0]),l=e/r,h=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(i)),c=a+Math.atan2(Math.sin(i)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(h));return[(0,n.xW)(c),(0,n.xW)(h)]}},2806:(t,e,i)=>{function n(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let s=n.indexOf(".");return s=-1===s?n.length:s,s>e?n:new Array(1+e-s).join("0")+n}function s(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;ts)return 1;if(s>e)return-1}return 0}i.d(e,{H:()=>n,Z:()=>s})},4969:(t,e,i)=>{i.d(e,{A:()=>s});var n=i(588);const s=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return(0,n.v)(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return(0,n.v)(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,n.v)(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}},5902:(t,e,i)=>{i.d(e,{A:()=>a});var n=i(48),s=i(915),r=i(4087),o=i(3530);const a=class{constructor(t){this.rbush_=new n.A(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.v6)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n{i.d(e,{A:()=>r});var n=i(6936);class s extends n.A{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new s({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius=t,this.render()}}const r=s},3628:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(6141),s=i(7907);class r{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new r({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){const e=(0,s.J)(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then((()=>{this.patternImage_=null})),e.getImageState()===n.A.IDLE&&e.load(),e.getImageState()===n.A.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const o=r},9700:(t,e,i)=>{i.d(e,{A:()=>d});var n=i(6837),s=i(6141),r=i(940),o=i(3730),a=i(588),l=i(7907),h=i(4087);function c(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class u extends r.A{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,r=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const u=void 0!==t.img?t.img:null;let d,g=t.src;if((0,a.v)(!(void 0!==g&&u),"`image` and `src` cannot be provided at the same time"),void 0!==g&&0!==g.length||!u||(g=u.src||(0,h.v6)(u)),(0,a.v)(void 0!==g&&g.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,a.v)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?d=s.A.IDLE:void 0!==u&&(d="complete"in u?u.complete?u.src?s.A.LOADED:s.A.IDLE:s.A.LOADING:s.A.LOADED),this.color_=void 0!==t.color?(0,o._j)(t.color):null,this.iconImage_=(0,l.J)(u,g,this.crossOrigin_,d,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,this.initialOptions_,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(c(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(c(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new u({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==s.A.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(n.A.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(n.A.CHANGE,t)}ready(){return this.iconImage_.ready()}}const d=u},7907:(t,e,i)=>{i.d(e,{J:()=>d});var n=i(9332),s=i(6837),r=i(6141),o=i(3730),a=i(8711),l=i(3938),h=i(2241);let c=null;class u extends n.A{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?r.A.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===r.A.LOADED){c||(c=(0,a.Y)(1,1,void 0,{willReadFrequently:!0})),c.drawImage(this.image_,0,0);try{c.getImageData(0,0,1,1),this.tainted_=!1}catch(t){c=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(s.A.CHANGE)}handleImageError_(){this.imageState_=r.A.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=r.A.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,a.Y)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===r.A.IDLE){this.image_||this.initializeImage_(),this.imageState_=r.A.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(0,l.RA)(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==r.A.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,o.oJ)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}ready(){return this.ready_||(this.ready_=new Promise((t=>{if(this.imageState_===r.A.LOADED||this.imageState_===r.A.ERROR)t();else{const e=()=>{this.imageState_!==r.A.LOADED&&this.imageState_!==r.A.ERROR||(this.removeEventListener(s.A.CHANGE,e),t())};this.addEventListener(s.A.CHANGE,e)}}))),this.ready_}}function d(t,e,i,n,s,r){let o=void 0===e?void 0:h.ue.get(e,i,s);return o||(o=new u(t,t&&"src"in t?t.src||void 0:e,i,n,s),h.ue.set(e,i,s,o,r)),r&&o&&!h.ue.getPattern(e,i,s)&&h.ue.set(e,i,s,o,r),o}},2241:(t,e,i)=>{i.d(e,{ue:()=>a});var n=i(6141),s=i(3730),r=i(8711);function o(t,e,i){return e+":"+t+":"+(i?(0,s._j)(i):"null")}const a=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const n=o(t,e,i);return n in this.cache_?this.cache_[n]:null}getPattern(t,e,i){const n=o(t,e,i);return n in this.patternCache_?this.patternCache_[n]:null}set(t,e,i,s,a){const l=o(t,e,i),h=l in this.cache_;this.cache_[l]=s,a&&(s.getImageState()===n.A.IDLE&&s.load(),s.getImageState()===n.A.LOADING?s.ready().then((()=>{this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")})):this.patternCache_[l]=(0,r.lr)().createPattern(s.getImage(1),"repeat")),h||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}},940:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(4087),s=i(4401);class r{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.b0)()}getImage(t){return(0,n.b0)()}getHitDetectionImage(){return(0,n.b0)()}getPixelRatio(t){return 1}getImageState(){return(0,n.b0)()}getImageSize(){return(0,n.b0)()}getOrigin(){return(0,n.b0)()}getSize(){return(0,n.b0)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(t)}listenImageChange(t){(0,n.b0)()}load(){(0,n.b0)()}unlistenImageChange(t){(0,n.b0)()}ready(){return Promise.resolve()}}const o=r},6936:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(6141),s=i(940),r=i(3730),o=i(7295),a=i(8711),l=i(8774);class h extends s.A{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?n.A.LOADING:n.A.LOADED,this.imageState_===n.A.LOADING&&this.ready().then((()=>this.imageState_=n.A.LOADED)),this.render()}clone(){const t=this.getScale(),e=new h({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,n=(0,a.Y)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius,s=void 0===this.radius2_?n:this.radius2_;if(n{i.d(e,{A:()=>s});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const s=n},9276:(t,e,i)=>{i.d(e,{Ay:()=>g,d1:()=>c,mC:()=>l,mY:()=>u});var n=i(7733),s=i(3628),r=i(953),o=i(588);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=d,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new a({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=d,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,o.v)("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}let h=null;function c(t,e){if(!h){const t=new s.A({color:"rgba(255,255,255,0.4)"}),e=new r.A({color:"#3399CC",width:1.25});h=[new a({image:new n.A({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return h}function u(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new a({fill:new s.A({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new a({stroke:new r.A({color:e,width:5})}),new a({stroke:new r.A({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new a({image:new n.A({radius:6,fill:new s.A({color:i}),stroke:new r.A({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function d(t){return t.getGeometry()}const g=a},1426:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(3628),s=i(4401);class r{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new n.A({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const o=r},186:(t,e,i)=>{function n(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function s(t,e,i){return t+"/"+e+"/"+i}function r(t){return s(t[0],t[1],t[2])}function o(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return s(e,i,n)}function a(t){return t.split("/").map(Number)}function l(t){return h(t[0],t[1],t[2])}function h(t,e,i){return(e<i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}i.d(e,{K:()=>a,N:()=>n,N5:()=>c,_T:()=>h,dp:()=>s,gr:()=>o,i7:()=>r,tW:()=>l})},4863:(t,e,i)=>{i.d(e,{EN:()=>c,Li:()=>h,kZ:()=>d,pr:()=>l});var n=i(6758),s=i(9496),r=i(3407),o=i(915),a=i(4401);function l(t){let e=t.getDefaultTileGrid();return e||(e=function(t){return function(t,e,i,s){s=void 0!==s?s:"top-left";const r=u(t,e,i);return new n.A({extent:t,origin:(0,o.qF)(t,s),resolutions:r,tileSize:i})}(d(t),void 0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function h(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),r=d(i);if(!(0,o.Ym)(r,s)){const e=(0,o.RG)(r),i=Math.ceil((r[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}function c(t){const e=t||{},i=e.extent||(0,r.Jt)("EPSG:3857").getExtent(),s={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:u(i,e.maxZoom,e.tileSize,e.maxResolution)};return new n.A(s)}function u(t,e,i,n){e=void 0!==e?e:s.L,i=(0,a.xq)(void 0!==i?i:s.R);const r=(0,o.Oq)(t),l=(0,o.RG)(t);n=n>0?n:Math.max(l/i[0],r/i[1]);const h=e+1,c=new Array(h);for(let t=0;t{i.d(e,{A:()=>g});var n=i(1110),s=i(9496),r=i(588),o=i(1597),a=i(915),l=i(186),h=i(4350),c=i(6514),u=i(4401);const d=[0,0,0],g=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,r.v)((0,c.WC)(this.resolutions_,((t,e)=>e-t),!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,i=this.resolutions_.length-1;t{const s=new n.A(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);s.minX=Math.max(t.minX,s.minX),s.maxX=Math.min(t.maxX,s.maxX),s.minY=Math.max(t.minY,s.minY),s.maxY=Math.min(t.maxY,s.maxY)}return s})):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,r=n.maxY;s<=r;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,h=t[0]-1;for(2===this.zoomFactor_?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(void 0!==o&&void 0!==a?(o=Math.floor(o/2),a=Math.floor(a/2),r=(0,n.N)(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,h,i),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e{i.d(e,{L:()=>n,R:()=>s});const n=42,s=256},2654:(t,e,i)=>{i.d(e,{FD:()=>l,Qz:()=>a});var n=i(1597),s=i(4465),r=i(186);function o(t,e){return function(i,n,r){if(!i)return;let o;const a=i[0];if(e){const t=e.getFullTileRange(a);t&&(o=t.getHeight()-1)}return(0,s.M)(t,a,i[1],i[2],o)}}function a(t,e){const i=t.length,n=new Array(i);for(let s=0;s{i.d(e,{Bb:()=>c,T9:()=>f,Tl:()=>g,Zz:()=>_,cL:()=>o,dI:()=>m,e$:()=>u,hs:()=>d,k3:()=>h,lw:()=>a,vt:()=>r});var n=i(588);const s=new Array(6);function r(){return[1,0,0,1,0,0]}function o(t){return l(t,1,0,0,1,0,0)}function a(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],g=e[5];return t[0]=i*l+s*h,t[1]=n*l+r*h,t[2]=i*c+s*u,t[3]=n*c+r*u,t[4]=i*d+s*g+o,t[5]=n*d+r*g+a,t}function l(t,e,i,n,s,r,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=r,t[5]=o,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function c(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function u(t,e){const i=Math.cos(e),n=Math.sin(e);return a(t,l(s,i,n,-n,i,0,0))}function d(t,e,i){return a(t,l(s,e,0,0,i,0,0))}function g(t,e,i){return a(t,l(s,1,0,0,1,e,i))}function _(t,e,i,n,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=o*n*h-a*n*l+e,t[5]=o*s*l+a*s*h+i,t}function f(t,e){const i=(s=e)[0]*s[3]-s[1]*s[2];var s;(0,n.v)(0!==i,"Transformation matrix cannot be inverted");const r=e[0],o=e[1],a=e[2],l=e[3],h=e[4],c=e[5];return t[0]=l/i,t[1]=-o/i,t[2]=-a/i,t[3]=r/i,t[4]=(a*c-l*h)/i,t[5]=-(r*c-o*h)/i,t}const p=[1e6,1e6,1e6,1e6,2,2];function m(t){return"matrix("+t.map(((t,e)=>Math.round(t*p[e])/p[e])).join(", ")+")"}},4465:(t,e,i)=>{i.d(e,{LW:()=>r,M:()=>c,Uu:()=>d,de:()=>u});var n=i(186),s=i(1597);function r(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}const o=/\{z\}/g,a=/\{x\}/g,l=/\{y\}/g,h=/\{-y\}/g;function c(t,e,i,n,s){return t.replace(o,e.toString()).replace(a,i.toString()).replace(l,n.toString()).replace(h,(function(){if(void 0===s)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(s-n).toString()}))}function u(t,e,i,r){const o=(0,n._T)(e,i,r);return t[(0,s.xP)(o,t.length)]}function d(t){const e=[];let i=/\{([a-z])-([a-z])\}/.exec(t);if(i){const n=i[1].charCodeAt(0),s=i[2].charCodeAt(0);let r;for(r=n;r<=s;++r)e.push(t.replace(i[0],String.fromCharCode(r)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t),i){const n=parseInt(i[2],10);for(let s=parseInt(i[1],10);s<=n;s++)e.push(t.replace(i[0],s.toString()));return e}return e.push(t),e}},3954:(t,e,i)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}i.d(e,{Z:()=>s,v:()=>n})},130:(t,e,i)=>{i.d(e,{Be:()=>l,Ek:()=>a,H7:()=>s,IP:()=>r,JL:()=>c,SD:()=>_,Ss:()=>o,UD:()=>u,l4:()=>h,zH:()=>d});var n=i(7771);const s=34962,r=34963,o=35040,a=35044,l=35048,h=5121,c=5123,u=5125,d=5126,g=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function _(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!n.oF},e);const i=g.length;for(let n=0;n{i.d(e,{Ay:()=>a});var n=i(130),s=i(588);const r={STATIC_DRAW:n.Ek,STREAM_DRAW:n.Ss,DYNAMIC_DRAW:n.Be};function o(t){switch(t){case n.H7:return Float32Array;case n.IP:return Uint32Array;default:return Float32Array}}const a=class{constructor(t,e){this.array_=null,this.type_=t,(0,s.v)(t===n.H7||t===n.IP,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==e?e:r.STATIC_DRAW}ofSize(t){return this.array_=new(o(this.type_))(t),this}fromArray(t){return this.array_=o(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(o(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}},9777:(t,e,i)=>{i.d(e,{jQ:()=>g,M8:()=>d,Ay:()=>v});const n="webglcontextlost",s="webglcontextrestored";var r=i(25),o=i(4087);const a=class{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n precision mediump float;\n\n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n\n uniform vec2 u_screenSize;\n\n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n"),e.compileShader(i);const n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((i=>{this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}))}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const t=0,n=e.RGBA,s=0,r=e.RGBA,o=e.UNSIGNED_BYTE,a=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,t,n,i[0],i[1],s,r,o,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i[0],i[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,i,n){const s=this.getGL(),r=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const e=(0,o.v6)(s.canvas);if(!t.renderTargets[e]){const i=s.getContextAttributes();i&&i.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[e]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,r[0],r[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(t),i&&i(s,t),s.drawArrays(s.TRIANGLES,0,6),n&&n(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let i,n=1;this.uniforms_.forEach((function(s){if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(s.location,n++);else if(Array.isArray(i))switch(i.length){case 2:return void e.uniform2f(s.location,i[0],i[1]);case 3:return void e.uniform3f(s.location,i[0],i[1],i[2]);case 4:return void e.uniform4f(s.location,i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(s.location,i)}))}};var l=i(130),h=i(3530),c=i(9703),u=i(3954);const d={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},g={UNSIGNED_BYTE:l.l4,UNSIGNED_SHORT:l.JL,UNSIGNED_INT:l.UD,FLOAT:l.zH},_={};function f(t){return"shared/"+t}let p=0;class m extends r.A{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?f(t.canvasCacheKey):function(){const t="unique/"+p;return p+=1,t}(),this.gl_=function(t){let e=_[t];if(!e){const i=document.createElement("canvas");i.width=1,i.height=1,i.style.position="absolute",i.style.left="0",e={users:0,context:(0,l.SD)(i)},_[t]=e}return e.users+=1,e.context}(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(n,this.boundHandleWebGLContextLost_),e.addEventListener(s,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=(0,c.vt)(),this.offsetScaleMatrix_=(0,c.vt)(),this.tmpMat4_=(0,u.v)(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map((t=>new a({webGlContext:this.gl_,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms}))):[new a({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===f(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,i=(0,o.v6)(t);let n=this.bufferCache_[i];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[i]=n),e.bindBuffer(t.getType(),n.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,i=(0,o.v6)(t),n=this.bufferCache_[i];n&&!e.isContextLost()&&e.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(n,this.boundHandleWebGLContextLost_),t.removeEventListener(s,this.boundHandleWebGLContextRestored_),function(t){const e=_[t];if(!e)return;if(e.users-=1,e.users>0)return;const i=e.context,n=i.getExtension("WEBGL_lose_context");n&&n.loseContext();const s=i.canvas;s.width=1,s.height=1,delete _[t]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,i){const n=this.gl_,s=this.getCanvas(),r=t.size,o=t.pixelRatio;s.width===r[0]*o&&s.height===r[1]*o||(s.width=r[0]*o,s.height=r[1]*o,s.style.width=r[0]+"px",s.style.height=r[1]+"px");for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.depthRange(0,1),n.clearDepth(1),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),i?(n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL)):n.disable(n.DEPTH_TEST)}bindTexture(t,e,i){const n=this.gl_;n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(this.getUniformLocation(i),e)}prepareDrawToRenderTarget(t,e,i,n){const s=this.gl_,r=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,r[0],r[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,i?s.ZERO:s.ONE_MINUS_SRC_ALPHA),n?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const i=this.gl_;this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,s=e-t,r=4*t;i.drawElements(i.TRIANGLES,s,n,r)}finalizeDraw(t,e,i){for(let n=0,s=this.postProcessPasses_.length;n{if(i="function"==typeof s.value?s.value(t):s.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData||i instanceof WebGLTexture){i instanceof WebGLTexture&&!s.texture?(s.prevValue=void 0,s.texture=i):s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,n,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const t=!(i instanceof HTMLImageElement)||i.complete;i instanceof WebGLTexture||!t||s.prevValue===i||(s.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),n++}else if(Array.isArray(i)&&6===i.length)this.setUniformMatrixValue(s.name,(0,u.Z)(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:return void e.uniform2f(this.getUniformLocation(s.name),i[0],i[1]);case 3:return void e.uniform3f(this.getUniformLocation(s.name),i[0],i[1],i[2]);case 4:return void e.uniform4f(this.getUniformLocation(s.name),i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(this.getUniformLocation(s.name),i)}))}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.gl_,n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}getProgram(t,e){const i=this.gl_,n=this.compileShader(t,i.FRAGMENT_SHADER),s=this.compileShader(e,i.VERTEX_SHADER),r=i.createProgram();if(i.attachShader(r,n),i.attachShader(r,s),i.linkProgram(r),!i.getShaderParameter(n,i.COMPILE_STATUS)){const t=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(t)}if(i.deleteShader(n),!i.getShaderParameter(s,i.COMPILE_STATUS)){const t=`Vertex shader compilation failed: ${i.getShaderInfoLog(s)}`;throw new Error(t)}if(i.deleteShader(s),!i.getProgramParameter(r,i.LINK_STATUS)){const t=`GL program linking failed: ${i.getProgramInfoLog(r)}`;throw new Error(t)}return r}getUniformLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[e]&&(this.uniformLocationsByProgram_[e]={}),void 0===this.uniformLocationsByProgram_[e][t]&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=(0,o.v6)(this.currentProgram_);return void 0===this.attribLocationsByProgram_[e]&&(this.attribLocationsByProgram_[e]={}),void 0===this.attribLocationsByProgram_[e][t]&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const i=t.size,n=t.viewState.rotation,s=t.viewState.resolution,r=t.viewState.center;return(0,c.Zz)(e,0,0,2/(s*i[0]),2/(s*i[1]),-n,-r[0],-r[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,n,s){const r=this.getAttributeLocation(t);r<0||(this.gl_.enableVertexAttribArray(r),this.gl_.vertexAttribPointer(r,e,i,!1,n,s))}enableAttributes(t){const e=function(t){let e=0;for(let i=0;i{function n(t,e,i,n,r){s(t,e,i||0,n||t.length-1,r||o)}function s(t,e,i,n,o){for(;n>i;){if(n-i>600){var a=n-i+1,l=e-i+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);s(t,e,Math.max(i,Math.floor(e-l*c/a+u)),Math.min(n,Math.floor(e+(a-l)*c/a+u)),o)}var d=t[e],g=i,_=n;for(r(t,i,e),o(t[n],d)>0&&r(t,i,n);g<_;){for(r(t,g,_),g++,_--;o(t[g],d)<0;)g++;for(;o(t[_],d)>0;)_--}0===o(t[i],d)?r(t,i,_):r(t,++_,n),_<=e&&(i=_+1),e<=_&&(n=_-1)}}function r(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function o(t,e){return te?1:0}i.d(e,{A:()=>a});class a{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!x(t,e))return i;const n=this.toBBox,s=[];for(;e;){for(let r=0;r=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)}_split(t,e){const i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n),o=v(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,h(i,this.toBBox),h(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,h(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,s=1/0,r=1/0;for(let o=e;o<=i-e;o++){const e=c(t,0,o,this.toBBox),a=c(t,o,i,this.toBBox),l=p(e,a),h=_(e)+_(a);l=e;n--){const e=t.children[n];u(o,t.leaf?s(e):e),a+=f(o)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)u(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():h(t[i],this.toBBox)}}function l(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(t,e,i,s,r){const o=[e,i];for(;o.length;){if((i=o.pop())-(e=o.pop())<=s)continue;const a=e+Math.ceil((i-e)/s/2)*s;n(t,a,e,i,r),o.push(e,a,a,i)}}}}]); \ No newline at end of file diff --git a/9633.bundle.js b/9633.bundle.js new file mode 100644 index 00000000..4ece9729 --- /dev/null +++ b/9633.bundle.js @@ -0,0 +1 @@ +(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[9633],{6675:e=>{function t(e,t){const i=new RegExp(t,"g"),r=e.match(i);return r?r.length:0}e.exports=t,e.exports.default=t},8556:(e,t,i)=>{const r=i(3614),s=i(8694),n=i(6675);function o(e,t,i){const o=i&&i.debug||!1,a=!(i&&!1===typeof i.nested),l=i&&i.startIndex||0;o&&console.log("[xml-utils] starting findTagByName with",t," and ",i);const h=r(e,`<${t}[ \n>/]`,l);if(o&&console.log("[xml-utils] start:",h),-1===h)return;const c=e.slice(h+t.length);let f=s(c,"^[^<]*[ /]>",0);const u=-1!==f&&"/"===c[f-1];if(o&&console.log("[xml-utils] selfClosing:",u),!1===u)if(a){let e=0,i=1,r=0;for(;-1!==(f=s(c,"[ /]"+t+">",e));){const s=c.substring(e,f+1);if(i+=n(s,"<"+t+"[ \n\t>]"),r+=n(s,""),r>=i)break;e=f}}else f=s(c,"[ /]"+t+">",0);const g=h+t.length+f+1;if(o&&console.log("[xml-utils] end:",g),-1===g)return;const d=e.slice(h,g);let p;return p=u?null:d.slice(d.indexOf(">")+1,d.lastIndexOf("<")),{inner:p,outer:d,start:h,end:g}}e.exports=o,e.exports.default=o},563:(e,t,i)=>{const r=i(8556);function s(e,t,i){const s=[],n=i&&i.debug||!1,o=!i||"boolean"!=typeof i.nested||i.nested;let a,l=i&&i.startIndex||0;for(;a=r(e,t,{debug:n,startIndex:l});)l=o?a.start+1+t.length:a.end,s.push(a);return n&&console.log("findTagsByName found",s.length,"tags"),s}e.exports=s,e.exports.default=s},7379:e=>{function t(e,t,i){const r=i&&i.debug||!1;r&&console.log("[xml-utils] getting "+t+" in "+e);const s="object"==typeof e?e.outer:e,n=s.slice(0,s.indexOf(">")+1),o=['"',"'"];for(let e=0;e{function t(e,t,i){const r=new RegExp(t).exec(e.slice(i));return r?i+r.index+r[0].length-1:-1}e.exports=t,e.exports.default=t},3614:e=>{function t(e,t,i){const r=new RegExp(t).exec(e.slice(i));return r?i+r.index:-1}e.exports=t,e.exports.default=t},8622:(e,t,i)=>{"use strict";i.d(t,{$:()=>r,AC:()=>h,Hm:()=>u,NZ:()=>n,S3:()=>f,TZ:()=>c,s$:()=>a,ub:()=>l});const r={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},s={};for(const e in r)r.hasOwnProperty(e)&&(s[r[e]]=parseInt(e,10));const n=[s.BitsPerSample,s.ExtraSamples,s.SampleFormat,s.StripByteCounts,s.StripOffsets,s.StripRowCounts,s.TileByteCounts,s.TileOffsets,s.SubIFDs],o={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},a={};for(const e in o)o.hasOwnProperty(e)&&(a[o[e]]=parseInt(e,10));const l={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},h={Unspecified:0,Assocalpha:1,Unassalpha:2},c={Version:0,AddCompression:1},f={None:0,Deflate:1,Zstandard:2},u={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},g={};for(const e in u)u.hasOwnProperty(e)&&(g[u[e]]=parseInt(e,10))},9633:(e,t,i)=>{"use strict";i.d(t,{A:()=>Mt});var r=i(4977),s=i(6758),n=i(8622);const o=new Map;function a(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>o.set(e,t)))}async function l(e){const t=o.get(e.Compression);if(!t)throw new Error(`Unknown compression method identifier: ${e.Compression}`);return new(await t())(e)}a([void 0,1],(()=>i.e(5121).then(i.bind(i,5121)).then((e=>e.default)))),a(5,(()=>i.e(2764).then(i.bind(i,2764)).then((e=>e.default)))),a(6,(()=>{throw new Error("old style JPEG compression is not supported.")})),a(7,(()=>i.e(6457).then(i.bind(i,6457)).then((e=>e.default)))),a([8,32946],(()=>Promise.all([i.e(3075),i.e(424)]).then(i.bind(i,424)).then((e=>e.default)))),a(32773,(()=>i.e(1030).then(i.bind(i,1030)).then((e=>e.default)))),a(34887,(()=>Promise.all([i.e(3075),i.e(1414)]).then(i.bind(i,1414)).then((async e=>(await e.zstd.init(),e))).then((e=>e.default)))),a(50001,(()=>i.e(6568).then(i.bind(i,6568)).then((e=>e.default))));const h="undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,c=class{constructor(e=h,t){this.workers=null,this._awaitingDecoder=null,this.size=e,this.messageId=0,e&&(this._awaitingDecoder=t?Promise.resolve(t):new Promise((e=>{i.e(2098).then(i.bind(i,2098)).then((t=>{e(t.create)}))})),this._awaitingDecoder.then((t=>{this._awaitingDecoder=null,this.workers=[];for(let i=0;ii.decode(e,t))):new Promise((i=>{const r=this.workers.find((e=>e.idle))||this.workers[Math.floor(Math.random()*this.size)];r.idle=!1;const s=this.messageId++,n=e=>{e.data.id===s&&(r.idle=!0,i(e.data.decoded),r.worker.removeEventListener("message",n))};r.worker.addEventListener("message",n),r.worker.postMessage({fileDirectory:e,buffer:t,id:s},[t])}))}destroy(){this.workers&&(this.workers.forEach((e=>{e.worker.terminate()})),this.workers=null)}};function f(e){return(t,...i)=>g(e,t,i)}function u(e,t){return f(w(e,t).get)}const{apply:g,construct:d,defineProperty:p,get:y,getOwnPropertyDescriptor:w,getPrototypeOf:m,has:b,ownKeys:S,set:I,setPrototypeOf:A}=Reflect,{EPSILON:_,MAX_SAFE_INTEGER:T,isFinite:D,isNaN:E}=Number,{iterator:x,species:P,toStringTag:M,for:C}=Symbol,F=Object,{create:k,defineProperty:G,freeze:R,is:O}=F,U=F.prototype,v=(U.__lookupGetter__&&f(U.__lookupGetter__),F.hasOwn||f(U.hasOwnProperty),Array),L=(v.isArray,v.prototype),B=(f(L.join),f(L.push),f(L.toLocaleString),L[x]),z=f(B),{abs:N,trunc:$}=Math,V=ArrayBuffer,K=(V.isView,V.prototype),j=(f(K.slice),u(K,"byteLength"),"undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:null),q=(j&&u(j.prototype,"byteLength"),m(Uint8Array)),H=(q.from,q.prototype),W=(H[x],f(H.keys),f(H.values),f(H.entries),f(H.set),f(H.reverse),f(H.fill),f(H.copyWithin),f(H.sort),f(H.slice),f(H.subarray),u(H,"buffer"),u(H,"byteOffset"),u(H,"length"),u(H,M),Uint8Array),Y=Uint16Array,X=Uint32Array,Z=Float32Array,J=m([][x]()),Q=f(J.next),ee=f(function*(){}().next),te=m(J),ie=DataView.prototype,re=f(ie.getUint16),se=(f(ie.setUint16),TypeError,WeakSet.prototype),ne=(f(se.add),f(se.has),WeakMap),oe=ne.prototype,ae=f(oe.get),le=(f(oe.has),f(oe.set)),he=new ne,ce=k(null,{next:{value:function(){const e=ae(he,this);return Q(e)}},[x]:{value:function(){return this}}}),fe=new ne,ue=k(te,{next:{value:function(){const e=ae(fe,this);return ee(e)},writable:!0,configurable:!0}});for(const e of S(J))"next"!==e&&G(ue,e,w(J,e));const ge=new V(4),de=new Z(ge),pe=new X(ge),ye=new Y(512),we=new W(512);for(let e=0;e<256;++e){const t=e-127;t<-24?(ye[e]=0,ye[256|e]=32768,we[e]=24,we[256|e]=24):t<-14?(ye[e]=1024>>-t-14,ye[256|e]=1024>>-t-14|32768,we[e]=-t-1,we[256|e]=-t-1):t<=15?(ye[e]=t+15<<10,ye[256|e]=t+15<<10|32768,we[e]=13,we[256|e]=13):t<128?(ye[e]=31744,ye[256|e]=64512,we[e]=24,we[256|e]=24):(ye[e]=31744,ye[256|e]=64512,we[e]=13,we[256|e]=13)}const me=new X(2048);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;!(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,me[e]=t|i}for(let e=1024;e<2048;++e)me[e]=939524096+(e-1024<<13);const be=new X(64);for(let e=1;e<31;++e)be[e]=e<<23;be[31]=1199570944,be[32]=2147483648;for(let e=33;e<63;++e)be[e]=2147483648+(e-32<<23);be[63]=3347054592;const Se=new Y(64);for(let e=1;e<64;++e)32!==e&&(Se[e]=1024);function Ie(e,t,...i){return function(e){const t=e>>10;return pe[0]=me[Se[t]+(1023&e)]+be[t],de[0]}(re(e,t,...function(e){if(e[x]===B&&J.next===Q)return e;const t=k(ce);return le(he,t,z(e)),t}(i)))}var Ae=i(7379),_e=i(563);function Te(e,t,i,r=1){return new(Object.getPrototypeOf(e).constructor)(t*i*r)}function De(e,t,i){return(1-i)*e+i*t}function Ee(e,t,i){let r=0;for(let s=t;s=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${e} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[e]/8)}getReaderForSample(e){const t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,i=this.fileDirectory.BitsPerSample[e];switch(t){case 1:if(i<=8)return DataView.prototype.getUint8;if(i<=16)return DataView.prototype.getUint16;if(i<=32)return DataView.prototype.getUint32;break;case 2:if(i<=8)return DataView.prototype.getInt8;if(i<=16)return DataView.prototype.getInt16;if(i<=32)return DataView.prototype.getInt32;break;case 3:switch(i){case 16:return function(e,t){return Ie(this,e,t)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(e=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1}getBitsPerSample(e=0){return this.fileDirectory.BitsPerSample[e]}getArrayForSample(e,t){return xe(this.getSampleFormat(e),this.getBitsPerSample(e),t)}async getTileOrStrip(e,t,i,r,s){const n=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let a;const{tiles:l}=this;let h,c;1===this.planarConfiguration?a=t*n+e:2===this.planarConfiguration&&(a=i*n*o+t*n+e),this.isTiled?(h=this.fileDirectory.TileOffsets[a],c=this.fileDirectory.TileByteCounts[a]):(h=this.fileDirectory.StripOffsets[a],c=this.fileDirectory.StripByteCounts[a]);const f=(await this.source.fetch([{offset:h,length:c}],s))[0];let u;return null!==l&&l[a]?u=l[a]:(u=(async()=>{let e=await r.decode(this.fileDirectory,f);const i=this.getSampleFormat(),s=this.getBitsPerSample();return function(e,t){return(1!==e&&2!==e||!(t<=32)||t%8!=0)&&(3!==e||16!==t&&32!==t&&64!==t)}(i,s)&&(e=function(e,t,i,r,s,n,o){const a=new DataView(e),l=2===i?1:r,h=xe(t,s,2===i?o*n:o*n*r),c=parseInt("1".repeat(s),2);if(1===t){let e;e=1===i?r*s:s;let t=n*e;7&t&&(t=t+7&-8);for(let e=0;e>8-s-g&c;else if(g+s<=16)h[f]=a.getUint16(u)>>16-s-g&c;else if(g+s<=24){const e=a.getUint16(u)<<8|a.getUint8(u+2);h[f]=e>>24-s-g&c}else h[f]=a.getUint32(u)>>32-s-g&c}}}}return h.buffer}(e,i,this.planarConfiguration,this.getSamplesPerPixel(),s,this.getTileWidth(),this.getBlockHeight(t))),e})(),null!==l&&(l[a]=u)),{x:e,y:t,sample:i,data:await u}}async _readRaster(e,t,i,r,s,n,o,a,l){const h=this.getTileWidth(),c=this.getTileHeight(),f=this.getWidth(),u=this.getHeight(),g=Math.max(Math.floor(e[0]/h),0),d=Math.min(Math.ceil(e[2]/h),Math.ceil(f/h)),p=Math.max(Math.floor(e[1]/c),0),y=Math.min(Math.ceil(e[3]/c),Math.ceil(u/c)),w=e[2]-e[0];let m=this.getBytesPerPixel();const b=[],S=[];for(let e=0;e{const n=s.data,o=new DataView(n),a=this.getBlockHeight(s.y),l=s.y*c,g=s.x*h,p=l+a,y=(s.x+1)*h,I=S[d],_=Math.min(a,a-(p-e[3]),u-l),T=Math.min(h,h-(y-e[2]),f-g);for(let s=Math.max(0,e[1]-l);s<_;++s)for(let n=Math.max(0,e[0]-g);n{const a=Te(e,r,s);for(let l=0;l{const a=Te(e,r,s);for(let l=0;lc[2]||c[1]>c[3])throw new Error("Invalid subsets");const f=(c[2]-c[0])*(c[3]-c[1]),u=this.getSamplesPerPixel();if(t&&t.length){for(let e=0;e=u)return Promise.reject(new RangeError(`Invalid sample index '${t[e]}'.`))}else for(let e=0;eh[2]||h[1]>h[3])throw new Error("Invalid subsets");const c=this.fileDirectory.PhotometricInterpretation;if(c===n.ub.RGB){let h=[0,1,2];if(this.fileDirectory.ExtraSamples!==n.AC.Unspecified&&a){h=[];for(let e=0;e>24)/500+a,h=a-(e[t+2]<<24>>24)/200;l=.95047*(l*l*l>.008856?l*l*l:(l-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),h=1.08883*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),s=3.2406*l+-1.5372*a+-.4986*h,n=-.9689*l+1.8758*a+.0415*h,o=.0557*l+-.204*a+1.057*h,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,r[i]=255*Math.max(0,Math.min(1,s)),r[i+1]=255*Math.max(0,Math.min(1,n)),r[i+2]=255*Math.max(0,Math.min(1,o))}return r}(d);break;default:throw new Error("Unsupported photometric interpretation.")}if(!t){const e=new Uint8Array(y.length/3),t=new Uint8Array(y.length/3),i=new Uint8Array(y.length/3);for(let r=0,s=0;rvoid 0===Ae(e,"sample"))):r.filter((t=>Number(Ae(t,"sample"))===e));for(let e=0;e[n+e*t+r*i,h+o*t+a*i])),f=c.map((e=>e[0])),u=c.map((e=>e[1]));return[Math.min(...f),Math.min(...u),Math.max(...f),Math.max(...u)]}{const e=this.getOrigin(),r=this.getResolution(),s=e[0],n=e[1],o=s+r[0]*i,a=n+r[1]*t;return[Math.min(s,o),Math.min(n,a),Math.max(s,o),Math.max(n,a)]}}};class Me{constructor(e){this._dataView=new DataView(e)}get buffer(){return this._dataView.buffer}getUint64(e,t){const i=this.getUint32(e,t),r=this.getUint32(e+4,t);let s;if(t){if(s=i+2**32*r,!Number.isSafeInteger(s))throw new Error(`${s} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return s}if(s=2**32*i+r,!Number.isSafeInteger(s))throw new Error(`${s} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return s}getInt64(e,t){let i=0;const r=(128&this._dataView.getUint8(e+(t?7:0)))>0;let s=!0;for(let n=0;n<8;n++){let o=this._dataView.getUint8(e+(t?n:7-n));r&&(s?0!==o&&(o=255&~(o-1),s=!1):o=255&~o),i+=o*256**n}return r&&(i=-i),i}getUint8(e,t){return this._dataView.getUint8(e,t)}getInt8(e,t){return this._dataView.getInt8(e,t)}getUint16(e,t){return this._dataView.getUint16(e,t)}getInt16(e,t){return this._dataView.getInt16(e,t)}getUint32(e,t){return this._dataView.getUint32(e,t)}getInt32(e,t){return this._dataView.getInt32(e,t)}getFloat16(e,t){return Ie(this._dataView,e,t)}getFloat32(e,t){return this._dataView.getFloat32(e,t)}getFloat64(e,t){return this._dataView.getFloat64(e,t)}}class Ce{constructor(e,t,i,r){this._dataView=new DataView(e),this._sliceOffset=t,this._littleEndian=i,this._bigTiff=r}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}readUint8(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}readInt8(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}readUint16(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}readInt16(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}readUint32(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}readInt32(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}readFloat32(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}readFloat64(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}readUint64(e){const t=this.readUint32(e),i=this.readUint32(e+4);let r;if(this._littleEndian){if(r=t+2**32*i,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}if(r=2**32*t+i,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}readInt64(e){let t=0;const i=(128&this._dataView.getUint8(e+(this._littleEndian?7:0)))>0;let r=!0;for(let s=0;s<8;s++){let n=this._dataView.getUint8(e+(this._littleEndian?s:7-s));i&&(r?0!==n&&(n=255&~(n-1),r=!1):n=255&~n),t+=n*256**s}return i&&(t=-t),t}readOffset(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}}function Fe(e){if(void 0!==Object.fromEntries)return Object.fromEntries(e);const t={};for(const[i,r]of e)t[i.toLowerCase()]=r;return t}function ke(e){return Fe(e.split("\r\n").map((e=>{const t=e.split(":").map((e=>e.trim()));return t[0]=t[0].toLowerCase(),t})))}function Ge(e){let t,i,r;return e&&([,t,i,r]=e.match(/bytes (\d+)-(\d+)\/(\d+)/),t=parseInt(t,10),i=parseInt(i,10),r=parseInt(r,10)),{start:t,end:i,total:r}}class Re{async fetch(e,t=void 0){return Promise.all(e.map((e=>this.fetchSlice(e,t))))}async fetchSlice(e){throw new Error(`fetching of slice ${e} not possible, not implemented`)}get fileSize(){return null}async close(){}}class Oe extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof e.maxAge&&0===e.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if("function"==typeof this.onEviction)for(const[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return"number"==typeof t.expiry&&t.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(e,t.value),this.delete(e))}_getOrDeleteIfExpired(e,t){if(!1===this._deleteIfExpired(e,t))return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){const i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(const e of this.oldCache){const[t,i]=e;this.cache.has(t)||!1===this._deleteIfExpired(t,i)&&(yield e)}for(const e of this.cache){const[t,i]=e;!1===this._deleteIfExpired(t,i)&&(yield e)}}get(e){if(this.cache.has(e)){const t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);if(!1===this._deleteIfExpired(e,t))return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge}={}){const r="number"==typeof i&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;return this.cache.has(e)?this.cache.set(e,{value:t,expiry:r}):this._set(e,{value:t,expiry:r}),this}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):!!this.oldCache.has(e)&&!this._deleteIfExpired(e,this.oldCache.get(e))}peek(e){return this.cache.has(e)?this._peek(e,this.cache):this.oldCache.has(e)?this._peek(e,this.oldCache):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache){const[t,i]=e;!1===this._deleteIfExpired(t,i)&&(yield[t,i.value])}for(const e of this.oldCache){const[t,i]=e;this.cache.has(t)||!1===this._deleteIfExpired(t,i)&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){const i=e[t],[r,s]=i;!1===this._deleteIfExpired(r,s)&&(yield[r,s.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){const i=e[t],[r,s]=i;this.cache.has(r)||!1===this._deleteIfExpired(r,s)&&(yield[r,s.value])}}*entriesAscending(){for(const[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(const[i,r]of this.entriesAscending())e.call(t,r,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}class Ue extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,Ue),this.name="AbortError"}}class ve extends Error{constructor(e,t){super(t),this.errors=e,this.message=t,this.name="AggregateError"}}const Le=ve;class Be{constructor(e,t,i=null){this.offset=e,this.length=t,this.data=i}get top(){return this.offset+this.length}}class ze{constructor(e,t,i){this.offset=e,this.length=t,this.blockIds=i}}class Ne extends Re{constructor(e,{blockSize:t=65536,cacheSize:i=100}={}){super(),this.source=e,this.blockSize=t,this.blockCache=new Oe({maxSize:i,onEviction:(e,t)=>{this.evictedBlocks.set(e,t)}}),this.evictedBlocks=new Map,this.blockRequests=new Map,this.blockIdsToFetch=new Set,this.abortedBlockIds=new Set}get fileSize(){return this.source.fileSize}async fetch(e,t){const i=[],r=[],s=[];this.evictedBlocks.clear();for(const{offset:t,length:n}of e){let e=t+n;const{fileSize:o}=this;null!==o&&(e=Math.min(e,o));for(let n=Math.floor(t/this.blockSize)*this.blockSize;nsetTimeout(e,undefined)))}(),this.fetchBlocks(t);const n=[];for(const e of r)this.blockRequests.has(e)&&n.push(this.blockRequests.get(e));await Promise.allSettled(i),await Promise.allSettled(n);const o=[],a=s.filter((e=>this.abortedBlockIds.has(e)||!this.blockCache.has(e)));if(a.forEach((e=>this.blockIdsToFetch.add(e))),a.length>0&&t&&!t.aborted){this.fetchBlocks(null);for(const e of a){const t=this.blockRequests.get(e);if(!t)throw new Error(`Block ${e} is not in the block requests`);o.push(t)}await Promise.allSettled(o)}if(t&&t.aborted)throw new Ue("Request was aborted");const l=s.map((e=>this.blockCache.get(e)||this.evictedBlocks.get(e))),h=l.filter((e=>!e));if(h.length)throw new Le(h,"Request failed");const c=new Map(function(e,t){const i=Array.isArray(e)?e:Array.from(e),r=Array.isArray(t)?t:Array.from(t);return i.map(((e,t)=>[e,r[t]]))}(s,l));return this.readSliceData(e,c)}fetchBlocks(e){if(this.blockIdsToFetch.size>0){const t=this.groupBlocks(this.blockIdsToFetch),i=this.source.fetch(t,e);for(let r=0;r{try{const e=(await i)[r],s=t*this.blockSize,n=s-e.offset,o=Math.min(n+this.blockSize,e.data.byteLength),a=e.data.slice(n,o),l=new Be(s,a.byteLength,a,t);this.blockCache.set(t,l),this.abortedBlockIds.delete(t)}catch(i){if("AbortError"!==i.name)throw i;i.signal=e,this.blockCache.delete(t),this.abortedBlockIds.add(t)}finally{this.blockRequests.delete(t)}})())}this.blockIdsToFetch.clear()}}groupBlocks(e){const t=Array.from(e).sort(((e,t)=>e-t));if(0===t.length)return[];let i=[],r=null;const s=[];for(const e of t)null===r||r+1===e?(i.push(e),r=e):(s.push(new ze(i[0]*this.blockSize,i.length*this.blockSize,i)),i=[e],r=e);return s.push(new ze(i[0]*this.blockSize,i.length*this.blockSize,i)),s}readSliceData(e,t){return e.map((e=>{let i=e.offset+e.length;null!==this.fileSize&&(i=Math.min(this.fileSize,i));const r=Math.floor(e.offset/this.blockSize),s=Math.floor(i/this.blockSize),n=new ArrayBuffer(e.length),o=new Uint8Array(n);for(let n=r;n<=s;++n){const r=t.get(n),s=r.offset-e.offset;let a,l=0,h=0;s<0?l=-s:s>0&&(h=s),a=r.top-i<0?r.length-l:i-r.offset-l;const c=new Uint8Array(r.data,l,a);o.set(c,h)}return n}))}}class $e{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(e){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class Ve{constructor(e){this.url=e}async request({headers:e,signal:t}={}){throw new Error("request is not implemented")}}class Ke extends $e{constructor(e){super(),this.response=e}get status(){return this.response.status}getHeader(e){return this.response.headers.get(e)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class je extends Ve{constructor(e,t){super(e),this.credentials=t}async request({headers:e,signal:t}={}){const i=await fetch(this.url,{headers:e,credentials:this.credentials,signal:t});return new Ke(i)}}class qe extends $e{constructor(e,t){super(),this.xhr=e,this.data=t}get status(){return this.xhr.status}getHeader(e){return this.xhr.getResponseHeader(e)}async getData(){return this.data}}class He extends Ve{constructRequest(e,t){return new Promise(((i,r)=>{const s=new XMLHttpRequest;s.open("GET",this.url),s.responseType="arraybuffer";for(const[t,i]of Object.entries(e))s.setRequestHeader(t,i);s.onload=()=>{const e=s.response;i(new qe(s,e))},s.onerror=r,s.onabort=()=>r(new Ue("Request aborted")),s.send(),t&&(t.aborted&&s.abort(),t.addEventListener("abort",(()=>s.abort())))}))}async request({headers:e,signal:t}={}){return await this.constructRequest(e,t)}}var We=i(8625),Ye=i(6504),Xe=i(6580);class Ze extends $e{constructor(e,t){super(),this.response=e,this.dataPromise=t}get status(){return this.response.statusCode}getHeader(e){return this.response.headers[e]}async getData(){return await this.dataPromise}}class Je extends Ve{constructor(e){super(e),this.parsedUrl=Xe.parse(this.url),this.httpApi="http:"===this.parsedUrl.protocol?We:Ye}constructRequest(e,t){return new Promise(((i,r)=>{const s=this.httpApi.get({...this.parsedUrl,headers:e},(e=>{const t=new Promise((t=>{const i=[];e.on("data",(e=>{i.push(e)})),e.on("end",(()=>{const e=Buffer.concat(i).buffer;t(e)})),e.on("error",r)}));i(new Ze(e,t))}));s.on("error",r),t&&(t.aborted&&s.destroy(new Ue("Request aborted")),t.addEventListener("abort",(()=>s.destroy(new Ue("Request aborted")))))}))}async request({headers:e,signal:t}={}){return await this.constructRequest(e,t)}}class Qe extends Re{constructor(e,t,i,r){super(),this.client=e,this.headers=t,this.maxRanges=i,this.allowFullFile=r,this._fileSize=null}async fetch(e,t){return this.maxRanges>=e.length?this.fetchSlices(e,t):(this.maxRanges>0&&e.length,Promise.all(e.map((e=>this.fetchSlice(e,t)))))}async fetchSlices(e,t){const i=await this.client.request({headers:{...this.headers,Range:`bytes=${e.map((({offset:e,length:t})=>`${e}-${e+t}`)).join(",")}`},signal:t});if(i.ok){if(206===i.status){const{type:r,params:s}=function(e){const[t,...i]=e.split(";").map((e=>e.trim()));return{type:t,params:Fe(i.map((e=>e.split("="))))}}(i.getHeader("content-type"));if("multipart/byteranges"===r){const e=function(e,t){let i=null;const r=new TextDecoder("ascii"),s=[],n=`--${t}`,o=`${n}--`;for(let t=0;t<10;++t)r.decode(new Uint8Array(e,t,n.length))===n&&(i=t);if(null===i)throw new Error("Could not find initial boundary");for(;i1){const i=await Promise.all(e.slice(1).map((e=>this.fetchSlice(e,t))));return h.concat(i)}return h}{if(!this.allowFullFile)throw new Error("Server responded with full file");const e=await i.getData();return this._fileSize=e.byteLength,[{data:e,offset:0,length:e.byteLength}]}}throw new Error("Error fetching data.")}async fetchSlice(e,t){const{offset:i,length:r}=e,s=await this.client.request({headers:{...this.headers,Range:`bytes=${i}-${i+r}`},signal:t});if(s.ok){if(206===s.status){const e=await s.getData(),{total:t}=Ge(s.getHeader("content-range"));return this._fileSize=t||null,{data:e,offset:i,length:r}}{if(!this.allowFullFile)throw new Error("Server responded with full file");const e=await s.getData();return this._fileSize=e.byteLength,{data:e,offset:0,length:e.byteLength}}}throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function et(e,{blockSize:t,cacheSize:i}){return null===t?e:new Ne(e,{blockSize:t,cacheSize:i})}function tt(e,{forceXHR:t=!1,...i}={}){return"function"!=typeof fetch||t?"undefined"!=typeof XMLHttpRequest?function(e,{headers:t={},maxRanges:i=0,allowFullFile:r=!1,...s}={}){const n=new He(e);return et(new Qe(n,t,i,r),s)}(e,i):function(e,{headers:t={},maxRanges:i=0,allowFullFile:r=!1,...s}={}){const n=new Je(e);return et(new Qe(n,t,i,r),s)}(e,i):function(e,{headers:t={},credentials:i,maxRanges:r=0,allowFullFile:s=!1,...n}={}){const o=new je(e,i);return et(new Qe(o,t,r,s),n)}(e,i)}class it extends Re{constructor(e){super(),this.file=e}async fetchSlice(e,t){return new Promise(((i,r)=>{const s=this.file.slice(e.offset,e.offset+e.length),n=new FileReader;n.onload=e=>i(e.target.result),n.onerror=r,n.onabort=r,n.readAsArrayBuffer(s),t&&t.addEventListener("abort",(()=>n.abort()))}))}}function rt(e){switch(e){case n.s$.BYTE:case n.s$.ASCII:case n.s$.SBYTE:case n.s$.UNDEFINED:return 1;case n.s$.SHORT:case n.s$.SSHORT:return 2;case n.s$.LONG:case n.s$.SLONG:case n.s$.FLOAT:case n.s$.IFD:return 4;case n.s$.RATIONAL:case n.s$.SRATIONAL:case n.s$.DOUBLE:case n.s$.LONG8:case n.s$.SLONG8:case n.s$.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${e}`)}}function st(e,t,i,r){let s=null,o=null;const a=rt(t);switch(t){case n.s$.BYTE:case n.s$.ASCII:case n.s$.UNDEFINED:s=new Uint8Array(i),o=e.readUint8;break;case n.s$.SBYTE:s=new Int8Array(i),o=e.readInt8;break;case n.s$.SHORT:s=new Uint16Array(i),o=e.readUint16;break;case n.s$.SSHORT:s=new Int16Array(i),o=e.readInt16;break;case n.s$.LONG:case n.s$.IFD:s=new Uint32Array(i),o=e.readUint32;break;case n.s$.SLONG:s=new Int32Array(i),o=e.readInt32;break;case n.s$.LONG8:case n.s$.IFD8:s=new Array(i),o=e.readUint64;break;case n.s$.SLONG8:s=new Array(i),o=e.readInt64;break;case n.s$.RATIONAL:s=new Uint32Array(2*i),o=e.readUint32;break;case n.s$.SRATIONAL:s=new Int32Array(2*i),o=e.readInt32;break;case n.s$.FLOAT:s=new Float32Array(i),o=e.readFloat32;break;case n.s$.DOUBLE:s=new Float64Array(i),o=e.readFloat64;break;default:throw new RangeError(`Invalid field type: ${t}`)}if(t!==n.s$.RATIONAL&&t!==n.s$.SRATIONAL)for(let t=0;te.getWidth()-t.getWidth()));for(let t=0;tr||n&&n>o)break}}let f=t;if(o){const[e,t]=a.getOrigin(),[i,r]=l.getResolution(a);f=[Math.round((o[0]-e)/i),Math.round((o[1]-t)/r),Math.round((o[2]-e)/i),Math.round((o[3]-t)/r)],f=[Math.min(f[0],f[2]),Math.min(f[1],f[3]),Math.max(f[0],f[2]),Math.max(f[1],f[3])]}return l.readRasters({...e,window:f})}}class lt extends at{constructor(e,t,i,r,s={}){super(),this.source=e,this.littleEndian=t,this.bigTiff=i,this.firstIFDOffset=r,this.cache=s.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(e,t){const i=this.bigTiff?4048:1024;return new Ce((await this.source.fetch([{offset:e,length:void 0!==t?t:i}]))[0],e,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(e){const t=this.bigTiff?20:12,i=this.bigTiff?8:2;let r=await this.getSlice(e);const s=this.bigTiff?r.readUint64(e):r.readUint16(e),o=s*t+(this.bigTiff?16:6);r.covers(e,o)||(r=await this.getSlice(e,o));const a={};let l=e+(this.bigTiff?8:2);for(let e=0;e{const t=await this.ifdRequests[e-1];if(0===t.nextIFDByteOffset)throw new ot(e);return this.parseFileDirectoryAt(t.nextIFDByteOffset)})(),this.ifdRequests[e]}async getImage(e=0){const t=await this.requestIFD(e);return new Pe(t.fileDirectory,t.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let e=0,t=!0;for(;t;)try{await this.requestIFD(e),++e}catch(e){if(!(e instanceof ot))throw e;t=!1}return e}async getGhostValues(){const e=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;let t=await this.getSlice(e,130);if("GDAL_STRUCTURAL_METADATA_SIZE="===st(t,n.s$.ASCII,30,e)){const i=st(t,n.s$.ASCII,130,e).split("\n")[0],r=Number(i.split("=")[1].split(" ")[0])+i.length;r>130&&(t=await this.getSlice(e,r));const s=st(t,n.s$.ASCII,r,e);this.ghostValues={},s.split("\n").filter((e=>e.length>0)).map((e=>e.split("="))).forEach((([e,t])=>{this.ghostValues[e]=t}))}return this.ghostValues}static async fromSource(e,t,i){const r=(await e.fetch([{offset:0,length:1024}],i))[0],s=new Me(r),n=s.getUint16(0,0);let o;if(18761===n)o=!0;else{if(19789!==n)throw new TypeError("Invalid byte order value.");o=!1}const a=s.getUint16(2,o);let l;if(42===a)l=!1;else{if(43!==a)throw new TypeError("Invalid magic number.");if(l=!0,8!==s.getUint16(4,o))throw new Error("Unsupported offset byte-size.")}const h=l?s.getUint64(8,o):s.getUint32(4,o);return new lt(e,o,l,h,t)}close(){return"function"==typeof this.source.close&&this.source.close()}}class ht extends at{constructor(e,t){super(),this.mainFile=e,this.overviewFiles=t,this.imageFiles=[e].concat(t),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const e=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((e=>e.parseFileDirectoryAt(e.firstIFDOffset))));return this.fileDirectoriesPerFile=await Promise.all(e),this.fileDirectoriesPerFile}async getImage(e=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let t=0,i=0;for(let r=0;re.getImageCount())));return this.imageCounts=await Promise.all(e),this.imageCount=this.imageCounts.reduce(((e,t)=>e+t),0),this.imageCount}}var ct=i(3407),ft=i(1597),ut=i(915),gt=i(4422),dt=i(8100);function pt(e,t){if(!e)return!1;if(!0===e)return!0;if(3!==t.getSamplesPerPixel())return!1;const i=t.fileDirectory.PhotometricInterpretation,r=n.ub;return i===r.CMYK||i===r.YCbCr||i===r.CIELab||i===r.ICCLab}const yt="STATISTICS_MAXIMUM",wt="STATISTICS_MINIMUM";let mt;function bt(){return mt||(mt=new c),mt}function St(e){try{return e.getBoundingBox()}catch(t){return[0,0,e.getWidth(),e.getHeight()]}}function It(e){try{return e.getOrigin().slice(0,2)}catch(t){return[0,e.getHeight()]}}function At(e,t){try{return e.getResolution(t)}catch(i){return[t.getWidth()/e.getWidth(),t.getHeight()/e.getHeight()]}}function _t(e){const t=e.geoKeys;if(!t)return null;if(t.ProjectedCSTypeGeoKey&&32767!==t.ProjectedCSTypeGeoKey){const e="EPSG:"+t.ProjectedCSTypeGeoKey;let i=(0,ct.Jt)(e);if(!i){const r=(0,dt.q)(t.ProjLinearUnitsGeoKey);r&&(i=new ct.MF({code:e,units:r}))}return i}if(t.GeographicTypeGeoKey&&32767!==t.GeographicTypeGeoKey){const e="EPSG:"+t.GeographicTypeGeoKey;let i=(0,ct.Jt)(e);if(!i){const r=(0,dt.q)(t.GeogAngularUnitsGeoKey);r&&(i=new ct.MF({code:e,units:r}))}return i}return null}function Tt(e){return e.getImageCount().then((function(t){const i=new Array(t);for(let r=0;rlt.fromSource(tt(e,i)))));return new ht(s,n)}(e.url,e.overviews,t):async function(e,t={},i){return lt.fromSource(tt(e,t),i)}(e.url,t),i.then(Tt)}function Et(e,t,i,r,s){if(Array.isArray(e)){const n=e.length;if(!Array.isArray(t)||n!=t.length){const e=new Error(r);throw s(e),e}for(let o=0;oi*e)throw new Error(r)}function xt(e){return e instanceof Int8Array?127:e instanceof Uint8Array||e instanceof Uint8ClampedArray?255:e instanceof Int16Array?32767:e instanceof Uint16Array?65535:e instanceof Int32Array?2147483647:e instanceof Uint32Array?4294967295:e instanceof Float32Array?34e37:255}class Pt extends r.A{constructor(e){super({state:"loading",tileGrid:null,projection:e.projection||null,transition:e.transition,interpolate:!1!==e.interpolate,wrapX:e.wrapX}),this.sourceInfo_=e.sources;const t=this.sourceInfo_.length;this.sourceOptions_=e.sourceOptions,this.sourceImagery_=new Array(t),this.sourceMasks_=new Array(t),this.resolutionFactors_=new Array(t),this.samplesPerPixel_,this.nodataValues_,this.metadata_,this.normalize_=!1!==e.normalize,this.addAlpha_=!1,this.error_=null,this.convertToRGB_=e.convertToRGB||!1,this.setKey(this.sourceInfo_.map((e=>e.url)).join(","));const i=this,r=new Array(t);for(let e=0;e=0;--e){const i=_t(t[e]);if(i){this.projection=i;break}}}configure_(e){let t,i,r,n,o;const a=new Array(e.length),l=new Array(e.length),h=new Array(e.length);let c=0;const f=e.length;for(let s=0;s{4&~(e.fileDirectory.NewSubfileType||0)?f.push(e):u.push(e)}));const g=f.length;if(u.length>0&&u.length!==g)throw new Error(`Expected one mask per image found ${u.length} masks and ${g} images`);let d,p;const y=new Array(g),w=new Array(g),m=new Array(g);l[s]=new Array(g),h[s]=new Array(g);for(let e=0;em.length&&(c=o.length-m.length);const e=o[o.length-1]/m[m.length-1];this.resolutionFactors_[s]=e;const t=m.map((t=>t*e)),i=`Resolution mismatch for source ${s}, got [${t}] but expected [${o}]`;Et(o.slice(c,o.length),t,.02,i,this.viewRejector)}else o=m,this.resolutionFactors_[s]=1;r?Et(r.slice(c,r.length),w,.01,`Tile size mismatch for source ${s}`,this.viewRejector):r=w,n?Et(n.slice(c,n.length),y,0,`Tile size mismatch for source ${s}`,this.viewRejector):n=y,this.sourceImagery_[s]=f.reverse(),this.sourceMasks_[s]=u.reverse()}for(let e=0,t=this.sourceImagery_.length;e{o.d(n,{A:()=>a});var t=o(1601),r=o.n(t),i=o(6314),l=o.n(i)()(r());l.push([e.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n',""]);const a=l},5045:(e,n,o)=>{var t=o(5072),r=o.n(t),i=o(7825),l=o.n(i),a=o(7659),s=o.n(a),u=o(5056),c=o.n(u),d=o(540),p=o.n(d),b=o(1113),g=o.n(b),m=o(4096),f={};f.styleTagTransform=g(),f.setAttributes=c(),f.insert=s().bind(null,"head"),f.domAPI=l(),f.insertStyleElement=p(),r()(m.A,f),m.A&&m.A.locals&&m.A.locals},8217:(e,n,o)=>{o.d(n,{Ay:()=>m,Bs:()=>h,hX:()=>f,te:()=>x});var t=o(6717),r=o(4778),i=o(4294),l=o(1217),a=o(1064),s=o(503),u=o(6702),c=o(2871),d=o(4338),p=o(4087),b=o(3407),g=o(3402);const m=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=t.A,this.supportedMediaTypes=null}getReadOptions(e,n){if(n){let o=n.dataProjection?(0,b.Jt)(n.dataProjection):this.readProjection(e);n.extent&&o&&"tile-pixels"===o.getUnits()&&(o=(0,b.Jt)(o),o.setWorldExtent(n.extent)),n={dataProjection:o,featureProjection:n.featureProjection}}return this.adaptOptions(n)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return(0,p.b0)()}readFeature(e,n){return(0,p.b0)()}readFeatures(e,n){return(0,p.b0)()}readGeometry(e,n){return(0,p.b0)()}readProjection(e){return(0,p.b0)()}writeFeature(e,n){return(0,p.b0)()}writeFeatures(e,n){return(0,p.b0)()}writeGeometry(e,n){return(0,p.b0)()}};function f(e,n,o){const t=o?(0,b.Jt)(o.featureProjection):null,r=o?(0,b.Jt)(o.dataProjection):null;let i=e;if(t&&r&&!(0,b.tI)(t,r)){n&&(i=e.clone());const o=n?t:r,l=n?r:t;"tile-pixels"===o.getUnits()?i.transform(o,l):i.applyTransform((0,b.RG)(o,l))}if(n&&o&&void 0!==o.decimals){const n=Math.pow(10,o.decimals),t=function(e){for(let o=0,t=e.length;oh({...e,geometry:n}))).flat();const t="MultiPolygon"===o.type?"Polygon":o.type;if("GeometryCollection"===t||"Circle"===t)throw new Error("Unsupported geometry type: "+t);const i=o.layout.length;return f(new r.Ay(t,"Polygon"===t?function(e,n,o){return Array.isArray(n[0])?((0,g.mb)(e,0,n,o)||(e=e.slice(),(0,g.NK)(e,0,n,o)),e):((0,g.PA)(e,0,n,o)||(e=e.slice(),(0,g.ug)(e,0,n,o)),e)}(o.flatCoordinates,o.ends,i):o.flatCoordinates,o.ends?.flat(),i,e.properties||{},e.id).enableSimplifyTransformed(),!1,n)}function x(e,n){if(!e)return null;if(Array.isArray(e)){const o=e.map((e=>x(e,n)));return new d.A(o)}return f(new(0,y[e.type])(e.flatCoordinates,e.layout,e.ends),!1,n)}},1365:(e,n,o)=>{o.d(n,{A:()=>f});var t=o(6717),r=o(8217),i=o(4087);class l extends r.Ay{constructor(){super()}getType(){return"json"}readFeature(e,n){return this.readFeatureFromObject(a(e),this.getReadOptions(e,n))}readFeatures(e,n){return this.readFeaturesFromObject(a(e),this.getReadOptions(e,n))}readFeatureFromObject(e,n){return(0,i.b0)()}readFeaturesFromObject(e,n){return(0,i.b0)()}readGeometry(e,n){return this.readGeometryFromObject(a(e),this.getReadOptions(e,n))}readGeometryFromObject(e,n){return(0,i.b0)()}readProjection(e){return this.readProjectionFromObject(a(e))}readProjectionFromObject(e){return(0,i.b0)()}writeFeature(e,n){return JSON.stringify(this.writeFeatureObject(e,n))}writeFeatureObject(e,n){return(0,i.b0)()}writeFeatures(e,n){return JSON.stringify(this.writeFeaturesObject(e,n))}writeFeaturesObject(e,n){return(0,i.b0)()}writeGeometry(e,n){return JSON.stringify(this.writeGeometryObject(e,n))}writeGeometryObject(e,n){return(0,i.b0)()}}function a(e){if("string"==typeof e){return JSON.parse(e)||null}return null!==e?e:null}const s=l;var u=o(4778),c=o(2497),d=o(2096),p=o(3407),b=o(3530);function g(e,n){if(!e)return null;let o;switch(e.type){case"Point":o=function(e){const n=e.coordinates;return{type:"Point",flatCoordinates:n,layout:(0,d.p0)(n.length)}}(e);break;case"LineString":o=function(e){const n=e.coordinates,o=n.flat();return{type:"LineString",flatCoordinates:o,ends:[o.length],layout:(0,d.p0)(n[0]?.length||2)}}(e);break;case"Polygon":o=function(e){const n=e.coordinates,o=[],t=n[0]?.[0]?.length;return{type:"Polygon",flatCoordinates:o,ends:(0,c.KG)(o,0,n,t),layout:(0,d.p0)(t)}}(e);break;case"MultiPoint":o=function(e){const n=e.coordinates;return{type:"MultiPoint",flatCoordinates:n.flat(),layout:(0,d.p0)(n[0]?.length||2)}}(e);break;case"MultiLineString":o=function(e){const n=e.coordinates,o=n[0]?.[0]?.length||2,t=[];return{type:"MultiLineString",flatCoordinates:t,ends:(0,c.KG)(t,0,n,o),layout:(0,d.p0)(o)}}(e);break;case"MultiPolygon":o=function(e){const n=e.coordinates,o=[],t=n[0]?.[0]?.[0].length||2;return{type:"MultiPolygon",flatCoordinates:o,ends:(0,c.d6)(o,0,n,t),layout:(0,d.p0)(t)}}(e);break;case"GeometryCollection":o=function(e,n){const o=e.geometries.map((function(e){return g(e)}));return o}(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return o}function m(e,n){const o=(e=(0,r.hX)(e,!0,n)).getType();let t;switch(o){case"Point":t=function(e,n){return{type:"Point",coordinates:e.getCoordinates()}}(e);break;case"LineString":t=function(e,n){return{type:"LineString",coordinates:e.getCoordinates()}}(e);break;case"Polygon":t=function(e,n){let o;return n&&(o=n.rightHanded),{type:"Polygon",coordinates:e.getCoordinates(o)}}(e,n);break;case"MultiPoint":t=function(e,n){return{type:"MultiPoint",coordinates:e.getCoordinates()}}(e);break;case"MultiLineString":t=function(e,n){return{type:"MultiLineString",coordinates:e.getCoordinates()}}(e);break;case"MultiPolygon":t=function(e,n){let o;return n&&(o=n.rightHanded),{type:"MultiPolygon",coordinates:e.getCoordinates(o)}}(e,n);break;case"GeometryCollection":t=function(e,n){delete(n=Object.assign({},n)).featureProjection;return{type:"GeometryCollection",geometries:e.getGeometriesArray().map((function(e){return m(e,n)}))}}(e,n);break;case"Circle":t={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+o)}return t}const f=class extends s{constructor(e){e=e||{},super(),this.dataProjection=(0,p.Jt)(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=(0,p.Jt)(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,n){let o=null;o="Feature"===e.type?e:{type:"Feature",geometry:e,properties:null};const i=g(o.geometry);if(this.featureClass===u.Ay)return(0,r.Bs)({geometry:i,id:o.id,properties:o.properties},n);const l=new t.A;return this.geometryName_?l.setGeometryName(this.geometryName_):this.extractGeometryName_&&o.geometry_name&&l.setGeometryName(o.geometry_name),l.setGeometry((0,r.te)(i,n)),"id"in o&&l.setId(o.id),o.properties&&l.setProperties(o.properties,!0),l}readFeaturesFromObject(e,n){let o=null;if("FeatureCollection"===e.type){o=[];const t=e.features;for(let e=0,r=t.length;e{o.d(n,{A:()=>a});var t=o(1601),r=o.n(t),i=o(6314),l=o.n(i)()(r());l.push([e.id,':root,\n:host {\n --ol-background-color: white;\n --ol-accent-background-color: #F5F5F5;\n --ol-subtle-background-color: rgba(128, 128, 128, 0.25);\n --ol-partial-background-color: rgba(255, 255, 255, 0.75);\n --ol-foreground-color: #333333;\n --ol-subtle-foreground-color: #666666;\n --ol-brand-color: #00AAFF;\n}\n\n.ol-box {\n box-sizing: border-box;\n border-radius: 2px;\n border: 1.5px solid var(--ol-background-color);\n background-color: var(--ol-partial-background-color);\n}\n\n.ol-mouse-position {\n top: 8px;\n right: 8px;\n position: absolute;\n}\n\n.ol-scale-line {\n background: var(--ol-partial-background-color);\n border-radius: 4px;\n bottom: 8px;\n left: 8px;\n padding: 2px;\n position: absolute;\n}\n\n.ol-scale-line-inner {\n border: 1px solid var(--ol-subtle-foreground-color);\n border-top: none;\n color: var(--ol-foreground-color);\n font-size: 10px;\n text-align: center;\n margin: 1px;\n will-change: contents, width;\n transition: all 0.25s;\n}\n\n.ol-scale-bar {\n position: absolute;\n bottom: 8px;\n left: 8px;\n}\n\n.ol-scale-bar-inner {\n display: flex;\n}\n\n.ol-scale-step-marker {\n width: 1px;\n height: 15px;\n background-color: var(--ol-foreground-color);\n float: right;\n z-index: 10;\n}\n\n.ol-scale-step-text {\n position: absolute;\n bottom: -5px;\n font-size: 10px;\n z-index: 11;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-text {\n position: absolute;\n font-size: 12px;\n text-align: center;\n bottom: 25px;\n color: var(--ol-foreground-color);\n text-shadow: -1.5px 0 var(--ol-partial-background-color), 0 1.5px var(--ol-partial-background-color), 1.5px 0 var(--ol-partial-background-color), 0 -1.5px var(--ol-partial-background-color);\n}\n\n.ol-scale-singlebar {\n position: relative;\n height: 10px;\n z-index: 9;\n box-sizing: border-box;\n border: 1px solid var(--ol-foreground-color);\n}\n\n.ol-scale-singlebar-even {\n background-color: var(--ol-subtle-foreground-color);\n}\n\n.ol-scale-singlebar-odd {\n background-color: var(--ol-background-color);\n}\n\n.ol-unsupported {\n display: none;\n}\n\n.ol-viewport,\n.ol-unselectable {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.ol-viewport canvas {\n all: unset;\n overflow: hidden;\n}\n\n.ol-viewport {\n touch-action: pan-x pan-y;\n}\n\n.ol-selectable {\n -webkit-touch-callout: default;\n -webkit-user-select: text;\n -moz-user-select: text;\n user-select: text;\n}\n\n.ol-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.ol-grab {\n cursor: move;\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.ol-control {\n position: absolute;\n background-color: var(--ol-subtle-background-color);\n border-radius: 4px;\n}\n\n.ol-zoom {\n top: .5em;\n left: .5em;\n}\n\n.ol-rotate {\n top: .5em;\n right: .5em;\n transition: opacity .25s linear, visibility 0s linear;\n}\n\n.ol-rotate.ol-hidden {\n opacity: 0;\n visibility: hidden;\n transition: opacity .25s linear, visibility 0s linear .25s;\n}\n\n.ol-zoom-extent {\n top: 4.643em;\n left: .5em;\n}\n\n.ol-full-screen {\n right: .5em;\n top: .5em;\n}\n\n.ol-control button {\n display: block;\n margin: 1px;\n padding: 0;\n color: var(--ol-subtle-foreground-color);\n font-weight: bold;\n text-decoration: none;\n font-size: inherit;\n text-align: center;\n height: 1.375em;\n width: 1.375em;\n line-height: .4em;\n background-color: var(--ol-background-color);\n border: none;\n border-radius: 2px;\n}\n\n.ol-control button::-moz-focus-inner {\n border: none;\n padding: 0;\n}\n\n.ol-zoom-extent button {\n line-height: 1.4em;\n}\n\n.ol-compass {\n display: block;\n font-weight: normal;\n will-change: transform;\n}\n\n.ol-touch .ol-control button {\n font-size: 1.5em;\n}\n\n.ol-touch .ol-zoom-extent {\n top: 5.5em;\n}\n\n.ol-control button:hover,\n.ol-control button:focus {\n text-decoration: none;\n outline: 1px solid var(--ol-subtle-foreground-color);\n color: var(--ol-foreground-color);\n}\n\n.ol-zoom .ol-zoom-in {\n border-radius: 2px 2px 0 0;\n}\n\n.ol-zoom .ol-zoom-out {\n border-radius: 0 0 2px 2px;\n}\n\n.ol-attribution {\n text-align: right;\n bottom: .5em;\n right: .5em;\n max-width: calc(100% - 1.3em);\n display: flex;\n flex-flow: row-reverse;\n align-items: center;\n}\n\n.ol-attribution a {\n color: var(--ol-subtle-foreground-color);\n text-decoration: none;\n}\n\n.ol-attribution ul {\n margin: 0;\n padding: 1px .5em;\n color: var(--ol-foreground-color);\n text-shadow: 0 0 2px var(--ol-background-color);\n font-size: 12px;\n}\n\n.ol-attribution li {\n display: inline;\n list-style: none;\n}\n\n.ol-attribution li:not(:last-child):after {\n content: " ";\n}\n\n.ol-attribution img {\n max-height: 2em;\n max-width: inherit;\n vertical-align: middle;\n}\n\n.ol-attribution button {\n flex-shrink: 0;\n}\n\n.ol-attribution.ol-collapsed ul {\n display: none;\n}\n\n.ol-attribution:not(.ol-collapsed) {\n background: var(--ol-partial-background-color);\n}\n\n.ol-attribution.ol-uncollapsible {\n bottom: 0;\n right: 0;\n border-radius: 4px 0 0;\n}\n\n.ol-attribution.ol-uncollapsible img {\n margin-top: -.2em;\n max-height: 1.6em;\n}\n\n.ol-attribution.ol-uncollapsible button {\n display: none;\n}\n\n.ol-zoomslider {\n top: 4.5em;\n left: .5em;\n height: 200px;\n}\n\n.ol-zoomslider button {\n position: relative;\n height: 10px;\n}\n\n.ol-touch .ol-zoomslider {\n top: 5.5em;\n}\n\n.ol-overviewmap {\n left: 0.5em;\n bottom: 0.5em;\n}\n\n.ol-overviewmap.ol-uncollapsible {\n bottom: 0;\n left: 0;\n border-radius: 0 4px 0 0;\n}\n\n.ol-overviewmap .ol-overviewmap-map,\n.ol-overviewmap button {\n display: block;\n}\n\n.ol-overviewmap .ol-overviewmap-map {\n border: 1px solid var(--ol-subtle-foreground-color);\n height: 150px;\n width: 150px;\n}\n\n.ol-overviewmap:not(.ol-collapsed) button {\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n.ol-overviewmap.ol-collapsed .ol-overviewmap-map,\n.ol-overviewmap.ol-uncollapsible button {\n display: none;\n}\n\n.ol-overviewmap:not(.ol-collapsed) {\n background: var(--ol-subtle-background-color);\n}\n\n.ol-overviewmap-box {\n border: 1.5px dotted var(--ol-subtle-foreground-color);\n}\n\n.ol-overviewmap .ol-overviewmap-box:hover {\n cursor: move;\n}\n\n.ol-overviewmap .ol-viewport:hover {\n cursor: pointer;\n}\n',""]);const a=l},5045:(e,n,o)=>{var t=o(5072),r=o.n(t),i=o(7825),l=o.n(i),a=o(7659),s=o.n(a),u=o(5056),c=o.n(u),d=o(540),p=o.n(d),b=o(1113),g=o.n(b),m=o(4096),f={};f.styleTagTransform=g(),f.setAttributes=c(),f.insert=s().bind(null,"head"),f.domAPI=l(),f.insertStyleElement=p(),r()(m.A,f),m.A&&m.A.locals&&m.A.locals},8217:(e,n,o)=>{o.d(n,{Ay:()=>m,Bs:()=>h,hX:()=>f,te:()=>x});var t=o(6717),r=o(4778),i=o(4294),l=o(1217),a=o(1064),s=o(503),u=o(6702),c=o(2871),d=o(4338),p=o(4087),b=o(3407),g=o(3402);const m=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=t.A,this.supportedMediaTypes=null}getReadOptions(e,n){if(n){let o=n.dataProjection?(0,b.Jt)(n.dataProjection):this.readProjection(e);n.extent&&o&&"tile-pixels"===o.getUnits()&&(o=(0,b.Jt)(o),o.setWorldExtent(n.extent)),n={dataProjection:o,featureProjection:n.featureProjection}}return this.adaptOptions(n)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return(0,p.b0)()}readFeature(e,n){return(0,p.b0)()}readFeatures(e,n){return(0,p.b0)()}readGeometry(e,n){return(0,p.b0)()}readProjection(e){return(0,p.b0)()}writeFeature(e,n){return(0,p.b0)()}writeFeatures(e,n){return(0,p.b0)()}writeGeometry(e,n){return(0,p.b0)()}};function f(e,n,o){const t=o?(0,b.Jt)(o.featureProjection):null,r=o?(0,b.Jt)(o.dataProjection):null;let i=e;if(t&&r&&!(0,b.tI)(t,r)){n&&(i=e.clone());const o=n?t:r,l=n?r:t;"tile-pixels"===o.getUnits()?i.transform(o,l):i.applyTransform((0,b.RG)(o,l))}if(n&&o&&void 0!==o.decimals){const n=Math.pow(10,o.decimals),t=function(e){for(let o=0,t=e.length;oh({...e,geometry:n}))).flat();const t="MultiPolygon"===o.type?"Polygon":o.type;if("GeometryCollection"===t||"Circle"===t)throw new Error("Unsupported geometry type: "+t);const i=o.layout.length;return f(new r.Ay(t,"Polygon"===t?function(e,n,o){return Array.isArray(n[0])?((0,g.mb)(e,0,n,o)||(e=e.slice(),(0,g.NK)(e,0,n,o)),e):((0,g.PA)(e,0,n,o)||(e=e.slice(),(0,g.ug)(e,0,n,o)),e)}(o.flatCoordinates,o.ends,i):o.flatCoordinates,o.ends?.flat(),i,e.properties||{},e.id).enableSimplifyTransformed(),!1,n)}function x(e,n){if(!e)return null;if(Array.isArray(e)){const o=e.map((e=>x(e,n)));return new d.A(o)}return f(new(0,y[e.type])(e.flatCoordinates,e.layout,e.ends),!1,n)}},1365:(e,n,o)=>{o.d(n,{A:()=>f});var t=o(6717),r=o(8217),i=o(4087);class l extends r.Ay{constructor(){super()}getType(){return"json"}readFeature(e,n){return this.readFeatureFromObject(a(e),this.getReadOptions(e,n))}readFeatures(e,n){return this.readFeaturesFromObject(a(e),this.getReadOptions(e,n))}readFeatureFromObject(e,n){return(0,i.b0)()}readFeaturesFromObject(e,n){return(0,i.b0)()}readGeometry(e,n){return this.readGeometryFromObject(a(e),this.getReadOptions(e,n))}readGeometryFromObject(e,n){return(0,i.b0)()}readProjection(e){return this.readProjectionFromObject(a(e))}readProjectionFromObject(e){return(0,i.b0)()}writeFeature(e,n){return JSON.stringify(this.writeFeatureObject(e,n))}writeFeatureObject(e,n){return(0,i.b0)()}writeFeatures(e,n){return JSON.stringify(this.writeFeaturesObject(e,n))}writeFeaturesObject(e,n){return(0,i.b0)()}writeGeometry(e,n){return JSON.stringify(this.writeGeometryObject(e,n))}writeGeometryObject(e,n){return(0,i.b0)()}}function a(e){if("string"==typeof e){return JSON.parse(e)||null}return null!==e?e:null}const s=l;var u=o(4778),c=o(2497),d=o(2096),p=o(3407),b=o(3530);function g(e,n){if(!e)return null;let o;switch(e.type){case"Point":o=function(e){const n=e.coordinates;return{type:"Point",flatCoordinates:n,layout:(0,d.p0)(n.length)}}(e);break;case"LineString":o=function(e){const n=e.coordinates,o=n.flat();return{type:"LineString",flatCoordinates:o,ends:[o.length],layout:(0,d.p0)(n[0]?.length||2)}}(e);break;case"Polygon":o=function(e){const n=e.coordinates,o=[],t=n[0]?.[0]?.length;return{type:"Polygon",flatCoordinates:o,ends:(0,c.KG)(o,0,n,t),layout:(0,d.p0)(t)}}(e);break;case"MultiPoint":o=function(e){const n=e.coordinates;return{type:"MultiPoint",flatCoordinates:n.flat(),layout:(0,d.p0)(n[0]?.length||2)}}(e);break;case"MultiLineString":o=function(e){const n=e.coordinates,o=n[0]?.[0]?.length||2,t=[];return{type:"MultiLineString",flatCoordinates:t,ends:(0,c.KG)(t,0,n,o),layout:(0,d.p0)(o)}}(e);break;case"MultiPolygon":o=function(e){const n=e.coordinates,o=[],t=n[0]?.[0]?.[0].length||2;return{type:"MultiPolygon",flatCoordinates:o,ends:(0,c.d6)(o,0,n,t),layout:(0,d.p0)(t)}}(e);break;case"GeometryCollection":o=function(e){const n=e.geometries.map((function(e){return g(e)}));return n}(e);break;default:throw new Error("Unsupported GeoJSON type: "+e.type)}return o}function m(e,n){const o=(e=(0,r.hX)(e,!0,n)).getType();let t;switch(o){case"Point":t=function(e){return{type:"Point",coordinates:e.getCoordinates()}}(e);break;case"LineString":t=function(e){return{type:"LineString",coordinates:e.getCoordinates()}}(e);break;case"Polygon":t=function(e,n){let o;return n&&(o=n.rightHanded),{type:"Polygon",coordinates:e.getCoordinates(o)}}(e,n);break;case"MultiPoint":t=function(e){return{type:"MultiPoint",coordinates:e.getCoordinates()}}(e);break;case"MultiLineString":t=function(e){return{type:"MultiLineString",coordinates:e.getCoordinates()}}(e);break;case"MultiPolygon":t=function(e,n){let o;return n&&(o=n.rightHanded),{type:"MultiPolygon",coordinates:e.getCoordinates(o)}}(e,n);break;case"GeometryCollection":t=function(e,n){delete(n=Object.assign({},n)).featureProjection;return{type:"GeometryCollection",geometries:e.getGeometriesArray().map((function(e){return m(e,n)}))}}(e,n);break;case"Circle":t={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+o)}return t}const f=class extends s{constructor(e){e=e||{},super(),this.dataProjection=(0,p.Jt)(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=(0,p.Jt)(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,n){let o=null;o="Feature"===e.type?e:{type:"Feature",geometry:e,properties:null};const i=g(o.geometry);if(this.featureClass===u.Ay)return(0,r.Bs)({geometry:i,id:o.id,properties:o.properties},n);const l=new t.A;return this.geometryName_?l.setGeometryName(this.geometryName_):this.extractGeometryName_&&o.geometry_name&&l.setGeometryName(o.geometry_name),l.setGeometry((0,r.te)(i,n)),"id"in o&&l.setId(o.id),o.properties&&l.setProperties(o.properties,!0),l}readFeaturesFromObject(e,n){let o=null;if("FeatureCollection"===e.type){o=[];const t=e.features;for(let e=0,r=t.length;e rlayers - 3.0.1 | Documentation + 3.1.0 | Documentation @@ -17,7 +17,7 @@
\ No newline at end of file