@ngageoint/mage.web-app
Version:
The Mage web-app is the UI for interacting with the Mage service in a web browser.
1 lines • 3.29 MB
JavaScript
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[829],{31690:function(Q,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(e,l,p,m){void 0===m&&(m=p);var c=Object.getOwnPropertyDescriptor(l,p);(!c||("get"in c?!l.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return l[p]}}),Object.defineProperty(e,m,c)}:function(e,l,p,m){void 0===m&&(m=p),e[m]=l[p]}),a=this&&this.__exportStar||function(e,l){for(var p in e)"default"!==p&&!Object.prototype.hasOwnProperty.call(l,p)&&O(l,e,p)};Object.defineProperty(x,"__esModule",{value:!0}),a(S(62379),x),a(S(88871),x),a(S(82919),x)},62379:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Color=void 0;const O=S(88871),a=S(82919);class e{constructor(){this.red=0,this.green=0,this.blue=0,this.opacity=1}static black(){return e.color(O.ColorConstants.BLACK)}static blue(){return e.color(O.ColorConstants.BLUE)}static brown(){return e.color(O.ColorConstants.BROWN)}static cyan(){return e.color(O.ColorConstants.CYAN)}static darkGray(){return e.color(O.ColorConstants.DKGRAY)}static gray(){return e.color(O.ColorConstants.GRAY)}static green(){return e.color(O.ColorConstants.GREEN)}static lightGray(){return e.color(O.ColorConstants.LTGRAY)}static magenta(){return e.color(O.ColorConstants.MAGENTA)}static orange(){return e.color(O.ColorConstants.ORANGE)}static pink(){return e.color(O.ColorConstants.PINK)}static purple(){return e.color(O.ColorConstants.PURPLE)}static red(){return e.color(O.ColorConstants.RED)}static violet(){return e.color(O.ColorConstants.VIOLET)}static white(){return e.color(O.ColorConstants.WHITE)}static yellow(){return e.color(O.ColorConstants.YELLOW)}static color(p){const m=new e;return m.setColor(p),m}setColor(p){if("number"==typeof p)this.setRed(a.ColorUtils.getRed(p)),this.setGreen(a.ColorUtils.getGreen(p)),this.setBlue(a.ColorUtils.getBlue(p)),(p>16777215||p<0)&&this.setAlpha(a.ColorUtils.getAlpha(p));else{this.setRed(a.ColorUtils.getRed(p)),this.setGreen(a.ColorUtils.getGreen(p)),this.setBlue(a.ColorUtils.getBlue(p));const m=a.ColorUtils.getAlpha(p);null!=m&&this.setAlpha(m)}}setColorByHSL(p,m,c,_){const s=a.ColorUtils.toArithmeticRGBFromHSL(p,m,c);this.setRed(s[0]),this.setGreen(s[1]),this.setBlue(s[2]),_&&this.setAlpha(_)}setRed(p){"number"==typeof p&&Number.isInteger(p)&&0!==p&&1!==p&&(p=a.ColorUtils.toHex(p)),"string"==typeof p&&(p=a.ColorUtils.toArithmeticRGB(p)),a.ColorUtils.validateArithmeticRGB(p),this.red=p}setGreen(p){"number"==typeof p&&Number.isInteger(p)&&0!==p&&1!==p&&(p=a.ColorUtils.toHex(p)),"string"==typeof p&&(p=a.ColorUtils.toArithmeticRGB(p)),a.ColorUtils.validateArithmeticRGB(p),this.green=p}setBlue(p){"number"==typeof p&&Number.isInteger(p)&&0!==p&&1!==p&&(p=a.ColorUtils.toHex(p)),"string"==typeof p&&(p=a.ColorUtils.toArithmeticRGB(p)),a.ColorUtils.validateArithmeticRGB(p),this.blue=p}setOpacity(p){a.ColorUtils.validateArithmeticRGB(p),this.opacity=p}setAlpha(p){("string"==typeof p||Number.isInteger(p)&&0!==p&&1!==p)&&(p=a.ColorUtils.toArithmeticRGB(p)),this.setOpacity(p)}isOpaque(){return 1===this.opacity}getColorHex(){return a.ColorUtils.toColor(this.getRedHex(),this.getGreenHex(),this.getBlueHex())}getColorHexWithAlpha(){return a.ColorUtils.toColorWithAlpha(this.getRedHex(),this.getGreenHex(),this.getBlueHex(),this.getAlphaHex())}getColorHexShorthand(){return a.ColorUtils.toColorShorthand(this.getRedHex(),this.getGreenHex(),this.getBlueHex())}getColorHexShorthandWithAlpha(){return a.ColorUtils.toColorShorthandWithAlpha(this.getRedHex(),this.getGreenHex(),this.getBlueHex(),this.getAlphaHex())}getColor(){return a.ColorUtils.toColor(this.getRed(),this.getGreen(),this.getBlue())}getColorWithAlpha(){return a.ColorUtils.toColorWithAlpha(this.getRed(),this.getGreen(),this.getBlue(),this.getAlpha())}getRedHex(){return a.ColorUtils.toHex(this.red)}getGreenHex(){return a.ColorUtils.toHex(this.green)}getBlueHex(){return a.ColorUtils.toHex(this.blue)}getAlphaHex(){return a.ColorUtils.toHex(this.opacity)}getRedHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getRedHex())}getGreenHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getGreenHex())}getBlueHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getBlueHex())}getAlphaHexShorthand(){return a.ColorUtils.shorthandHexSingle(this.getAlphaHex())}getRed(){return a.ColorUtils.toRGB(this.red)}getGreen(){return a.ColorUtils.toRGB(this.green)}getBlue(){return a.ColorUtils.toRGB(this.blue)}getAlpha(){return a.ColorUtils.toRGB(this.opacity)}getRedArithmetic(){return this.red}getGreenArithmetic(){return this.green}getBlueArithmetic(){return this.blue}getOpacity(){return this.opacity}getAlphaArithmetic(){return this.getOpacity()}getHSL(){return a.ColorUtils.toHSL(this.red,this.green,this.blue)}getHue(){return this.getHSL()[0]}getSaturation(){return this.getHSL()[1]}getLightness(){return this.getHSL()[2]}copy(){const p=new e;return p.red=this.red,p.green=this.green,p.blue=this.blue,p.opacity=this.opacity,p}setRGB(p,m,c,_){this.setRed(p),this.setGreen(m),this.setBlue(c),_&&this.setAlpha(_)}}x.Color=e},88871:(Q,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.ColorConstants=void 0;class S{}x.ColorConstants=S,S.BLACK="#000000",S.BLUE="#0000FF",S.BROWN="#A52A2A",S.CYAN="#00FFFF",S.DKGRAY="#444444",S.GRAY="#888888",S.GREEN="#00FF00",S.LTGRAY="#CCCCCC",S.MAGENTA="#FF00FF",S.ORANGE="#FFA500",S.PINK="#FFC0CB",S.PURPLE="#800080",S.RED="#FF0000",S.VIOLET="#EE82EE",S.WHITE="#FFFFFF",S.YELLOW="#FFFF00"},82919:(Q,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.ColorUtils=void 0;class S{static toColorShorthand(a,e,l){return S.shorthandHex(S.toColor(a,e,l))}static toColorShorthandWithDefaultAlpha(a,e,l){return S.shorthandHex(S.toColorWithDefaultAlpha(a,e,l))}static toColorShorthandWithAlpha(a,e,l,p){return S.shorthandHex(S.toColorWithAlpha(a,e,l,p))}static toColor(a,e,l){let p;return p=S.toColorWithAlpha(a,e,l,"number"==typeof a?-1:null),p}static toColorWithDefaultAlpha(a,e,l){let p;if("number"==typeof a)p=S.toColorWithAlpha(a,e,l,255);else{let m="FF";null!==a&&a.length>0&&a.charAt(0).toLowerCase()===a.charAt(0)&&(m=m.toLowerCase()),p=S.toColorWithAlpha(a,e,l,m)}return p}static toColorWithAlpha(a,e,l,p){let m="";return"number"==typeof a&&"number"==typeof e&&"number"==typeof l?(S.validateRGB(a),S.validateRGB(e),S.validateRGB(l),m=(255&a)<<16|(255&e)<<8|255&l,"number"==typeof p&&-1!==p&&(S.validateRGB(p),m|=(255&p)<<24)):"string"==typeof a&&"string"==typeof e&&"string"==typeof l&&(S.validateHexSingle(a),S.validateHexSingle(e),S.validateHexSingle(l),m="#",null!=p&&"string"==typeof p&&(m+=S.expandShorthandHexSingle(p)),m+=S.expandShorthandHexSingle(a),m+=S.expandShorthandHexSingle(e),m+=S.expandShorthandHexSingle(l)),m}static toHex(a){let e;return(!Number.isInteger(a)||1===a||0===a)&&(a=S.toRGB(a)),S.validateRGB(a),e=a.toString(16).toUpperCase(),1===e.length&&(e="0"+e),e}static toHSL(a,e,l){Number.isInteger(a)&&0!==a&&1!==a&&(a=S.toArithmeticRGB(a)),Number.isInteger(e)&&0!==e&&1!==e&&(e=S.toArithmeticRGB(e)),Number.isInteger(l)&&0!==l&&1!==l&&(l=S.toArithmeticRGB(l)),S.validateArithmeticRGB(a),S.validateArithmeticRGB(e),S.validateArithmeticRGB(l);const p=Math.min(Math.min(a,e),l),m=Math.max(Math.max(a,e),l),c=m-p;let _=0;c>0&&(_=a>=e&&a>=l?(e-l)/c:e>=l?2+(l-a)/c:4+(a-e)/c),_*=60,_<0&&(_+=360);const s=p+m,o=s/2;let u;return u=p===m?0:o<.5?c/s:c/(2-m-p),[_,u,o]}static toArithmeticRGB(a){return"string"==typeof a&&(a=S.toRGB(a)),Number.isInteger(a)&&0!==a&&1!==a&&(S.validateRGB(a),a/=255),a}static toArithmeticRGBFromHSL(a,e,l){let p;S.validateHue(a),S.validateSaturation(e),S.validateLightness(l),p=l<=.5?l*(e+1):l+e-l*e;const m=2*l-p;return[S.hslConvert(m,p,2+(a/=60)),S.hslConvert(m,p,a),S.hslConvert(m,p,a-2)]}static toRGB(a){let e;return"number"==typeof a?(S.validateArithmeticRGB(a),e=Math.round(255*a)):(S.validateHexSingle(a),1===a.length&&(a+=a),e=parseInt(a,16)),e}static toRGBFromHSL(a,e,l){const p=S.toArithmeticRGBFromHSL(a,e,l);return[S.toRGB(p[0]),S.toRGB(p[1]),S.toRGB(p[2])]}static hslConvert(a,e,l){let p;return l<0&&(l+=6),l>=6&&(l-=6),p=l<1?(e-a)*l+a:l<3?e:l<4?(e-a)*(4-l)+a:a,p}static getHexSingle(a,e){S.validateHex(a),a.startsWith("#")&&(a=a.substring(1));let l=1,p=a.length;p>4&&(l++,p/=2);let m=null;if(e>=0||p>3){p>3&&e++;let c=e;l>1&&(c*=2),m=a.substring(c,c+l),m=S.expandShorthandHexSingle(m)}return m}static getRed(a){let e;return e="number"==typeof a?a>>16&255:S.getHexSingle(a,0),e}static getGreen(a){let e;return e="number"==typeof a?a>>8&255:S.getHexSingle(a,1),e}static getBlue(a){let e;return e="number"==typeof a?255&a:S.getHexSingle(a,2),e}static getAlpha(a){let e=null;return e="number"==typeof a?a>>24&255:S.getHexSingle(a,-1),e}static shorthandHex(a){if(S.validateHex(a),a.length>5){let e="",l=0;for(a.startsWith("#")&&(e+="#",l++);l<a.length;l+=2){const p=S.shorthandHexSingle(a.substring(l,l+2));if(p.length>1){e=null;break}e+=p}null!=e&&(a=e.toString())}return a}static expandShorthandHex(a){if(S.validateHex(a),a.length<6){let e="",l=0;for(a.startsWith("#")&&(e+="#",l++);l<a.length;l++)e+=S.expandShorthandHexSingle(a.substring(l,l+1));a=e.toString()}return a}static shorthandHexSingle(a){return S.validateHexSingle(a),a.length>1&&a.charAt(0).toUpperCase()===a.charAt(1).toUpperCase()&&(a=a.substring(0,1)),a}static expandShorthandHexSingle(a){return S.validateHexSingle(a),1===a.length&&(a+=a),a}static isValidHex(a){return null!==a&&S.hexColorPattern.test(a)}static validateHex(a){if(!S.isValidHex(a))throw new Error("Hex color must be in format #RRGGBB, #RGB, #AARRGGBB, #ARGB, RRGGBB, RGB, AARRGGBB, or ARGB, invalid value: "+a)}static isValidHexSingle(a){return null!==a&&S.hexSingleColorPattern.test(a)}static validateHexSingle(a){if(!S.isValidHexSingle(a))throw new Error("Must be in format FF or F, invalid value: "+a)}static isValidRGB(a){return a>=0&&a<=255}static validateRGB(a){if(!S.isValidRGB(a))throw new Error("Must be inclusively between 0 and 255, invalid value: "+a)}static isValidArithmeticRGB(a){return a>=0&&a<=1}static validateArithmeticRGB(a){if(!S.isValidArithmeticRGB(a))throw new Error("Must be inclusively between 0.0 and 1.0, invalid value: "+a)}static isValidHue(a){return a>=0&&a<=360}static validateHue(a){if(!S.isValidHue(a))throw new Error("Must be inclusively between 0.0 and 360.0, invalid value: "+a)}static isValidSaturation(a){return a>=0&&a<=1}static validateSaturation(a){if(!S.isValidSaturation(a))throw new Error("Must be inclusively between 0.0 and 1.0, invalid value: "+a)}static isValidLightness(a){return a>=0&&a<=1}static validateLightness(a){if(!S.isValidLightness(a))throw new Error("Must be inclusively between 0.0 and 1.0, invalid value: "+a)}}x.ColorUtils=S,S.hexColorPattern=new RegExp("^#?(([0-9a-fA-F]{3}){1,2}|([0-9a-fA-F]{4}){1,2})$"),S.hexSingleColorPattern=new RegExp("^[0-9a-fA-F]{1,2}$")},54408:function(Q,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(e,l,p,m){void 0===m&&(m=p);var c=Object.getOwnPropertyDescriptor(l,p);(!c||("get"in c?!l.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return l[p]}}),Object.defineProperty(e,m,c)}:function(e,l,p,m){void 0===m&&(m=p),e[m]=l[p]}),a=this&&this.__exportStar||function(e,l){for(var p in e)"default"!==p&&!Object.prototype.hasOwnProperty.call(l,p)&&O(l,e,p)};Object.defineProperty(x,"__esModule",{value:!0}),a(S(26947),x),a(S(85589),x),a(S(31210),x),a(S(62446),x),a(S(32011),x),a(S(42117),x),a(S(34174),x),a(S(80187),x),a(S(48576),x),a(S(17917),x),a(S(38442),x),a(S(93832),x),a(S(57997),x),a(S(5729),x),a(S(57151),x),a(S(98291),x)},26947:function(Q,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(o,u,d,v){void 0===v&&(v=d);var g=Object.getOwnPropertyDescriptor(u,d);(!g||("get"in g?!u.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return u[d]}}),Object.defineProperty(o,v,g)}:function(o,u,d,v){void 0===v&&(v=d),o[v]=u[d]}),a=this&&this.__setModuleDefault||(Object.create?function(o,u){Object.defineProperty(o,"default",{enumerable:!0,value:u})}:function(o,u){o.default=u}),e=this&&this.__importStar||function(o){if(o&&o.__esModule)return o;var u={};if(null!=o)for(var d in o)"default"!==d&&Object.prototype.hasOwnProperty.call(o,d)&&O(u,o,d);return a(u,o),u};Object.defineProperty(x,"__esModule",{value:!0}),x.GARS=void 0;const l=S(95523),p=S(85589),m=S(31210),c=S(93832),_=e(S(56104));class s{constructor(u,d,v=p.GARSConstants.DEFAULT_QUADRANT,g=p.GARSConstants.DEFAULT_KEYPAD){this.longitude=u,this.latitude=d,this.quadrant=v,this.keypad=g}static create(u,d,v,g){return new s(u,d,v,g)}getLongitude(){return this.longitude}getLatitude(){return this.latitude}getQuadrant(){return this.quadrant}getKeypad(){return this.keypad}coordinate(u=c.GridType.FIVE_MINUTE){let d=_.sprintf("%03d",this.longitude.toString());return d+=this.latitude,(u===c.GridType.FIFTEEN_MINUTE||u===c.GridType.FIVE_MINUTE)&&(d+=this.quadrant,u===c.GridType.FIVE_MINUTE&&(d+=this.keypad)),d}toPoint(){let u=m.GARSUtils.getLongitude(this.longitude),d=m.GARSUtils.getLatitude(this.latitude);return u+=m.GARSUtils.quadrantColumn(this.quadrant)*c.GridType.FIFTEEN_MINUTE,d+=m.GARSUtils.quadrantRow(this.quadrant)*c.GridType.FIFTEEN_MINUTE,u+=m.GARSUtils.keypadColumn(this.keypad)*c.GridType.FIVE_MINUTE,d+=m.GARSUtils.keypadRow(this.keypad)*c.GridType.FIVE_MINUTE,new l.Point(u,d)}toString(){return this.coordinate()}equals(u){return this===u||!(!u||typeof this!=typeof u)&&!(this.keypad!==u.keypad||this.latitude!==u.latitude||this.longitude!==u.longitude||this.quadrant!==u.quadrant)}static isGARS(u){u=this.removeSpaces(u);let d=!1;if(this.garsPattern.test(u)){const v=u.match(this.garsPattern);if(v){const g=Number.parseInt(v[1],10);if(d=g>=p.GARSConstants.MIN_BAND_NUMBER&&g<=p.GARSConstants.MAX_BAND_NUMBER,d){const b=v[2].toUpperCase(),C=m.GARSUtils.bandValue(b);d=C>=p.GARSConstants.MIN_BAND_LETTERS_NUMBER&&C<=p.GARSConstants.MAX_BAND_LETTERS_NUMBER}}}return d}static removeSpaces(u){return u.replace("\\s","")}static fromPoint(u){return u=u.toDegrees(),this.from(u.getLongitude(),u.getLatitude())}static from(u,d){const v=m.GARSUtils.getLongitudeDecimalBand(u),g=m.GARSUtils.getLatitudeDecimalBandValue(d),b=~~v,C=~~g,D=m.GARSUtils.bandLetters(C);let E=v-b,R=g-C;const N=2*E,Z=2*R,j=~~N,Y=~~Z,K=m.GARSUtils.quadrant(j,Y);E=N-j,R=Z-Y;const te=m.GARSUtils.keypad(~~(3*E),~~(3*R));return s.create(b,D,K,te)}static parse(u){if(u=this.removeSpaces(u),!this.garsPattern.test(u))throw new Error("Invalid GARS: "+u);const d=u.match(this.garsPattern),v=Number.parseInt(d[1],10);if(v<p.GARSConstants.MIN_BAND_NUMBER||v>p.GARSConstants.MAX_BAND_NUMBER)throw new Error("Invalid GARS longitude: "+d[1]+", GARS: "+u);const g=d[2].toUpperCase(),b=m.GARSUtils.bandValue(g);if(b<p.GARSConstants.MIN_BAND_LETTERS_NUMBER||b>p.GARSConstants.MAX_BAND_LETTERS_NUMBER)throw new Error("Invalid GARS latitude: "+d[2]+", GARS: "+u);let C=p.GARSConstants.DEFAULT_QUADRANT,D=p.GARSConstants.DEFAULT_KEYPAD;const E=d[3];if(null!=E){C=Number.parseInt(E,10);const R=d[4];null!=R&&(D=Number.parseInt(R,10))}return s.create(v,g,C,D)}static precision(u){if(u=this.removeSpaces(u),!this.garsPattern.test(u))throw new Error("Invalid GARS: "+u);const d=u.match(this.garsPattern);let v;return v=null!=d[4]?c.GridType.FIVE_MINUTE:null!=d[3]?c.GridType.FIFTEEN_MINUTE:c.GridType.THIRTY_MINUTE,v}}x.GARS=s,s.garsPattern=new RegExp("^(\\d{3})([A-HJ-NP-Z]{2})(?:([1-4])([1-9])?)?$","i")},85589:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GARSConstants=void 0;const O=S(95523);class a{}x.GARSConstants=a,a.MIN_LON=O.GridConstants.MIN_LON,a.MAX_LON=O.GridConstants.MAX_LON,a.MIN_LAT=O.GridConstants.MIN_LAT,a.MAX_LAT=O.GridConstants.MAX_LAT,a.MIN_BAND_NUMBER=1,a.MAX_BAND_NUMBER=720,a.MIN_BAND_LETTERS="AA",a.MAX_BAND_LETTERS="QZ",a.MIN_BAND_LETTER="A",a.MAX_BAND_LETTER="Z",a.MIN_BAND_LETTERS_NUMBER=1,a.MAX_BAND_LETTERS_NUMBER=360,a.DEFAULT_QUADRANT=3,a.DEFAULT_KEYPAD=7},31210:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GARSUtils=void 0;const O=S(95523),a=S(85589),e=S(93832);x.GARSUtils=class l{static getLongitude(m){return a.GARSConstants.MIN_LON+(m-1)*e.GridType.THIRTY_MINUTE}static getLatitude(m){return"string"==typeof m&&(m=this.bandValue(m)),a.GARSConstants.MIN_LAT+(m-1)*e.GridType.THIRTY_MINUTE}static getLongitudeBand(m){return this.getLongitudeDecimalBand(m)}static getLongitudeDecimalBand(m){return(m-a.GARSConstants.MIN_LON)/e.GridType.THIRTY_MINUTE+1}static getLatitudeBand(m){return this.bandLetters(this.getLatitudeBandValue(m))}static getLatitudeBandValue(m){return this.getLatitudeDecimalBandValue(m)}static getLatitudeDecimalBandValue(m){return(m-a.GARSConstants.MIN_LAT)/e.GridType.THIRTY_MINUTE+1}static bandValue(m){if(1===m.length)return this.bandValueFromChar(m.charCodeAt(0));const c=m.toUpperCase();return 24*(this.bandValueFromChar(c.charCodeAt(0))-1)+this.bandValueFromChar(c.charCodeAt(1))}static bandValueFromChar(m){let c=m-a.GARSConstants.MIN_BAND_LETTER.charCodeAt(0)+1;return m>O.GridConstants.BAND_LETTER_OMIT_I.charCodeAt(0)&&(c--,m>O.GridConstants.BAND_LETTER_OMIT_O.charCodeAt(0)&&c--),c}static bandLetters(m){const _=(m-=1)%24;return this.bandLetter(m/24+1)+this.bandLetter(_+1)}static bandLetter(m){let c=a.GARSConstants.MIN_BAND_LETTER.charCodeAt(0);return c+=m-1,c>=O.GridConstants.BAND_LETTER_OMIT_I.charCodeAt(0)&&(c++,c>=O.GridConstants.BAND_LETTER_OMIT_O.charCodeAt(0)&&c++),String.fromCharCode(c)}static quadrantColumn(m){return m%2==0?1:0}static quadrantRow(m){return m>=3?0:1}static keypadColumn(m){let c=0;return m%3==0?c=2:(m+1)%3==0&&(c=1),c}static keypadRow(m){let c=0;return m<=3?c=2:m<=6&&(c=1),c}static quadrant(m,c){return 2*(1-c)+m+1}static keypad(m,c){return 3*(2-c)+m+1}static getDegreeLabel(m,c){let _="";return _+=Math.abs(m),_+=m<0?O.GridConstants.WEST_CHAR:O.GridConstants.EAST_CHAR,_+=Math.abs(c),_+=c<0?O.GridConstants.SOUTH_CHAR:O.GridConstants.NORTH_CHAR,_.toString()}static nextPrecision(m,c){let _=m;return c<e.GridType.FIFTEEN_MINUTE?_=O.GridUtils.precisionAfter(m+.5*c,c):_+=c,_}}},62446:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridLine=void 0;const O=S(95523);class a extends O.Line{static line(l,p,m){const c=new a;return c.setPoints(l,p),c.setGridType(m),c}static lineFromLine(l,p){const m=new a;m.hasZ=l.hasZ,m.hasM=l.hasM;for(const c of l.points)m.addPoint(c.copy());return m.setGridType(p),m}getGridType(){return this.gridType}hasGridType(){return null!=this.gridType}setGridType(l){this.gridType=l}copy(){const l=new a(this);return l.setGridType(this.gridType),l}equals(l){return this===l||!(!super.equals(l)||typeof this!=typeof l)&&this.gridType===l.gridType}}x.GridLine=a},32011:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BandLettersRange=void 0;const O=S(85589),a=S(31210);class e{constructor(p=O.GARSConstants.MIN_BAND_LETTERS,m=O.GARSConstants.MAX_BAND_LETTERS){this.south=p,this.north=m,this.value=this.getSouthValue(),this.maxValue=this.getNorthValue()}getSouth(){return this.south}setSouth(p){this.south=p}getNorth(){return this.north}setNorth(p){this.north=p}getSouthValue(){return a.GARSUtils.bandValue(this.south)}getNorthValue(){return a.GARSUtils.bandValue(this.north)}getSouthLatitude(){return a.GARSUtils.getLatitude(this.south)}getNorthLatitude(){return a.GARSUtils.getLatitude(this.north)}next(){return this.value<=this.maxValue?{done:!1,value:a.GARSUtils.bandLetters(this.value++)}:{done:!0,value:null}}reset(){this.value=this.getSouthValue()}[Symbol.iterator](){return this}}x.BandLettersRange=e},42117:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BandNumberRange=void 0;const O=S(85589),a=S(31210);class e{constructor(p=O.GARSConstants.MIN_BAND_NUMBER,m=O.GARSConstants.MAX_BAND_NUMBER){this.west=p,this.east=m,this.bandNumber=this.west}getWest(){return this.west}setWest(p){this.west=p}getEast(){return this.east}setEast(p){this.east=p}getWestLongitude(){return a.GARSUtils.getLongitude(this.west)}getEastLongitude(){return a.GARSUtils.getLongitude(this.east)}next(){return this.bandNumber<=this.east?{done:!1,value:this.bandNumber++}:{done:!0,value:null}}[Symbol.iterator](){return this}}x.BandNumberRange=e},34174:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GARSLabeler=void 0;const O=S(95523),a=S(26947),e=S(31210),l=S(48576),p=S(17917),m=S(93832);x.GARSLabeler=class c extends p.GridLabeler{constructor(s,o=0,u,d,v,g){super(s,o,u,d,v,g)}getLabels(s,o){const u=[];for(let d=(s=s.toPrecision(o)).getMinLongitude();d<=s.getMaxLongitude();d=e.GARSUtils.nextPrecision(d,o))for(let v=s.getMinLatitude();v<=s.getMaxLatitude();v=e.GARSUtils.nextPrecision(v,o)){const g=O.Bounds.degrees(d,v,d+o,v+o),b=g.getCentroid(),C=a.GARS.fromPoint(b);let D=null;switch(o){case m.GridType.TWENTY_DEGREE:case m.GridType.TEN_DEGREE:case m.GridType.FIVE_DEGREE:case m.GridType.ONE_DEGREE:D=e.GARSUtils.getDegreeLabel(d,v);break;default:D=C.coordinate(o)}u.push(new l.GridLabel(D,b,g,o,C))}return u}}},80187:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Grid=void 0;const O=S(95523),a=S(62446),e=S(31210),l=S(98291),p=S(57997);class m extends O.BaseGrid{constructor(_){super(),this.styles=new Map,this.type=_}getType(){return this.type}isType(_){return this.type===_}getPrecision(){return p.GridTypeUtils.getPrecision(this.type)}getStyle(_){let s;return s=null!=_?_===this.type?super.getStyle():this.styles.get(_):super.getStyle(),s}getOrCreateStyle(_){let s=this.getStyle(_);return s||(s=new O.GridStyle(void 0,0),this.setStyle(s,_)),s}setStyle(_,s){if(null==s&&(s=this.type),s<this.getPrecision())throw new Error("Grid can not define a style for a higher precision grid type. Type: "+this.type+", Style Type: "+s);s===this.type?super.setStyle(_):this.styles.set(s,_||new O.GridStyle(void 0,0))}clearPrecisionStyles(){this.styles.clear()}getColor(_){let s;if(null!=_){const o=this.getStyle(_);o&&(s=o.getColor())}return s||(s=super.getColor()),s}setColor(_,s){null==s&&(s=this.type),this.getOrCreateStyle(s).setColor(_)}getWidth(_){let s=0;const o=this.getStyle(_);return o&&(s=o.getWidth()),0===s&&(s=super.getWidth()),s}setWidth(_,s){null==s&&(s=this.type),this.getOrCreateStyle(s).setWidth(_)}getLabeler(){return super.getLabeler()}setLabeler(_){super.setLabeler(_)}getLinesFromGridTile(_){return this.getLines(_.getZoom(),_.getBounds())}getLines(_,s){const o=[];if(!this.isLinesWithin(_))return;const u=this.getPrecision();for(let d=(s=s.toPrecision(u)).getMinLongitude();d<=s.getMaxLongitude();d=e.GARSUtils.nextPrecision(d,u)){const v=p.GridTypeUtils.getPrecision(d);for(let g=s.getMinLatitude();g<=s.getMaxLatitude();g=e.GARSUtils.nextPrecision(g,u)){const b=p.GridTypeUtils.getPrecision(g),C=O.Point.point(d,g),D=O.Point.point(d,g+u),E=O.Point.point(d+u,g);o.push(a.GridLine.line(C,D,v)),o.push(a.GridLine.line(C,E,b))}}return o}getLabelsFromGridTile(_){return this.getLabels(_.getZoom(),_.getBounds())}getLabels(_,s){let o;return this.isLabelerWithin(_)&&(o=this.getLabeler().getLabels(s,this.type)),o}compareTo(_){const s=this.getPrecision(),o=_.getPrecision();return s<o?-1:s>o?1:s===o?0:s<o?-1:1}hashCode(){let s=1;return s=31*s+(this.type?p.GridTypeUtils.hashCode(this.type):0),s}equals(_){return this===_||!(!_||typeof this!=typeof _)&&this.type===_.type}less(_){return this.hashCode()<_.hashCode()}}x.Grid=m,m.DEFAULT_WIDTH=l.GARSProperties.getInstance().getDoubleProperty(!0,O.PropertyConstants.GRID.toString(),O.PropertyConstants.WIDTH.toString())},48576:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridLabel=void 0;const O=S(95523);x.GridLabel=class a extends O.Label{constructor(l,p,m,c,_){super(l,p,m),this.gridType=c,this.coordinate=_}getGridType(){return this.gridType}setGridType(l){this.gridType=l}getCoordinate(){return this.coordinate}setCoordinate(l){this.coordinate=l}}},17917:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridLabeler=void 0;const O=S(31690),a=S(95523),e=S(98291);class l extends a.Labeler{constructor(m,c=0,_,s=O.Color.black(),o=l.DEFAULT_TEXT_SIZE,u=l.DEFAULT_BUFFER){super(m,c,_,s,o,u)}}x.GridLabeler=l,l.DEFAULT_TEXT_SIZE=e.GARSProperties.getInstance().getDoubleProperty(!0,a.PropertyConstants.LABELER.toString(),a.PropertyConstants.TEXT_SIZE.toString()),l.DEFAULT_BUFFER=e.GARSProperties.getInstance().getDoubleProperty(!0,a.PropertyConstants.LABELER.toString(),a.PropertyConstants.BUFFER.toString())},38442:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridRange=void 0;const O=S(95523),a=S(26947),e=S(32011),l=S(42117);class p{constructor(c=new l.BandNumberRange,_=new e.BandLettersRange){this.bandNumberRange=c,this.bandLettersRange=_,this.bandNumbers=c.next(),this.bandLetters=_.next(),this.bandNumbers.done||(this.bandNumber=this.bandNumbers.value)}getBandNumberRange(){return this.bandNumberRange}setBandNumberRange(c){this.bandNumberRange=c}getBandLettersRange(){return this.bandLettersRange}setBandLettersRange(c){this.bandLettersRange=c}getBounds(){const c=this.bandNumberRange.getWestLongitude(),_=this.bandLettersRange.getSouthLatitude(),s=this.bandNumberRange.getEastLongitude(),o=this.bandLettersRange.getNorthLatitude();return O.Bounds.degrees(c,_,s,o)}next(){if(null==this.bandNumber||this.bandLetters.done)return{done:!0,value:null};{const c=this.bandLetters.value;this.bandLetters=this.bandLettersRange.next();const _=a.GARS.create(this.bandNumber,c);return this.bandLetters.done&&(this.bandNumbers.done?this.bandNumber=void 0:(this.bandNumbers=this.bandNumberRange.next(),this.bandNumber=this.bandNumbers.value,this.bandLettersRange.reset(),this.bandLetters=this.bandLettersRange.next())),{done:!1,value:_}}}[Symbol.iterator](){return this}}x.GridRange=p},93832:(Q,x)=>{"use strict";var O;Object.defineProperty(x,"__esModule",{value:!0}),x.GridType=void 0,(O=x.GridType||(x.GridType={}))[O.TWENTY_DEGREE=20]="TWENTY_DEGREE",O[O.TEN_DEGREE=10]="TEN_DEGREE",O[O.FIVE_DEGREE=5]="FIVE_DEGREE",O[O.ONE_DEGREE=1]="ONE_DEGREE",O[O.THIRTY_MINUTE=.5]="THIRTY_MINUTE",O[O.FIFTEEN_MINUTE=.25]="FIFTEEN_MINUTE",O[O.FIVE_MINUTE=.08333333333333333]="FIVE_MINUTE"},57997:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridTypeUtils=void 0;const O=S(93832);class a{static getPrecision(l){let p=O.GridType.FIVE_MINUTE;return l%O.GridType.TWENTY_DEGREE==0?p=O.GridType.TWENTY_DEGREE:l%O.GridType.TEN_DEGREE==0?p=O.GridType.TEN_DEGREE:l%O.GridType.FIVE_DEGREE==0?p=O.GridType.FIVE_DEGREE:l%O.GridType.ONE_DEGREE==0?p=O.GridType.ONE_DEGREE:l%O.GridType.THIRTY_MINUTE==0?p=O.GridType.THIRTY_MINUTE:l%O.GridType.FIFTEEN_MINUTE==0&&(p=O.GridType.FIFTEEN_MINUTE),p}static lessPrecise(l){const p=a.values(),m=a.ordinal(l),c=new Set;for(let _=0;_<m;_++)c.add(p[_]);return c}static morePrecise(l){const p=a.values(),m=a.ordinal(l),c=new Set;for(let _=m;_<p.length;_++)c.add(p[_]);return c}static values(){const l=[],p=Object.keys(O.GridType).map(m=>O.GridType[m]);for(const m of p)Number.isInteger(m)&&l.push(m);return l}static ordinal(l){const p=Object.keys(O.GridType);let m=0;for(let c=0;c<p.length;c++)if(isNaN(Number(p[c]))){if(p[c]===O.GridType[l])break;m++}return m}static hashCode(l){let p=0;const m=l.toString();for(let c=0;c<m.length;c++)p=31*p+m.charCodeAt(c);return 4294967295&p}}x.GridTypeUtils=a},5729:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Grids=void 0;const O=S(95523),a=S(98291),e=S(34174),l=S(80187),p=S(93832),m=S(57997),c=S(57151);class _ extends O.BaseGrids{constructor(o){if(super(a.GARSProperties.getInstance()),this.gridMap=new Map,o&&o.length>0){this.createGrids(!1);for(const u of o){const d=this.getGrid(u);d&&d.setEnabled(!0)}}else this.createGrids();this.createZoomGrids()}static create(o){return new _(o)}getDefaultWidth(){return l.Grid.DEFAULT_WIDTH}grids(){const o=[];for(const u of this.gridMap.values())o.push(u);return o}newGrid(o){return new l.Grid(o)}newZoomGrids(o){return new c.ZoomGrids(o)}createGrids(o){const u=this.properties.getBooleanProperty(!1,O.PropertyConstants.GRIDS,O.PropertyConstants.PROPAGATE);let d;null!=u&&u&&(d=new Map),this.createGrid(p.GridType.TWENTY_DEGREE,new e.GARSLabeler(!0),d,o),this.createGrid(p.GridType.TEN_DEGREE,new e.GARSLabeler(!0),d,o),this.createGrid(p.GridType.FIVE_DEGREE,new e.GARSLabeler(!0),d,o),this.createGrid(p.GridType.ONE_DEGREE,new e.GARSLabeler(!0),d,o),this.createGrid(p.GridType.THIRTY_MINUTE,new e.GARSLabeler(!0),d,o),this.createGrid(p.GridType.FIFTEEN_MINUTE,new e.GARSLabeler(!0),d,o),this.createGrid(p.GridType.FIVE_MINUTE,new e.GARSLabeler(!0),d,o)}createGrid(o,u,d,v){const g=this.newGrid(o),b=p.GridType[o].toLowerCase();this.loadGrid(g,b,u,v),d&&d.set(o,O.GridStyle.style(g.getColor(),g.getWidth())),this.loadGridStyles(g,b,d),this.gridMap.set(o,g)}loadGridStyles(o,u,d){const v=o.getPrecision();v<p.GridType.TWENTY_DEGREE&&this.loadGridStyle(o,u,p.GridType.TWENTY_DEGREE,d),v<p.GridType.TEN_DEGREE&&this.loadGridStyle(o,u,p.GridType.TEN_DEGREE,d),v<p.GridType.FIVE_DEGREE&&this.loadGridStyle(o,u,p.GridType.FIVE_DEGREE,d),v<p.GridType.ONE_DEGREE&&this.loadGridStyle(o,u,p.GridType.ONE_DEGREE,d),v<p.GridType.THIRTY_MINUTE&&this.loadGridStyle(o,u,p.GridType.THIRTY_MINUTE,d),v<p.GridType.FIFTEEN_MINUTE&&this.loadGridStyle(o,u,p.GridType.FIFTEEN_MINUTE,d)}loadGridStyle(o,u,d,v){const g=p.GridType[d].toLowerCase();let b=this.loadGridStyleColor(u,g),C=this.loadGridStyleWidth(u,g);if((!b||null==C)&&v){const D=v.get(d);if(D){if(!b){const E=D.getColor();E&&(b=E.copy())}null==C&&(C=D.getWidth())}}if(b||null!=C){const D=this.getGridStyle(o,b,C);o.setStyle(D,d),v&&v.set(d,D)}}getGrid(o){return this.gridMap.get(o)}getPrecision(o){const u=this.getGrids(o);let d;return u&&(d=u.getPrecision()),d}setGridTypes(o){const u=new Set(Object.keys(p.GridType));for(const v of o)this.enableByType(v),u.delete(p.GridType[v]);const d=[];for(const v of u)d.push(p.GridType[v]);this.disableTypes(d)}setGrids(o){const u=new Set(Object.keys(p.GridType));for(const v of o)this.enable(v),u.delete(p.GridType[v.getType()]);const d=[];for(const v of u)d.push(p.GridType[v]);this.disableTypes(d)}enableTypes(o){for(const u of o)this.enableByType(u)}disableTypes(o){for(const u of o)this.disableByType(u)}isEnabled(o){return this.getGrid(o).isEnabled()}enableByType(o){this.enable(this.getGrid(o))}disableByType(o){this.disable(this.getGrid(o))}setMinZoomByType(o,u){super.setMinZoom(this.getGrid(o),u)}setMaxZoomByType(o,u){super.setMaxZoom(this.getGrid(o),u)}setZoomRangeByType(o,u,d){super.setZoomRange(this.getGrid(o),u,d)}setLinesMinZoom(o,u){this.getGrid(o).setLinesMinZoom(u)}setLinesMaxZoom(o,u){this.getGrid(o).setLinesMaxZoom(u)}setAllColors(o){this.setColor(m.GridTypeUtils.values(),o)}setAllWidths(o){this.setWidth(m.GridTypeUtils.values(),o)}deletePropagatedStyles(o){o||(o=m.GridTypeUtils.values());for(const u of o)this.getGrid(u).clearPrecisionStyles()}setColor(o,u,d){if(d)for(const v of d)for(const g of o)this.getGrid(g).setColor(u,v);else for(const v of o)this.getGrid(v).setColor(u)}setWidth(o,u,d){if(d)for(const v of d)for(const g of o)this.getGrid(g).setWidth(u,v);else for(const v of o)this.getGrid(v).setWidth(u)}getLabeler(o){return this.getGrid(o).getLabeler()}hasLabeler(o){return this.getGrid(o).hasLabeler()}setLabeler(o,u){this.getGrid(o).setLabeler(u)}disableAllLabelers(){this.disableLabelers(m.GridTypeUtils.values())}enableLabelers(o){for(const u of o)this.enableLabeler(u)}disableLabelers(o){for(const u of o)this.disableLabeler(u)}isLabelerEnabled(o){const u=this.getLabeler(o);return null!==u&&u.isEnabled()}enableLabeler(o){this.getRequiredLabeler(o).setEnabled(!0)}disableLabeler(o){const u=this.getLabeler(o);u&&u.setEnabled(!1)}getRequiredLabeler(o){const u=this.getLabeler(o);if(!u)throw new Error("Grid type does not have a labeler: "+o);return u}setLabelMinZoom(o,u){const d=this.getRequiredLabeler(o);d.setMinZoom(u);const v=d.getMaxZoom();null!=v&&v<u&&d.setMaxZoom(u)}setLabelMaxZoom(o,u){const d=this.getRequiredLabeler(o);d.setMaxZoom(u),null!=u&&d.getMinZoom()>u&&d.setMinZoom(u)}setLabelZoomRange(o,u,d){const v=this.getRequiredLabeler(o);if(null!=d&&d<u)throw new Error("Min zoom '"+u+"' can not be larger than max zoom '"+d+"'");v.setMinZoom(u),v.setMaxZoom(d)}setLabelBuffer(o,u){for(const d of u)this.getRequiredLabeler(d).setBuffer(o)}getLabelBuffer(o){return this.getGrid(o).getLabelBuffer()}setAllLabelColors(o){for(const u of this.gridMap.values())u.hasLabeler()&&this.setLabelColor(o,[u.getType()])}setLabelColor(o,u){for(const d of u)this.getRequiredLabeler(d).setColor(o)}setAllLabelTextSizes(o){for(const u of this.gridMap.values())u.hasLabeler()&&this.setLabelTextSize(o,[u.getType()])}setLabelTextSize(o,u){for(const d of u)this.getRequiredLabeler(d).setTextSize(o)}}x.Grids=_},57151:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.ZoomGrids=void 0;const O=S(95523);x.ZoomGrids=class a extends O.BaseZoomGrids{constructor(l){super(l)}getPrecision(){let l;return this.hasGrids()&&(l=this.grids.begin().value.getType()),l}}},98291:function(Q,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(c,_,s,o){void 0===o&&(o=s);var u=Object.getOwnPropertyDescriptor(_,s);(!u||("get"in u?!_.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return _[s]}}),Object.defineProperty(c,o,u)}:function(c,_,s,o){void 0===o&&(o=s),c[o]=_[s]}),a=this&&this.__setModuleDefault||(Object.create?function(c,_){Object.defineProperty(c,"default",{enumerable:!0,value:_})}:function(c,_){c.default=_}),e=this&&this.__importStar||function(c){if(c&&c.__esModule)return c;var _={};if(null!=c)for(var s in c)"default"!==s&&Object.prototype.hasOwnProperty.call(c,s)&&O(_,c,s);return a(_,c),_};Object.defineProperty(x,"__esModule",{value:!0}),x.GARSProperties=void 0;const l=S(95523),p=e(S(97604));class m extends l.GridProperties{static getInstance(){return m.instance}}x.GARSProperties=m,m.instance=new m(p)},95523:function(Q,x,S){"use strict";var O=this&&this.__createBinding||(Object.create?function(e,l,p,m){void 0===m&&(m=p);var c=Object.getOwnPropertyDescriptor(l,p);(!c||("get"in c?!l.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return l[p]}}),Object.defineProperty(e,m,c)}:function(e,l,p,m){void 0===m&&(m=p),e[m]=l[p]}),a=this&&this.__exportStar||function(e,l){for(var p in e)"default"!==p&&!Object.prototype.hasOwnProperty.call(l,p)&&O(l,e,p)};Object.defineProperty(x,"__esModule",{value:!0}),a(S(77250),x),a(S(80858),x),a(S(3053),x),a(S(71695),x),a(S(57070),x),a(S(17521),x),a(S(87859),x),a(S(19298),x),a(S(50524),x),a(S(17551),x),a(S(91231),x),a(S(61797),x),a(S(59784),x),a(S(2351),x),a(S(48145),x),a(S(82932),x),a(S(26182),x),a(S(68465),x),a(S(38170),x)},17551:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BaseGrid=void 0;const O=S(2351);x.BaseGrid=class a{constructor(){this.enabled=!1,this.minZoom=0,this.style=new O.GridStyle(void 0,0)}isEnabled(){return this.enabled}setEnabled(l){this.enabled=l}getMinZoom(){return this.minZoom}setMinZoom(l){this.minZoom=l}getMaxZoom(){return this.maxZoom}hasMaxZoom(){return void 0!==this.maxZoom}setMaxZoom(l){this.maxZoom=l}isWithin(l){return l>=this.minZoom&&(void 0===this.maxZoom||l<=this.maxZoom)}getLinesMinZoom(){return void 0!==this.linesMinZoom?this.linesMinZoom:this.getMinZoom()}hasLinesMinZoom(){return void 0!==this.linesMinZoom}setLinesMinZoom(l){this.linesMinZoom=l}getLinesMaxZoom(){return void 0!==this.linesMaxZoom?this.linesMaxZoom:this.getMaxZoom()}hasLinesMaxZoom(){return void 0!==this.linesMaxZoom}setLinesMaxZoom(l){this.linesMaxZoom=l}isLinesWithin(l){let p=!0;return null!=this.linesMinZoom&&(p=l>=this.linesMinZoom),p&&null!=this.linesMaxZoom&&(p=l<=this.linesMaxZoom),p}getStyle(){return this.style}setStyle(l){this.style=void 0!==l?l:new O.GridStyle(void 0,0)}getColor(){return this.getStyle().getColor()}setColor(l){this.getStyle().setColor(l)}getWidth(){return this.getStyle().getWidth()}setWidth(l){this.getStyle().setWidth(l)}getLabeler(){return this.labeler}hasLabeler(){return void 0!==this.labeler}setLabeler(l){this.labeler=l}isLabelerWithin(l){return this.hasLabeler()&&this.labeler.isEnabled()&&this.labeler.isWithin(l)}getLabelBuffer(){return this.hasLabeler()?this.labeler.getBuffer():0}}},91231:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BaseGrids=void 0;const O=S(31690),a=S(45400),e=S(59784),l=S(2351),p=S(57070);x.BaseGrids=class m{constructor(_){this.zoomGrids=new a.TreeMap,this.properties=_}loadGrid(_,s,o,u){null==u&&void 0===(u=this.properties.getBooleanProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.ENABLED))&&(u=!0),_.setEnabled(u);let d=this.properties.getIntegerProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.MIN_ZOOM);void 0===d&&(d=0),_.setMinZoom(d);const v=this.properties.getIntegerProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.MAX_ZOOM);_.setMaxZoom(v);const g=this.properties.getIntegerProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LINES,p.PropertyConstants.MIN_ZOOM);_.setLinesMinZoom(g);const b=this.properties.getIntegerProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LINES,p.PropertyConstants.MAX_ZOOM);_.setLinesMaxZoom(b);const C=this.properties.getProperty(!1,this.properties.buildProperty([p.PropertyConstants.GRIDS,s,p.PropertyConstants.COLOR])),D=null!=C?O.Color.color(C):O.Color.black();_.setColor(D);let E=this.properties.getDoubleProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.WIDTH);void 0===E&&(E=this.getDefaultWidth()),_.setWidth(E),o&&this.loadLabeler(o,s),_.setLabeler(o)}loadLabeler(_,s){const o=this.properties.getBooleanProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LABELER,p.PropertyConstants.ENABLED);_.setEnabled(null!=o&&o);const u=this.properties.getIntegerProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LABELER,p.PropertyConstants.MIN_ZOOM);void 0!==u&&_.setMinZoom(u);const d=this.properties.getIntegerProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LABELER,p.PropertyConstants.MAX_ZOOM);void 0!==d&&_.setMaxZoom(d);const v=this.properties.getProperty(!1,this.properties.buildProperty([p.PropertyConstants.GRIDS,s,p.PropertyConstants.LABELER,p.PropertyConstants.COLOR]));v&&_.setColor(O.Color.color(v));const g=this.properties.getDoubleProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LABELER,p.PropertyConstants.TEXT_SIZE);void 0!==g&&_.setTextSize(g);const b=this.properties.getDoubleProperty(!1,p.PropertyConstants.GRIDS,s,p.PropertyConstants.LABELER,p.PropertyConstants.BUFFER);void 0!==b&&_.setBuffer(b)}loadGridStyleColor(_,s){const o=this.properties.getProperty(!1,this.properties.buildProperty([p.PropertyConstants.GRIDS,_,s,p.PropertyConstants.COLOR]));let u;return o&&(u=O.Color.color(o)),u}loadGridStyleWidth(_,s){return this.properties.getDoubleProperty(!1,this.properties.buildProperty([p.PropertyConstants.GRIDS,_,s,p.PropertyConstants.WIDTH]))}getGridStyle(_,s,o){return s||(s=_.getColor()),null==o&&(o=_.getWidth()),l.GridStyle.style(s,o)}createZoomGrids(){for(let _=0;_<=e.GridConstants.MAX_MAP_ZOOM_LEVEL;_++)this.createZoomGridsFromZoom(_)}getGrids(_){let s=this.zoomGrids.get(_);return s||(s=this.createZoomGridsFromZoom(_)),s}createZoomGridsFromZoom(_){const s=this.newZoomGrids(_);for(const o of this.grids())o.isEnabled()&&o.isWithin(_)&&s.addGrid(o);return this.zoomGrids.set(_,s),s}enableGrids(_){for(const s of _)this.enable(s)}disableGrids(_){for(const s of _)this.disable(s)}enable(_){if(!_.isEnabled()){_.setEnabled(!0);const s=_.getMinZoom();let o=_.getMaxZoom();null==o&&(o=this.zoomGrids.end().value.first);for(let u=s;u<=o;u++)this.addGrid(_,u)}}disable(_){if(_.isEnabled()){_.setEnabled(!1);const s=_.getMinZoom();let o=_.getMaxZoom();null==o&&(o=this.zoomGrids.end().value.first);for(let u=s;u<=o;u++)this.removeGrid(_,u)}}setMinZoom(_,s){let o=_.getMaxZoom();null!=o&&o<s&&(o=s),this.setZoomRange(_,s,o)}setMaxZoom(_,s){let o=_.getMinZoom();null!=s&&o>s&&(o=s),this.setZoomRange(_,o,s)}setZoomRange(_,s,o){if(null!=o&&o<s)throw new Error("Min zoom '"+s+"' can not be larger than max zoom '"+o+"'");const u=this.zoomGrids.begin().value.first,d=this.zoomGrids.end().value.first,v=_.getMinZoom();let g=_.getMaxZoom();g=null==g?d:Math.min(g,d),_.setMinZoom(s),_.setMaxZoom(o),s=Math.max(s,u),o=null==o?d:Math.min(o,d);const b=Math.max(s,v),C=Math.min(o,g);if(b<=C){const E=Math.min(s,v),R=Math.max(o,g);for(let N=E;N<=R;N++)(N<b||N>C)&&(N>=s&&N<=o?this.addGrid(_,N):this.removeGrid(_,N))}else{for(let E=v;E<=g;E++)this.removeGrid(_,E);for(let E=s;E<=o;E++)this.addGrid(_,E)}}addGrid(_,s){const o=this.zoomGrids.get(s);o&&o.addGrid(_)}removeGrid(_,s){const o=this.zoomGrids.get(s);o&&o.removeGrid(_)}enableAllLabelers(){for(const _ of this.grids()){const s=_.getLabeler();s&&s.setEnabled(!0)}}setAllLabelBuffers(_){for(const s of this.grids()){const o=s.getLabeler();o&&o.setBuffer(_)}}}},61797:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.BaseZoomGrids=void 0;const O=S(45400);class a{constructor(l){this.grids=new O.TreeSet,this.zoom=l,this.beginIterator=this.grids.begin()}getZoom(){return this.zoom}getGrids(){return this.grids}numGrids(){return this.grids.size()}hasGrids(){return!this.grids.empty()}addGrid(l){const p=this.grids.push(l)>0;return this.reset(),p}removeGrid(l){const p=this.grids.erase(l)>0;return this.reset(),p}next(){if(this.beginIterator.equals(this.grids.end()))return{done:!0,value:void 0};{const l=this.beginIterator.value;return this.beginIterator=this.beginIterator.next(),{done:!1,value:l}}}reset(){this.beginIterator=this.grids.begin()}[Symbol.iterator](){return this}}x.BaseZoomGrids=a},59784:(Q,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridConstants=void 0;class S{}x.GridConstants=S,S.MIN_LON=-180,S.MAX_LON=180,S.MIN_LAT=-90,S.MAX_LAT=90,S.BAND_LETTER_OMIT_I="I",S.BAND_LETTER_OMIT_O="O",S.MAX_MAP_ZOOM_LEVEL=21,S.NORTH_CHAR="N",S.SOUTH_CHAR="S",S.WEST_CHAR="W",S.EAST_CHAR="E"},2351:(Q,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridStyle=void 0;class S{constructor(a,e){this.color=void 0,this.width=0,this.color=a,this.width=e}static style(a,e){return new S(a,e)}getColor(){return this.color}setColor(a){this.color=a}getWidth(){return this.width}setWidth(a){this.width=a}}x.GridStyle=S},48145:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.GridUtils=void 0;const O=S(45469),a=S(77250),e=S(3053),l=S(71695),p=S(59784),m=S(19298);x.GridUtils=class c{static getPixel(s,o,u,d){d=d.toMeters(),u=u.toMeters();const v=this.getXPixel(s,u,d.getLongitude()),g=this.getYPixel(o,u,d.getLatitude());return new m.Pixel(v,g)}static getXPixel(s,o,u){const d=(o=o.toMeters()).getMaxLongitude()-o.getMinLongitude();return(u-o.getMinLongitude())/d*s}static getYPixel(s,o,u){const d=(o=o.toMeters()).getMaxLatitude()-o.getMinLatitude();return(o.getMaxLatitude()-u)/d*s}static getBounds(s,o,u){const d=this.tilesPerSide(u),v=this.tileSize(d);return a.Bounds.meters(-1*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH+s*v,O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-(o+1)*v,-1*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH+(s+1)*v,O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-o*v)}static tilesPerSide(s){return Math.pow(2,s)}static tileSize(s){return 2*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/s}static getZoomLevel(s){s=s.toMeters();const o=Math.min(s.getWidth(),s.getHeight());return Math.log(2*O.GeometryConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/o)/Math.log(2)}static toUnit(s,o,u,d){let v=null;return v=s===d?e.Point.point(o,u,d):this.toUnitOpposite(o,u,d),v}static toUnitOpposite(s,o,u){let d;switch(u){case l.Unit.DEGREE:d=O.GeometryUtils.metersToDegreesCoord(s,o);break;case l.Unit.METER:d=O.GeometryUtils.degreesToMetersCoord(s,o);break;default:throw new Error("Unsupported unit: "+u)}return e.Point.pointFromPoint(d,u)}static isOmittedBandLetter(s){return s===p.GridConstants.BAND_LETTER_OMIT_I||s===p.GridConstants.BAND_LETTER_OMIT_O}static precisionBefore(s,o){let u=0;return Math.abs(s)>=o?u=s-(s%o+o)%o:s<0&&(u=-o),u}static precisionAfter(s,o){return this.precisionBefore(s+o,o)}static lineIntersection(s,o){return this.intersection(s.getPoint1(),s.getPoint2(),o.getPoint1(),o.getPoint2())}static intersection(s,o,u,d){let v;const g=O.GeometryUtils.intersection(s.toMeters(),o.toMeters(),u.toMeters(),d.toMeters());return null!=g&&(v=e.Point.pointFromPoint(g,l.Unit.METER).toUnit(s.getUnit())),v}}},82932:(Q,x)=>{"use strict";var O;Object.defineProperty(x,"__esModule",{value:!0}),x.Hemisphere=void 0,(O=x.Hemisphere||(x.Hemisphere={}))[O.NORTH=0]="NORTH",O[O.SOUTH=1]="SOUTH"},26182:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.HemisphereUtils=void 0;const O=S(82932);class a{static fromLatitude(l){return l>=0?O.Hemisphere.NORTH:O.Hemisphere.SOUTH}static from(l){return a.fromLatitude(l.getLatitude())}}x.HemisphereUtils=a},68465:(Q,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Label=void 0,x.Label=class S{constructor(a,e,l){this.name=a,this.center=e,this.bounds=l}getName(){return this.name}setName(a){this.name=a}getCenter(){return this.center}setCenter(a){this.center=a}getBounds(){return this.bounds}setBounds(a){this.bounds=a}}},38170:(Q,x)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Labeler=void 0,x.Labeler=class S{constructor(a,e,l,p,m,c){this.enabled=!1,this.minZoom=0,this.maxZoom=void 0,this.color=void 0,this.textSize=0,this.buffer=0,this.enabled=a,this.minZoom=e,this.maxZoom=l,this.color=p,this.textSize=m,this.buffer=c}isEnabled(){return this.enabled}setEnabled(a){this.enabled=a}getMinZoom(){return this.minZoom}setMinZoom(a){this.minZoom=a}getMaxZoom(){return this.maxZoom}hasMaxZoom(){return null!=this.maxZoom}setMaxZoom(a){this.maxZoom=a}isWithin(a){return a>=this.minZoom&&(null==this.maxZoom||a<=this.maxZoom)}getColor(){return this.color}setColor(a){this.color=a}getTextSize(){return this.textSize}setTextSize(a){this.textSize=a}getBuffer(){return this.buffer}setBuffer(a){if(a<0||a>=.5)throw new Error("Grid edge buffer must be >= 0 and < 0.5. buffer: "+a);this.buffer=a}}},77250:(Q,x,S)=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.Bounds=void 0;const O=S(45469),a=S(71695),e=S(3053),l=S(80858),p=S(48145),m=S(50524);class c extends O.GeometryEnvelope{constructor(){super(...arguments),this.unit=a.Unit.DEGREE}static bounds(s,o,u,d,v){const g=new c(s,o,u,d);return g.unit=v,g}static degrees(s,o,u,d){return this.bounds(s,o,u,d,a.Unit.DEGREE)}static meters(s,o,u,d){return this.bounds(s,o,u,d,a.Unit.METER)}static boundsFromCorners(s,o){const u=new c(s.getLongitude(),s.getLatitude(),o.getLongitude(),o.getLatitude());if(u.unit=s.getUnit(),!u.isUnit(o.getUnit()))throw new Error("Points are in different units. southwest: "+u.unit+", northeast: "+o.getUnit());return u}static boundsFromBounds(s){return c.boundsFromEnvelope(s,s.unit)}static boundsFromEnvelope(s,o){const u=new c(s);return u.unit=o,u}getMinLongitude(){return this.minX}setMinLongitude(s){this.minX=s}getMinLatitude(){return this.minY}setMinLatitude(s){this.minY=s}getMaxLongitude(){return this.maxX}setMaxLongitude(s){this.maxX=s}getMaxLatitude(){return this.maxY}setMaxLatitude(s){this.maxY=s}getWest(){return this.getMinLongitude()}setWest(s){this.setMinLongitude(s)}getSouth(){return this.getMinLatitude()}setSouth(s){this.setMinLatitude(s)}getEast(){return this.getMaxLongitude()}setEast(s){this.setMaxLongitude(s)}getNorth(){return this.getMaxLatitude()}setNorth(s){this.setMaxLatitude(s)}getUnit(){return this.unit}setUnit(s){this.unit=s}isUnit(s){return this.unit===s}isDegrees(){return this.isUnit(a.Unit.DEGREE)}isMeters(){return this.isUnit(a.Unit.METER)}toUnit(s){let o;if(this.isUnit(s))o=this;else{const u=this.getSouthwest().toUnit(s),d=this.getNortheast().toUnit(s);o=c.boundsFromCorners(u,d)}return o}toDegrees(){return this.toUnit(a.Unit.DEGREE)}toMeters(){return this.toUnit(a.Unit.METER)}getCentroidLongitude(){return super.getMidX()}getCentroidLatitude(){let s;return s=this.unit===a.Unit.DEGREE?this.getCentroid().getLatitude():super.getMidY(),s}getCentroid(){let s;return s=this.unit===a.Unit.DEGREE?this.toMeters().getCentroid().toDegrees():e.Point.pointFromPoint(this.centroid,this.unit),s}getWidth(){return this.xRange}getHeight(){return this.yRange}getSouthwest(){return e.Point.point(this.getMinLongitude(),this.getMinLatitude(),this.unit)}getNorthwest(){return e.Point.point(this.getMinLongitude(),this.getMaxLatitude(),this.unit)}getSoutheast(){return e.Point.point(this.getMaxLongitude(),this.getMinLatitude(),this.unit)}getNortheast(){return e.Point.point(this.getMaxLongitude(),this.getMaxLatitude(),this.unit)}overlap(s){const o=super.overlap(s.toUnit(this.unit),!0);return c.boundsFromEnvelope(o,this.unit)}union(s){const o=super.union(s.toUnit(this.unit));return c.boundsFromEnvelope(o,this.unit)}getWestLine(){return l.Line.line(this.getNorthwest(),this.getSouthwest())}getSouthLine(){return l.Line.line(this.getSouthwest(),this.getSoutheast())}getEastLine(){return l.Line.line(this.getSoutheast(),this.getNortheast())}getNorthLine(){return l.Line.line(this.getNortheast(),this.getNorthwest())}toPrecision(s){const o=this.toDegrees(),u=p.GridUtils.precisionBefore(o.getMinLongitude(),s),d=p.GridUtils.precisionBefore(o.getMinLatitude(),s),v=p.GridUtils.precisionAfter(o.getMaxLongitude(),s),g=p.GridUtils.precisionAfter(o.getMaxLatitude(),s);return c.degrees(u,d,v,g)}getPixelRangeFromTile(s){return this.getPixelRange(s.getWidth(),s.getHeight(),s.getBounds())}getPixelRange(s,o,u){u=u.toMeters();const d=p.GridUtils.getPixel(s,o,u,this.getNorthwest()),v=p.GridUtils.getPixel(s,o,u,this.getSoutheast());return new m.PixelRange(d,v)}getLines(){const s=this.getSouthwest(),o=this.getNorthwest(),u=this.getNortheast(),d=this.getSoutheast(),v=[];return v.push(l.Line.line(s,o)),v.push(l.Line.line(o,u)),v.push(l.Line.line(u,d)),v.push(l.Line.line(d,s)),v}copy(){return c.boundsFromBounds(this