1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__avion-poeme/dist/glify-browser.js

228 lines
287 KiB
JavaScript
Raw Normal View History

parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"eMRn":[function(require,module,exports) {
"use strict";function r(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function e(r,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}function t(r,t,a){return t&&e(r.prototype,t),a&&e(r,a),r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MapMatrix=void 0;var a=function(){function e(){r(this,e),this.array=new Float32Array(16)}return t(e,[{key:"setSize",value:function(r,e,t){return this.array.set([2/r,0,0,0,0,-2/e,0,0,0,0,0,0,-1,1,0,1]),this}},{key:"translateMatrix",value:function(r,e){var t=this.array;return t[12]+=t[0]*r+t[4]*e,t[13]+=t[1]*r+t[5]*e,t[14]+=t[2]*r+t[6]*e,t[15]+=t[3]*r+t[7]*e,this}},{key:"scaleMatrix",value:function(r){var e=this.array;return e[0]*=r,e[1]*=r,e[2]*=r,e[3]*=r,e[4]*=r,e[5]*=r,e[6]*=r,e[7]*=r,this}}]),e}();exports.MapMatrix=a;
},{}],"f3z0":[function(require,module,exports) {
var define;
var global = arguments[3];
var t,i=arguments[3];!function(i,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof t&&t.amd?t(["exports"],e):e(i.L={})}(this,function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e<n;e++)for(i in o=arguments[e])t[i]=o[i];return t}var e=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function n(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var o=0;function s(t){return t._leaflet_id=t._leaflet_id||++o,t._leaflet_id}function r(t,i,e){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(e,o),o=!1)},s=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function a(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function h(){return!1}function u(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return l(t).split(/\s+/)}function _(t,i){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?e(t.options):{}),i)t.options[n]=i[n];return t.options}function d(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var p=/\{ *([\w_-]+) *\}/g;function m(t,i){return t.replace(p,function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n})}var f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function w(t){var i=+new Date,e=Math.max(0,16-(i-x));return x=i+e,window.setTimeout(t,e)}var P=window.requestAnimationFrame||y("RequestAnimationFrame")||w,b=window.cancelAnimationFrame||y("CancelAnimationFrame")||y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function T(t,i,e){if(!e||P!==w)return P.call(window,n(t,i));t.call(i)}function M(t){t&&b.call(window,t)}var z={extend:i,create:e,bind:n,lastId:o,stamp:s,throttle:r,wrapNum:a,falseFn:h,formatNum:u,trim:l,splitWords:c,setOptions:_,getParamString:d,template:m,isArray:f,indexOf:g,emptyImageUrl:v,requestFn:P,cancelFn:b,requestAnimFrame:T,cancelAnimFrame:M};function C(){}C.extend=function(t){var n=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=n.__super__=this.prototype,s=e(o);for(var r in s.constructor=n,n.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&(i(n,t.statics),delete t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=f(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),i.apply(null,[s].concat(t.includes)),delete t.includes),s.options&&(t.options=i(e(s.options),t.options)),i(s,t),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=s._initHooks.length;t<i;t++)s._initHooks[t].call(this)}},n},C.include=function(t){return i(this.prototype,t),this},C.mergeOptions=function(t){return i(this.prototype.options,t),this},C.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var S={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=c(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){
},{}],"OTlA":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CanvasOverlay=void 0;var t=require("leaflet");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return function(){var e,n=h(t);if(l()){var o=h(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return u(this,e)}}function u(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?c(t):n}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(e){a(i,t.Layer);var o=s(i);function i(t,e){var r;return n(this,i),(r=o.call(this))._userDrawFunc=t,r._frame=null,r._redrawCallbacks=[],r._pane=e,r}return r(i,[{key:"drawing",value:function(t){return this._userDrawFunc=t,this}},{key:"params",value:function(e){return t.Util.setOptions(this,e),this}},{key:"redraw",value:function(e){return"function"==typeof e&&this._redrawCallbacks.push(e),null===this._frame&&(this._frame=t.Util.requestAnimFrame(this._redraw,this)),this}},{key:"onAdd",value:function(e){this._map=e,this.canvas=this.canvas||document.createElement("canvas");var n=e.getSize(),o=e.options.zoomAnimation&&t.Browser.any3d;return this.canvas.width=n.x,this.canvas.height=n.y,this.canvas.className="leaflet-zoom-"+(o?"animated":"hide"),e._panes[this._pane].appendChild(this.canvas),e.on("moveend",this._reset,this),e.on("resize",this._resize,this),o&&e.on("zoomanim",t.Layer?this._animateZoom:this._animateZoomNoLayer,this),this._reset(),this}},{key:"onRemove",value:function(e){return e.getPanes()[this._pane].removeChild(this.canvas),e.off("moveend",this._reset,this),e.off("resize",this._resize,this),e.options.zoomAnimation&&t.Browser.any3d&&e.off("zoomanim",t.Layer?this._animateZoom:this._animateZoomNoLayer,this),this}},{key:"addTo",value:function(t){return t.addLayer(this),this}},{key:"_resize",value:function(t){this.canvas.width=t.newSize.x,this.canvas.height=t.newSize.y}},{key:"_reset",value:function(){var e=this._map.containerPointToLayerPoint([0,0]);t.DomUtil.setPosition(this.canvas,e),this._redraw()}},{key:"_redraw",value:function(){var e=this._map,n=this.canvas,o=e.getSize(),r=e.getBounds(),a=180*o.x/(20037508.34*(r.getEast()-r.getWest())),i=e.getZoom(),s=new t.LatLng(r.getNorth(),r.getWest()),u=this._unclampedProject(s,0);for(this._userDrawFunc&&this._userDrawFunc({bounds:r,canvas:n,offset:u,scale:Math.pow(2,i),size:o,zoomScale:a,zoom:i});this._redrawCallbacks.length>0;)this._redrawCallbacks.shift()(this);this._frame=null}},{key:"_animateZoom",value:function(e){var n=this._map,o=n.getZoomScale(e.zoom,n.getZoom()),r=this._unclampedLatLngBoundsToNewLayerBounds(n.getBounds(),e.zoom,e.center).min;t.DomUtil.setTransform(this.canvas,r,o)}},{key:"_animateZoomNoLayer",value:function(e){var n=this._map,o=n.getZoomScale(e.zoom,n.getZoom()),r=n._getCenterOffset(e.center)._multiplyBy(-o).subtract(n._getMapPanePos());t.DomU
},{"leaflet":"f3z0"}],"pR9a":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Base=void 0;var e=require("./map-matrix"),t=require("./canvas-overlay");function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function i(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}var s=function(){function a(i){var s=this;r(this,a),this.buffers={},this.attributeLocations={},this.uniformLocations={},i.pane||(i.pane="overlayPane"),this.mapMatrix=new e.MapMatrix,this.active=!0,this.vertexShader=null,this.fragmentShader=null,this.program=null,this.matrix=null,this.vertices=null,this.vertexLines=null;var n=Boolean(i.preserveDrawingBuffer),o=this.layer=new t.CanvasOverlay(function(e){return s.drawOnCanvas(e)},i.pane).addTo(i.map),h=this.canvas=o.canvas;h.width=h.clientWidth,h.height=h.clientHeight,h.style.position="absolute",i.className&&(h.className+=" "+i.className),this.gl=h.getContext("webgl2",{preserveDrawingBuffer:n})||h.getContext("webgl",{preserveDrawingBuffer:n})||h.getContext("experimental-webgl",{preserveDrawingBuffer:n})}return i(a,[{key:"attachShaderVariables",value:function(e){if(0===this.getShaderVariableCount())return this;var t=this.gl,r=this.settings.shaderVariables,a=0;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i],n=this.getAttributeLocation(i);if(n<0)throw new Error("shader variable "+i+" not found");t.vertexAttribPointer(n,s.size,t[s.type],!!s.normalize,this.bytes*e,a*e),a+=s.size,t.enableVertexAttribArray(n)}return this}},{key:"getShaderVariableCount",value:function(){return Object.keys(this.settings.shaderVariables).length}},{key:"setData",value:function(e){return this.settings.data=e,this}},{key:"setup",value:function(){var e=this.settings;return e.click&&e.setupClick(e.map),e.hover&&e.setupHover(e.map,e.hoverWait),this.setupVertexShader().setupFragmentShader().setupProgram()}},{key:"setupVertexShader",value:function(){var e=this.gl,t=this.settings,r="function"==typeof t.vertexShaderSource?t.vertexShaderSource():t.vertexShaderSource,a=e.createShader(e.VERTEX_SHADER);return e.shaderSource(a,r),e.compileShader(a),this.vertexShader=a,this}},{key:"setupFragmentShader",value:function(){var e=this.gl,t=this.settings,r="function"==typeof t.fragmentShaderSource?t.fragmentShaderSource():t.fragmentShaderSource,a=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(a,r),e.compileShader(a),this.fragmentShader=a,this}},{key:"setupProgram",value:function(){var e=this.gl,t=e.createProgram();return e.attachShader(t,this.vertexShader),e.attachShader(t,this.fragmentShader),e.linkProgram(t),e.useProgram(t),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.enable(e.BLEND),this.program=t,this}},{key:"addTo",value:function(e){return this.layer.addTo(e||this.settings.map),this.active=!0,this.render()}},{key:"remove",value:function(e){if(void 0===e)this.settings.map.removeLayer(this.layer),this.active=!1;else{var t=this.settings.data.features||this.settings.data;"number"==typeof(e=e instanceof Array?e:[e])&&(e=[e]),e.sort().reverse(),e.forEach(function(e){t.splice(e,1)}),this.render()}return this}},{key:"update",value:function(e,t){return(this.settings.data.features||this.settings.data)[t]=e,this.render(),this}},{key:"getBuffer",value:function(e){return this.buffers[e]||(this.buffers[e]=this.gl.createBuffer()),this.buffers[e]}},{key:"getAttributeLocation",value:function(e){return void 0!==this.attributeLocations[e]?this.attributeLocations[e]:this.attributeLocations[e]=this.gl.getAttribLocation(this.program,e)}},{key:"getUniformLocation",value:function(e){return void 0!==this.uniformLocations[e]?this.uniformLocations[e]:this.uniformLocations[e]=this.gl.getUniformLocation(this.program,e)}}]),a}();exports.Base=s;
},{"./map-matrix":"eMRn","./canvas-overlay":"OTlA"}],"lpyx":[function(require,module,exports) {
"use strict";function r(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function e(r,e){for(var n=0;n<e.length;n++){var t=e[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function n(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Color=void 0;var t={r:0,g:1,b:0,a:1},a={r:1,g:0,b:0,a:1},o={r:0,g:0,b:1,a:1},u={r:0,g:1,b:1,a:1},l={r:1,g:1,b:0,a:1},c={r:1,g:1,b:1,a:1},s={r:0,g:0,b:0,a:1},i={r:.5,g:.5,b:.5,a:1},b=function(){function e(){r(this,e)}return n(e,null,[{key:"fromHex",value:function(r){return r.length<6?null:("#"===(r=r.toLowerCase())[0]&&(r=r.substring(1,r.length)),{r:parseInt(r[0]+r[1],16)/255,g:parseInt(r[2]+r[3],16)/255,b:parseInt(r[4]+r[5],16)/255,a:1})}},{key:"random",value:function(){return{r:Math.random(),g:Math.random(),b:Math.random(),a:Math.random()}}},{key:"pallet",value:function(){switch(Math.round(4*Math.random())){case 0:return t;case 1:return a;case 2:return o;case 3:return u;case 4:return l}}},{key:"grey",get:function(){return i}}]),e}();exports.Color=b;
},{}],"GtdH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LineFeatureVertices=void 0;var e=require("leaflet");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}var i=function(){function r(e){t(this,r),this.settings=e,this.vertexCount=0,this.array=[],this.length=0}return n(r,[{key:"fillFromCoordinates",value:function(t){for(var r=this.settings,n=r.color,i=r.opacity,a=r.project,o=r.latitudeKey,s=r.longitudeKey,u=0;u<t.length;u++)if(Array.isArray(t[u][0]))this.fillFromCoordinates(t[u]);else{var l=a(new e.LatLng(t[u][o],t[u][s]),0);this.push(l.x,l.y,n.r,n.g,n.b,n.a||i),0!==u&&u!==t.length-1&&(this.vertexCount+=1),this.vertexCount+=1}}},{key:"push",value:function(){var e;(e=this.array).push.apply(e,arguments),this.length=this.array.length}}]),r}();exports.LineFeatureVertices=i;
},{"leaflet":"f3z0"}],"UnXq":[function(require,module,exports) {
"use strict";function t(t,n){var o={};for(var e in n)n.hasOwnProperty(e)&&(o[e]=t.hasOwnProperty(e)?t[e]:n[e]);return o}function n(t,n){var o=Math.PI/180,e=4*Math.PI,r=Math.sin(t*o);return{x:(n+180)/360*256,y:256*(.5-Math.log((1+r)/(1-r))/e)}}function o(t,n,o){return(t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y)<=o*o}function e(t,n,o,e,r,a){var i,u,s=r-o,l=a-e,p=s*s+l*l,c=-1;0!==p&&(c=((t-o)*s+(n-e)*l)/p),c<0?(i=o,u=e):c>1?(i=r,u=a):(i=o+c*s,u=e+c*l);var x=t-i,h=n-u;return Math.sqrt(x*x+h*h)}function r(t,n){return Math.sqrt(t*t+n*n)}function a(t,n,o){var e=o.latLngToLayerPoint(t),a=o.latLngToLayerPoint(n);return r(e.x-a.x,e.y-a.y)}function i(t){var n=document.createElement("div"),o=n.style,e=t.x,r=t.y;o.left=e+"px",o.top=r+"px",o.width="10px",o.height="10px",o.position="absolute",o.backgroundColor="#"+(16777215*Math.random()<<0).toString(16),document.body.appendChild(n)}function u(t,n,o){var e;return function(){var r=this,a=arguments,i=o&&!e;clearTimeout(e),e=setTimeout(function(){e=null,o||t.apply(r,a)},n),i&&t.apply(r,a)}}function s(t,n){return n._northEast.lat>t.lat&&t.lat>n._southWest.lat&&n._northEast.lng>t.lng&&t.lng>n._southWest.lng}Object.defineProperty(exports,"__esModule",{value:!0}),exports.defaults=t,exports.latLonToPixel=n,exports.pointInCircle=o,exports.pDistance=e,exports.vectorDistance=r,exports.locationDistance=a,exports.debugPoint=i,exports.debounce=u,exports.inBounds=s;
},{}],"ogHp":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Lines=void 0;var t=require("./base"),e=require("./color"),r=require("leaflet"),i=require("./line-feature-vertices"),n=require("./utils");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),t}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){return function(){var e,r=v(t);if(p()){var i=v(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return h(this,e)}}function h(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?y(t):e}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g={map:null,data:[],longitudeKey:null,latitudeKey:null,setupClick:null,setupHover:null,vertexShaderSource:null,fragmentShaderSource:null,click:null,hover:null,color:e.Color.random,className:"",opacity:.5,weight:2,sensitivity:.1,sensitivityHover:.03,shaderVariables:{color:{type:"FLOAT",start:2,size:4}}},d=function(e){l(s,t.Base);var o=f(s);function s(t){var e;if(a(this,s),(e=o.call(this,t)).bytes=6,s.instances.push(y(e)),e.settings=Object.assign(Object.assign({},s.defaults),t),!t.data)throw new Error('no "data" array setting defined');if(!t.map)throw new Error('no leaflet "map" object setting defined');return e.active=!0,e.allVertices=[],e.setup().render(),e}return c(s,[{key:"render",value:function(){this.resetVertices();var t=this.canvas,e=this.gl,r=this.layer,i=this.vertices,n=this.settings,o=this.mapMatrix,a=this.getBuffer("vertex"),s=this.getAttributeLocation("vertex"),c=this.getUniformLocation("opacity");e.uniform1f(c,n.opacity),e.bindBuffer(e.ARRAY_BUFFER,a);for(var l=i.length,u=[],f=0;f<l;f++)for(var h=i[f].array,y=h.length/this.bytes,p=0;p<y;p++){var v=p*this.bytes;0!==p&&p!==y-1&&u.push(h[v],h[v+1],h[v+2],h[v+3],h[v+4],h[v+5]),u.push(h[v],h[v+1],h[v+2],h[v+3],h[v+4],h[v+5])}this.allVertices=u;var g=new Float32Array(u);return l=g.BYTES_PER_ELEMENT,e.bufferData(e.ARRAY_BUFFER,g,e.STATIC_DRAW),e.vertexAttribPointer(s,2,e.FLOAT,!1,l*this.bytes,0),e.enableVertexAttribArray(s),this.matrix=this.getUniformLocation("matrix"),this.aPointSize=this.getAttributeLocation("pointSize"),o.setSize(t.width,t.height),e.viewport(0,0,t.width,t.height),e.uniformMatrix4fv(this.matrix,!1,o.array),this.attachShaderVariables(l),r.redraw(),this}},{key:"resetVertices",value:function(){this.allVertices=[],this.vertices=[];var t,e,r,n=this.vertices,o=this.settings,a=o.data.features,s=o.map,c=o.latitudeKey,l=o.longitudeKey,u=a.length,f=o.color,h=o.opacity,y=0;if(!f)throw new Error("color is not properly defined");for("function"==typeof f&&(e=f);y<u;y++){t=a[y],r=e?e(y,t):f;var p=new i.LineFeatureVertices({project:s.project.bind(s),latitudeKey:c,longitudeKey:l,color:r,opacity:h});p.fillFromCoordinates(t.geometry.coordinates),n.push(p)}return this}},{key:"drawOnCanvas",value:function(t){if(!this.gl)return this;var e=this.gl,r=this.settings,i=this.canvas,n=this.map
},{"./base":"pR9a","./color":"lpyx","leaflet":"f3z0","./line-feature-vertices":"GtdH","./utils":"UnXq"}],"IieH":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Points=void 0;var t=require("./base"),e=require("./color"),r=require("leaflet"),n=require("./utils");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),t}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){return function(){var e,r=y(t);if(p()){var n=y(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return f(this,e)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?h(t):e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g={map:null,data:[],longitudeKey:null,latitudeKey:null,setupClick:null,setupHover:null,vertexShaderSource:null,fragmentShaderSource:null,eachVertex:null,click:null,hover:null,color:e.Color.random,opacity:.8,size:null,className:"",sensitivity:2,sensitivityHover:.03,shaderVariables:{vertex:{type:"FLOAT",start:0,size:2},color:{type:"FLOAT",start:2,size:4},pointSize:{type:"FLOAT",start:6,size:1}}},d=function(e){l(a,t.Base);var o=c(a);function a(t){var e;if(i(this,a),(e=o.call(this,t)).bytes=7,a.instances.push(h(e)),e.settings=Object.assign(Object.assign({},a.defaults),t),!t.data)throw new Error('no "data" array setting defined');if(!t.map)throw new Error('no leaflet "map" object setting defined');e.active=!0;var n=e.settings.data;if(Array.isArray(n))e.dataFormat="Array";else{if("FeatureCollection"!==n.type)throw new Error("unhandled data type. Supported types are Array and GeoJson.FeatureCollection");e.dataFormat="GeoJson.FeatureCollection"}return e.settings.map.options.crs.projection.project!==r.Projection.SphericalMercator.project&&console.warn("layer designed for SphericalMercator, alternate detected"),e.setup().render(),e}return s(a,[{key:"render",value:function(){this.resetVertices();var t=this.gl,e=this.canvas,r=this.layer,n=this.vertices,o=this.mapMatrix,i=this.matrix=this.getUniformLocation("matrix"),a=this.getBuffer("vertices"),s=this.typedVertices=new Float32Array(n),l=s.BYTES_PER_ELEMENT;return o.setSize(e.width,e.height),t.viewport(0,0,e.width,e.height),t.uniformMatrix4fv(i,!1,o.array),t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,s,t.STATIC_DRAW),this.attachShaderVariables(l),r.redraw(),this}},{key:"getPointLookup",value:function(t){return this.latLngLookup[t]||(this.latLngLookup[t]=[])}},{key:"addLookup",value:function(t){return this.getPointLookup(t.key).push(t),this.allLatLngLookup.push(t),this}},{key:"resetVertices",value:function(){this.latLngLookup={},this.allLatLngLookup=[],this.vertices=[];var t,e,n,o,i,a,s,l=this.vertices,u=this.settings,c=u.latitudeKey,f=u.longitudeKey,h=u.data,p=u.map,y=u.eachVertex,g=u.color,d=u.size,v=u.opacity;if(!g)throw new Error("color is not properly defined");if("function"==typeof g&&(t=g),!d)throw new Error("size is not properly defined");if("function"==typeof d&&(o=d),"Array"===this.dataFormat)for(var L=h.length,m=
},{"./base":"pR9a","./color":"lpyx","leaflet":"f3z0","./utils":"UnXq"}],"vwhv":[function(require,module,exports) {
"use strict";function e(e,t,x){x=x||2;var i,u,v,y,o,p,l,a=t&&t.length,h=a?t[0]*x:e.length,s=n(e,0,h,x,!0),c=[];if(!s||s.next===s.prev)return c;if(a&&(s=f(e,t,s,x)),e.length>80*x){i=v=e[0],u=y=e[1];for(var Z=x;Z<h;Z+=x)(o=e[Z])<i&&(i=o),(p=e[Z+1])<u&&(u=p),o>v&&(v=o),p>y&&(y=p);l=0!==(l=Math.max(v-i,y-u))?1/l:0}return r(s,c,x,i,u,l),c}function n(e,n,t,r,x){var i,u;if(x===A(e,n,t,r)>0)for(i=n;i<t;i+=r)u=k(i,e[i],e[i+1],u);else for(i=t-r;i>=n;i-=r)u=k(i,e[i],e[i+1],u);return u&&g(u,u.next)&&(j(u),u=u.next),u}function t(e,n){if(!e)return e;n||(n=e);var t,r=e;do{if(t=!1,r.steiner||!g(r,r.next)&&0!==d(r.prev,r,r.next))r=r.next;else{if(j(r),(r=n=r.prev)===r.next)break;t=!0}}while(t||r!==n);return n}function r(e,n,f,y,o,p,a){if(e){!a&&p&&l(e,y,o,p);for(var h,s,c=e;e.prev!==e.next;)if(h=e.prev,s=e.next,p?i(e,y,o,p):x(e))n.push(h.i/f),n.push(e.i/f),n.push(s.i/f),j(e),e=s.next,c=s.next;else if((e=s)===c){a?1===a?r(e=u(e,n,f),n,f,y,o,p,2):2===a&&v(e,n,f,y,o,p):r(t(e),n,f,y,o,p,1);break}}}function x(e){var n=e.prev,t=e,r=e.next;if(d(n,t,r)>=0)return!1;for(var x=e.next.next;x!==e.prev;){if(c(n.x,n.y,t.x,t.y,r.x,r.y,x.x,x.y)&&d(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function i(e,n,t,r){var x=e.prev,i=e,u=e.next;if(d(x,i,u)>=0)return!1;for(var v=x.x<i.x?x.x<u.x?x.x:u.x:i.x<u.x?i.x:u.x,f=x.y<i.y?x.y<u.y?x.y:u.y:i.y<u.y?i.y:u.y,y=x.x>i.x?x.x>u.x?x.x:u.x:i.x>u.x?i.x:u.x,o=x.y>i.y?x.y>u.y?x.y:u.y:i.y>u.y?i.y:u.y,p=h(v,f,n,t,r),l=h(y,o,n,t,r),a=e.prevZ,s=e.nextZ;a&&a.z>=p&&s&&s.z<=l;){if(a!==e.prev&&a!==e.next&&c(x.x,x.y,i.x,i.y,u.x,u.y,a.x,a.y)&&d(a.prev,a,a.next)>=0)return!1;if(a=a.prevZ,s!==e.prev&&s!==e.next&&c(x.x,x.y,i.x,i.y,u.x,u.y,s.x,s.y)&&d(s.prev,s,s.next)>=0)return!1;s=s.nextZ}for(;a&&a.z>=p;){if(a!==e.prev&&a!==e.next&&c(x.x,x.y,i.x,i.y,u.x,u.y,a.x,a.y)&&d(a.prev,a,a.next)>=0)return!1;a=a.prevZ}for(;s&&s.z<=l;){if(s!==e.prev&&s!==e.next&&c(x.x,x.y,i.x,i.y,u.x,u.y,s.x,s.y)&&d(s.prev,s,s.next)>=0)return!1;s=s.nextZ}return!0}function u(e,n,t){var r=e;do{var x=r.prev,i=r.next.next;!g(x,i)&&w(x,r,r.next,i)&&b(x,i)&&b(i,x)&&(n.push(x.i/t),n.push(r.i/t),n.push(i.i/t),j(r),j(r.next),r=e=i),r=r.next}while(r!==e);return r}function v(e,n,x,i,u,v){var f=e;do{for(var y=f.next.next;y!==f.prev;){if(f.i!==y.i&&Z(f,y)){var o=m(f,y);return f=t(f,f.next),o=t(o,o.next),r(f,n,x,i,u,v),void r(o,n,x,i,u,v)}y=y.next}f=f.next}while(f!==e)}function f(e,r,x,i){var u,v,f,p=[];for(u=0,v=r.length;u<v;u++)(f=n(e,r[u]*i,u<v-1?r[u+1]*i:e.length,i,!1))===f.next&&(f.steiner=!0),p.push(s(f));for(p.sort(y),u=0;u<p.length;u++)o(p[u],x),x=t(x,x.next);return x}function y(e,n){return e.x-n.x}function o(e,n){if(n=p(e,n)){var r=m(n,e);t(r,r.next)}}function p(e,n){var t,r=n,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var v=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=x&&v>u){if(u=v,v===x){if(i===r.y)return r;if(i===r.next.y)return r.next}t=r.x<r.next.x?r:r.next}}r=r.next}while(r!==n);if(!t)return null;if(x===u)return t.prev;var f,y=t,o=t.x,p=t.y,l=1/0;for(r=t.next;r!==y;)x>=r.x&&r.x>=o&&x!==r.x&&c(i<p?x:u,i,o,p,i<p?u:x,i,r.x,r.y)&&((f=Math.abs(i-r.y)/(x-r.x))<l||f===l&&r.x>t.x)&&b(r,e)&&(t=r,l=f),r=r.next;return t}function l(e,n,t,r){var x=e;do{null===x.z&&(x.z=h(x.x,x.y,n,t,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,a(x)}function a(e){var n,t,r,x,i,u,v,f,y=1;do{for(t=e,e=null,i=null,u=0;t;){for(u++,r=t,v=0,n=0;n<y&&(v++,r=r.nextZ);n++);for(f=y;v>0||f>0&&r;)0!==v&&(0===f||!r||t.z<=r.z)?(x=t,t=t.nextZ,v--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;t=r}i.nextZ=null,y*=2}while(u>1);return e}function h(e,n,t,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-t)*x)|e<<8))|e<<4))|e<<2))|e<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-r)*x)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function s(e){var n=e,t=e;do{(n.x<t.x||n.x===t.x&&n.y<t.y)&&(t=n),n=n.next}while(n!==e);return t}function c(e,n,t,r,x,i,u,v){return(x-u)*(n-v)-(e-u)*(i-v)>=0&&(e-u)*(r-v)-(t-u)*(n-v)>=0&&(t-u)*(i-v)-(x-u)*(r-v)>=0}function Z(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!z(e,n)&
},{}],"nhDx":[function(require,module,exports) {
"use strict";function e(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce(function(t,r){return t.concat(e(r))},[]),t;case"Feature":return t.geometry?e(t.geometry).map(function(e){var r={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:e};return void 0!==t.id&&(r.id=t.id),r}):[t];case"MultiPoint":return t.coordinates.map(function(e){return{type:"Point",coordinates:e}});case"MultiPolygon":return t.coordinates.map(function(e){return{type:"Polygon",coordinates:e}});case"MultiLineString":return t.coordinates.map(function(e){return{type:"LineString",coordinates:e}});case"GeometryCollection":return t.geometries.map(e).reduce(function(e,t){return e.concat(t)},[]);case"Point":case"Polygon":case"LineString":return[t]}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
},{}],"AuwV":[function(require,module,exports) {
var define;
var global = arguments[3];
var t,o=arguments[3];!function(o,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof t&&t.amd?t(n):o.quickselect=n()}(this,function(){"use strict";function t(t,o,n){var r=t[o];t[o]=t[n],t[n]=r}function o(t,o){return t<o?-1:t>o?1:0}return function(n,r,e,f,u){!function o(n,r,e,f,u){for(;f>e;){if(f-e>600){var a=f-e+1,i=r-e+1,c=Math.log(a),h=.5*Math.exp(2*c/3),s=.5*Math.sqrt(c*h*(a-h)/a)*(i-a/2<0?-1:1),l=Math.max(e,Math.floor(r-i*h/a+s)),M=Math.min(f,Math.floor(r+(a-i)*h/a+s));o(n,r,l,M,u)}var m=n[r],p=e,d=f;for(t(n,e,r),u(n[f],m)>0&&t(n,e,f);p<d;){for(t(n,p,d),p++,d--;u(n[p],m)<0;)p++;for(;u(n[d],m)>0;)d--}0===u(n[e],m)?t(n,e,d):t(n,++d,f),d<=r&&(e=d+1),r<=d&&(f=d-1)}}(n,r,e||0,f||n.length-1,u||o)}});
},{}],"O1rd":[function(require,module,exports) {
"use strict";module.exports=i,module.exports.default=i;var t=require("quickselect");function i(t,n){if(!(this instanceof i))return new i(t,n);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),n&&this._initFormat(n),this.clear()}function n(t,i,n){if(!n)return i.indexOf(t);for(var a=0;a<i.length;a++)if(n(t,i[a]))return a;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,a,h){h||(h=x(null)),h.minX=1/0,h.minY=1/0,h.maxX=-1/0,h.maxY=-1/0;for(var r,o=i;o<n;o++)r=t.children[o],e(h,t.leaf?a(r):r);return h}function e(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function r(t,i){return t.minX-i.minX}function o(t,i){return t.minY-i.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function l(t){return t.maxX-t.minX+(t.maxY-t.minY)}function u(t,i){return(Math.max(i.maxX,t.maxX)-Math.min(i.minX,t.minX))*(Math.max(i.maxY,t.maxY)-Math.min(i.minY,t.minY))}function m(t,i){var n=Math.max(t.minX,i.minX),a=Math.max(t.minY,i.minY),h=Math.min(t.maxX,i.maxX),e=Math.min(t.maxY,i.maxY);return Math.max(0,h-n)*Math.max(0,e-a)}function c(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function f(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function x(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,a,h,e){for(var r,o=[n,a];o.length;)(a=o.pop())-(n=o.pop())<=h||(r=n+Math.ceil((a-n)/h/2)*h,t(i,r,n,a,e),o.push(n,r,r,a))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var i=this.data,n=[],a=this.toBBox;if(!f(t,i))return n;for(var h,e,r,o,s=[];i;){for(h=0,e=i.children.length;h<e;h++)r=i.children[h],f(t,o=i.leaf?a(r):r)&&(i.leaf?n.push(r):c(t,o)?this._all(r,n):s.push(r));i=s.pop()}return n},collides:function(t){var i=this.data,n=this.toBBox;if(!f(t,i))return!1;for(var a,h,e,r,o=[];i;){for(a=0,h=i.children.length;a<h;a++)if(e=i.children[a],f(t,r=i.leaf?n(e):e)){if(i.leaf||c(t,r))return!0;o.push(e)}i=o.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0,n=t.length;i<n;i++)this.insert(t[i]);return this}var a=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===a.height)this._splitRoot(this.data,a);else{if(this.data.height<a.height){var h=this.data;this.data=a,a=h}this._insert(a,this.data.height-a.height-1,!0)}else this.data=a;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=x([]),this},remove:function(t,i){if(!t)return this;for(var a,h,e,r,o=this.data,s=this.toBBox(t),l=[],u=[];o||l.length;){if(o||(o=l.pop(),h=l[l.length-1],a=u.pop(),r=!0),o.leaf&&-1!==(e=n(t,o.children,i)))return o.children.splice(e,1),l.push(o),this._condense(l),this;r||o.leaf||!c(o,s)?h?(a++,o=h.children[a],r=!1):o=null:(l.push(o),u.push(a),a=0,h=o,o=o.children[0])}return this},toBBox:function(t){return t},compareMinX:r,compareMinY:o,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},_build:function(t,i,n,h){var e,r=n-i+1,o=this._maxEntries;if(r<=o)return a(e=x(t.slice(i,n+1)),this.toBBox),e;h||(h=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/Math.pow(o,h-1))),(e=x([])).leaf=!1,e.height=h;var s,l,u,m,c=Math.ceil(r/o),f=c*Math.ceil(Math.sqrt(o));for(d(t,i,n,f,this.compareMinX),s=i;s<=n;s+=f)for(d(t,s,u=Math.min(s+f-1,n),c,this.compareMinY),l=s;l<=u;l+=c)m=Math.min(l+c-1,u),e.children.push(this._build(t,l,m,h-1));return a(e,this.toBBox),e},_chooseSubtree:function(t,i,n,a){for(var h,e,r,o,l,m,c,f;a.push(i),!i.leaf&&a.length-1!==n;){for(c=f=1/0,h=0,e=i.children.length;h<e;h++)l=s(r=i.children[h]),(m=u(t,r)-l)<f?(f=m,c=l<c?l:c,o=r):m===f&&l<c&&(c=l,o=r);i=o||i.children[0]}return i},_insert:function(t,i,n){var a=this.toBBox,h=n?t:a(t),r=[],o=this._chooseSubtree(h,this.data,i,r);for(o.children.push(t),e(
},{"quickselect":"AuwV"}],"UTeA":[function(require,module,exports) {
module.exports=function(r,e){for(var n=r[0],t=r[1],o=!1,l=0,u=e.length-1;l<e.length;u=l++){var a=e[l][0],f=e[l][1],g=e[u][0],h=e[u][1];f>t!=h>t&&n<(g-a)*(t-f)/(h-f)+a&&(o=!o)}return o};
},{}],"cxFR":[function(require,module,exports) {
"use strict";function m(m){for(var n=m[0],a={minX:n[0],minY:n[1],maxX:n[0],maxY:n[1]},i=1;i<m.length;i++){var r=m[i],x=r[0];x<a.minX?a.minX=x:x>a.maxX&&(a.maxX=x);var t=r[1];t<a.minY?a.minY=t:t>a.maxY&&(a.maxY=t)}return a}module.exports={getBoundingBox:m};
},{}],"yh9p":[function(require,module,exports) {
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){for(var n,o=h(r),a=o[0],u=o[1],i=new e(c(r,a,u)),f=0,A=u>0?a-4:a,d=0;d<A;d+=4)n=t[r.charCodeAt(d)]<<18|t[r.charCodeAt(d+1)]<<12|t[r.charCodeAt(d+2)]<<6|t[r.charCodeAt(d+3)],i[f++]=n>>16&255,i[f++]=n>>8&255,i[f++]=255&n;return 2===u&&(n=t[r.charCodeAt(d)]<<2|t[r.charCodeAt(d+1)]>>4,i[f++]=255&n),1===u&&(n=t[r.charCodeAt(d)]<<10|t[r.charCodeAt(d+1)]<<4|t[r.charCodeAt(d+2)]>>2,i[f++]=n>>8&255,i[f++]=255&n),i}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
},{}],"JgNJ":[function(require,module,exports) {
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],"REa7":[function(require,module,exports) {
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
},{}],"peL6":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.
},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"peL6"}],"B1iE":[function(require,module,exports) {
var global = arguments[3];
var Buffer = require("buffer").Buffer;
var define;
var n,t=arguments[3],r=require("buffer").Buffer;(function(){var r,e=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="__lodash_hash_undefined__",f=500,a="__lodash_placeholder__",c=1,l=2,s=4,h=1,p=2,v=1,_=2,g=4,y=8,d=16,b=32,w=64,m=128,x=256,j=512,A=30,k="...",O=800,I=16,R=1,E=2,z=1/0,S=9007199254740991,L=1.7976931348623157e308,W=NaN,C=4294967295,B=C-1,U=C>>>1,T=[["ary",m],["bind",v],["bindKey",_],["curry",y],["curryRight",d],["flip",j],["partial",b],["partialRight",w],["rearg",x]],$="[object Arguments]",D="[object Array]",M="[object AsyncFunction]",F="[object Boolean]",N="[object Date]",P="[object DOMException]",q="[object Error]",Z="[object Function]",K="[object GeneratorFunction]",V="[object Map]",G="[object Number]",H="[object Null]",J="[object Object]",Y="[object Proxy]",Q="[object RegExp]",X="[object Set]",nn="[object String]",tn="[object Symbol]",rn="[object Undefined]",en="[object WeakMap]",un="[object WeakSet]",on="[object ArrayBuffer]",fn="[object DataView]",an="[object Float32Array]",cn="[object Float64Array]",ln="[object Int8Array]",sn="[object Int16Array]",hn="[object Int32Array]",pn="[object Uint8Array]",vn="[object Uint8ClampedArray]",_n="[object Uint16Array]",gn="[object Uint32Array]",yn=/\b__p \+= '';/g,dn=/\b(__p \+=) '' \+/g,bn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wn=/&(?:amp|lt|gt|quot|#39);/g,mn=/[&<>"']/g,xn=RegExp(wn.source),jn=RegExp(mn.source),An=/<%-([\s\S]+?)%>/g,kn=/<%([\s\S]+?)%>/g,On=/<%=([\s\S]+?)%>/g,In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rn=/^\w*$/,En=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zn=/[\\^$.*+?()[\]{}|]/g,Sn=RegExp(zn.source),Ln=/^\s+|\s+$/g,Wn=/^\s+/,Cn=/\s+$/,Bn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Un=/\{\n\/\* \[wrapped with (.+)\] \*/,Tn=/,? & /,$n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dn=/\\(\\)?/g,Mn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fn=/\w*$/,Nn=/^[-+]0x[0-9a-f]+$/i,Pn=/^0b[01]+$/i,qn=/^\[object .+?Constructor\]$/,Zn=/^0o[0-7]+$/i,Kn=/^(?:0|[1-9]\d*)$/,Vn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gn=/($^)/,Hn=/['\n\r\u2028\u2029\\]/g,Jn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Yn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qn="[\\ud800-\\udfff]",Xn="["+Yn+"]",nt="["+Jn+"]",tt="\\d+",rt="[\\u2700-\\u27bf]",et="[a-z\\xdf-\\xf6\\xf8-\\xff]",ut="[^\\ud800-\\udfff"+Yn+tt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",it="\\ud83c[\\udffb-\\udfff]",ot="[^\\ud800-\\udfff]",ft="(?:\\ud83c[\\udde6-\\uddff]){2}",at="[\\ud800-\\udbff][\\udc00-\\udfff]",ct="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lt="(?:"+et+"|"+ut+")",st="(?:"+ct+"|"+ut+")",ht="(?:"+nt+"|"+it+")"+"?",pt="[\\ufe0e\\ufe0f]?"+ht+("(?:\\u200d(?:"+[ot,ft,at].join("|")+")[\\ufe0e\\ufe0f]?"+ht+")*"),vt="(?:"+[rt,ft,at].join("|")+")"+pt,_t="(?:"+[ot+nt+"?",nt,ft,at,Qn].join("|")+")",gt=RegExp("[']","g"),yt=RegExp(nt,"g"),dt=RegExp(it+"(?="+it+")|"+_t+pt,"g"),bt=RegExp([ct+"?"+et+"+(?:['](?:d|ll|m|re|s|t|ve))?(?="+[Xn,ct,"$"].join("|")+")",st+"+(?:['](?:D|LL|M|RE|S|T|VE))?(?="+[Xn,ct+lt,"$"].join("|")+")",ct+"?"+lt+"+(?:['](?:d|ll|m|re|s|t|ve))?",ct+"+(?:['](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tt,vt].join("|"),"g"),wt=RegExp("[\\u200d\\ud800-\\udfff"+Jn+"\\ufe0e\\ufe0f]"),mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jt=-1,At={};At[an]=At[cn]=At[ln]=At[sn]=At[hn]=At[pn]=At[vn]=At[_n]=At[gn]=!0,At[$]=At[D]=At[on]=At[F]=At[fn]=At[N]=At[q
},{"buffer":"peL6"}],"PG4O":[function(require,module,exports) {
"use strict";var e=require("rbush"),o=require("point-in-polygon"),r=require("./lib/polygon_utils"),t=require("lodash");function n(e){void 0!==e&&this.loadFeatureCollection(e)}function i(e,r){var t=r.geometry.coordinates[0];if(o(e,t)){for(var n=1;n<r.geometry.coordinates.length;n++)if(o(e,r.geometry.coordinates[n]))return!1;return!0}return!1}n.prototype.searchForOnePolygon=function(e,o){var r=this.rtree.search({minX:e,minY:o,maxX:e,maxY:o}),n=[e,o],s=r.map(function(e,o){return this.polygons[r[o].polyId]},this);return t.find(s,function(e){return i(n,e)})},n.prototype.searchForMultiplePolygons=function(e,o,r){-1===r&&(r=Number.MAX_SAFE_INTEGER);var t=[e,o],n=this.rtree.search({minX:e,minY:o,maxX:e,maxY:o}),s=n.map(function(e,o){return this.polygons[n[o].polyId]},this),a=0;return{type:"FeatureCollection",features:s=s.filter(function(e){return!(a>=r)&&(!!i(t,e)&&(a++,!0))})}},n.prototype.search=function(e,o,r){return void 0===r?this.searchForOnePolygon(e,o):this.searchForMultiplePolygons(e,o,r)},n.prototype.loadFeatureCollection=function(o){var t=[],n=[],i=0;function s(e){n.push(e);var o=r.getBoundingBox(e.geometry.coordinates[0]);o.polyId=i++,t.push(o)}o.features.forEach(function(e){if(e.geometry&&void 0!==e.geometry.coordinates[0]&&e.geometry.coordinates[0].length>0)switch(e.geometry.type){case"Polygon":s(e);break;case"MultiPolygon":for(var o=e.geometry.coordinates,r=0;r<o.length;r++)s({type:"Feature",properties:e.properties,geometry:{type:"Polygon",coordinates:o[r]}})}}),this.rtree=(new e).load(t),this.polygons=n},module.exports=n;
},{"rbush":"O1rd","point-in-polygon":"UTeA","./lib/polygon_utils":"cxFR","lodash":"B1iE"}],"j8I8":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Shapes=exports.defaults=void 0;var e=s(require("earcut")),t=s(require("geojson-flatten")),r=s(require("polygon-lookup")),n=require("./base"),i=require("./color"),o=require("leaflet"),a=require("./utils");function s(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){return function(){var t,r=g(e);if(b()){var n=g(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return d(this,t)}}function d(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A={map:null,data:[],longitudeKey:null,latitudeKey:null,setupClick:null,setupHover:null,vertexShaderSource:null,fragmentShaderSource:null,click:null,hover:null,color:i.Color.random,className:"",opacity:.5,shaderVariables:{color:{type:"FLOAT",start:2,size:4}},border:!1};exports.defaults=A;var R=function(i){h(l,n.Base);var s=y(l);function l(e){var t;if(u(this,l),(t=s.call(this,e)).bytes=6,l.instances.push(v(t)),t.settings=Object.assign(Object.assign({},l.defaults),e),!e.data)throw new Error('no "data" array setting defined');if(!e.map)throw new Error('no leaflet "map" object setting defined');return t.polygonLookup=null,t.setup().render(),t}return f(l,[{key:"render",value:function(){this.resetVertices();var e=this.canvas,t=this.gl,r=this.layer,n=this.vertices,i=this.mapMatrix,o=this.getBuffer("vertex"),a=new Float32Array(n),s=a.BYTES_PER_ELEMENT,l=this.getAttributeLocation("vertex");return t.bindBuffer(t.ARRAY_BUFFER,o),t.bufferData(t.ARRAY_BUFFER,a,t.STATIC_DRAW),t.vertexAttribPointer(l,2,t.FLOAT,!1,s*this.bytes,0),t.enableVertexAttribArray(l),this.matrix=this.getUniformLocation("matrix"),t.viewport(0,0,e.width,e.height),i.setSize(e.width,e.height),t.uniformMatrix4fv(this.matrix,!1,i.array),this.attachShaderVariables(s),r.redraw(),this}},{key:"resetVertices",value:function(){this.vertices=[],this.vertexLines=[],this.polygonLookup=new r.default;var n,i,s,l,u,c,f,h,p,y,d,v,b=this.vertices,g=this.vertexLines,A=this.polygonLookup,R=this.settings,w=R.data,x=R.color,E=R.opacity,m=0;switch(w.type){case"Feature":A.loadFeatureCollection({type:"FeatureCollection",features:[w]}),s=(0,t.default)(w);break;case"MultiPolygon":A.loadFeatureCollection({type:"FeatureCollection",features:[{type:"Feature",properties:{id:"bar"},geometry:{coordinates:w.coordinates}}]}),s=(0,t.default)(w);break;default:A.loadFeatureCollection(w),s=w.features}if(h=s.length,!x)throw new Error("color is not properly defined");for("function"==typeof x&&(u=x);m<h;m++){l=s[m],p=[],c=u?u(m,l):x,f=(l.geometry||l).coordinates,d=e.default.flatten(f),y=(0,e.default)(d.vertices,d.holes,d.dimensions),v=f[0][0].length;for(var F=0,_=y.length;F<_;F++){if(i=y[F],"number"!=typeof d
},{"earcut":"vwhv","geojson-flatten":"nhDx","polygon-lookup":"PG4O","./base":"pR9a","./color":"lpyx","leaflet":"f3z0","./utils":"UnXq"}],"LmkB":[function(require,module,exports) {
module.exports = `uniform mat4 matrix;
attribute vec4 vertex;
attribute vec4 color;
attribute float pointSize;
varying vec4 _color;
void main() {
//set the size of the point
gl_PointSize = pointSize;
//multiply each vertex by a matrix.
gl_Position = matrix * vertex;
//pass the color to the fragment shader
_color = color;
}
`
},{}],"hNM2":[function(require,module,exports) {
module.exports = `precision mediump float;
uniform vec4 color;
void main() {
float border = 0.05;
float radius = 0.5;
vec2 center = vec2(0.5);
vec4 color0 = vec4(0.0);
vec4 color1 = vec4(color[0], color[1], color[2], color[3]);
vec2 m = gl_PointCoord.xy - center;
float dist = radius - sqrt(m.x * m.x + m.y * m.y);
float t = 0.0;
if (dist > border) {
t = 1.0;
} else if (dist > 0.0) {
t = dist / border;
}
//works for overlapping circles if blending is enabled
gl_FragColor = mix(color0, color1, t);
}
`
},{}],"XGkG":[function(require,module,exports) {
module.exports = `precision mediump float;
varying vec4 _color;
void main() {
float border = 0.1;
float radius = 0.5;
vec2 center = vec2(0.5, 0.5);
vec4 pointColor = vec4(
_color[0],
_color[1],
_color[2],
_color[3]
);
vec2 m = gl_PointCoord.xy - center;
float dist1 = radius - sqrt(m.x * m.x + m.y * m.y);
float t1 = 0.0;
if (dist1 > border) {
t1 = 1.0;
} else if (dist1 > 0.0) {
t1 = dist1 / border;
}
//works for overlapping circles if blending is enabled
//gl_FragColor = mix(color0, color1, t);
//border
float outerBorder = 0.05;
float innerBorder = 0.8;
vec4 borderColor = vec4(0, 0, 0, 0.4);
vec2 uv = gl_PointCoord.xy;
vec4 clearColor = vec4(0, 0, 0, 0);
// Offset uv with the center of the circle.
uv -= center;
float dist2 = sqrt(dot(uv, uv));
float t2 = 1.0 + smoothstep(radius, radius + outerBorder, dist2)
- smoothstep(radius - innerBorder, radius, dist2);
gl_FragColor = mix(mix(borderColor, clearColor, t2), pointColor, t1);
}
`
},{}],"AY9x":[function(require,module,exports) {
module.exports = `precision mediump float;
varying vec4 _color;
void main() {
vec2 center = vec2(0.5);
vec2 uv = gl_PointCoord.xy - center;
float smoothing = 0.005;
vec4 _color1 = vec4(_color[0], _color[1], _color[2], _color[3]);
float radius1 = 0.3;
vec4 _color2 = vec4(_color[0], _color[1], _color[2], _color[3]);
float radius2 = 0.5;
float dist = length(uv);
//SMOOTH
float gamma = 2.2;
color1.rgb = pow(_color1.rgb, vec3(gamma));
color2.rgb = pow(_color2.rgb, vec3(gamma));
vec4 puck = mix(
mix(
_color1,
_color2,
smoothstep(
radius1 - smoothing,
radius1 + smoothing,
dist
)
),
vec4(0,0,0,0),
smoothstep(
radius2 - smoothing,
radius2 + smoothing,
dist
)
);
//Gamma correction (prevents color fringes)
puck.rgb = pow(puck.rgb, vec3(1.0 / gamma));
gl_FragColor = puck;
}
`
},{}],"R6F0":[function(require,module,exports) {
module.exports = `precision mediump float;
varying vec4 _color;
void main() {
vec4 color1 = vec4(_color[0], _color[1], _color[2], _color[3]);
//simple circles
float d = distance (gl_PointCoord, vec2(0.5, 0.5));
if (d < 0.5 ){
gl_FragColor = color1;
} else {
discard;
}
}
`
},{}],"sqgp":[function(require,module,exports) {
module.exports = `precision mediump float;
varying vec4 _color;
void main() {
//squares
gl_FragColor = vec4(_color[0], _color[1], _color[2], _color[3]);
}
`
},{}],"JKQp":[function(require,module,exports) {
module.exports = `precision mediump float;
varying vec4 _color;
void main() {
gl_FragColor = vec4(
_color[0],
_color[1],
_color[2],
_color[3]
);
}
`
},{}],"QCba":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.glify=void 0;var e=require("./lines"),t=require("./points"),r=require("./shapes"),n=require("./utils"),i=c(require("./shader/vertex/default.glsl")),s=c(require("./shader/fragment/dot.glsl")),u=c(require("./shader/fragment/point.glsl")),o=c(require("./shader/fragment/puck.glsl")),a=c(require("./shader/fragment/simple-circle.glsl")),l=c(require("./shader/fragment/square.glsl")),d=c(require("./shader/fragment/polygon.glsl"));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){return v(e)||y(e)||p(e)||h()}function h(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function y(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function v(e){if(Array.isArray(e))return g(e)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function S(e,t,r){return t&&b(e.prototype,t),r&&b(e,r),e}var k={vertex:i.default,fragment:{dot:s.default,point:u.default,puck:o.default,simpleCircle:a.default,square:l.default,polygon:d.default}},w=function(){function i(){m(this,i),this.longitudeKey=1,this.latitudeKey=0,this.maps=[],this.shader=k,this.Points=t.Points,this.Shapes=r.Shapes,this.Lines=e.Lines}return S(i,[{key:"longitudeFirst",value:function(){return this.longitudeKey=0,this.latitudeKey=1,this}},{key:"latitudeFirst",value:function(){return this.latitudeKey=0,this.longitudeKey=1,this}},{key:"points",value:function(e){var t=this;return new this.Points(Object.assign({setupClick:K.setupClick.bind(this),setupHover:this.setupHover.bind(this),latitudeKey:K.latitudeKey,longitudeKey:K.longitudeKey,vertexShaderSource:function(){return t.shader.vertex},fragmentShaderSource:function(){return t.shader.fragment.point}},e))}},{key:"shapes",value:function(e){var t=this;return new this.Shapes(Object.assign({setupClick:this.setupClick.bind(this),setupHover:this.setupHover.bind(this),latitudeKey:this.latitudeKey,longitudeKey:this.longitudeKey,vertexShaderSource:function(){return t.shader.vertex},fragmentShaderSource:function(){return t.shader.fragment.polygon}},e))}},{key:"lines",value:function(e){var t=this;return new this.Lines(Object.assign({setupClick:this.setupClick.bind(this),setupHover:this.setupHover.bind(this),latitudeKey:this.latitudeKey,longitudeKey:this.longitudeKey,vertexShaderSource:function(){return t.shader.vertex},fragmentShaderSource:function(){return t.shader.fragment.polygon}},e))}},{key:"setupClick",value:function(n){this.maps.indexOf(n)<0&&(this.maps.push(n),n.on("click",function(i){var s;return void 0!==(s=t.Points.tryClick(i,n))?s:void 0!==(s=e.Lines.tryClick(i,n))?s:void 0!==(s=r.Shapes.tryClick(i,n))?s:void 0}))}},{key:"setupHover",value:function(i,s,u){this.maps.push(i),i.on("mousemove",(0,n.debounce)(function(n){var s;return void 0!==(s=t.Points.tryHover(n,i))?s:void 0!==(s=e.Lines.tryHover(n,i))?s:void 0!==(s=r.Shapes.tryHover(n,i))?s:void 0},s,u))}},{key:"instances",get:function(){return[].concat(f(t.Points.instances),f(e.Lines.instances),f(r.Shapes.instances))}}]),i}(),K=new w;exports.glify=K;var x=K;exports.default=x,"undefined"!=typeof window&&window.L&&(window.L.glify=K,window.L.Glify=w);
},{"./lines":"ogHp","./points":"IieH","./shapes":"j8I8","./utils":"UnXq","./shader/vertex/default.glsl":"LmkB","./shader/fragment/dot.glsl":"hNM2","./shader/fragment/point.glsl":"XGkG","./shader/fragment/puck.glsl":"AY9x","./shader/fragment/simple-circle.glsl":"R6F0","./shader/fragment/square.glsl":"sqgp","./shader/fragment/polygon.glsl":"JKQp"}]},{},["QCba"], null)
//# sourceMappingURL=/glify-browser.js.map