geoportal-extensions-leaflet
Version:
French Geoportal Extension for Leaflet
98 lines • 679 kB
JavaScript
/*!
* @brief French Geoportal Extension for Leaflet
*
* This software is released under the licence CeCILL-B (Free BSD compatible)
* @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
* @see http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
* @see http://www.cecill.info/
*
* @copyright copyright (c) IGN
* @license CeCILL-B
* @author IGN
* @version 2.4.3
* @date 29/04/2025
*
*/
/*!
* @overview Proj4Leaflet - Smooth Proj4js integration with Leaflet
* @copyright Copyright (c) 2012, Kartena AB
* @license BSD 2-Clause "Simplified" License
* See https://raw.githubusercontent.com/kartena/Proj4Leaflet/master/LICENSE
* @version 1.0.2
*/
/*!
* @overview leaflet-draw - Vector drawing and editing plugin for Leaflet
* @copyright Copyright (c) 2012-2017 Jon West, Jacob Toye, and Leaflet
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/Leaflet/Leaflet.draw/master/MIT-LICENSE.md
* @version 1.0.4
*/
/*!
* Sortable -- JavaScript library for reorderable drag-and-drop lists on modern
* browsers and touch devices. No jQuery required. Supports Meteor, AngularJS,
* React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap.
*
* Released under MIT LICENSE
*
* Copyright Lebedev Konstantin <ibnRubaXa@gmail.com>
* https://github.com/SortableJS/Sortable
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* @version 1.14.0
*/
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.4
*/
/*!
* @overview Proj4js - Javascript reprojection library.
*
* @authors
* - Mike Adair madairATdmsolutions.ca
* - Richard Greenwood richATgreenwoodmap.com
* - Didier Richard didier.richardATign.fr
* - Stephen Irons stephen.ironsATclear.net.nz
* - Olivier Terral oterralATgmail.com
* - Calvin Metcalf cmetcalfATappgeo.com
*
* @copyright Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/proj4js/proj4js/master/LICENSE.md
* @version 2.7.5
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("leaflet"),require("node-fetch")):"function"==typeof define&&define.amd?define("Gp",["leaflet","require"],e):"object"==typeof exports?exports.Gp=e(require("leaflet"),require("node-fetch")):t.Gp=e(t.L,t[void 0])}(this,(function(t,e){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=49)}([function(e,i){e.exports=t},function(t,e,i){"use strict";(function(t){var i={configuration:{},isConfigLoaded:function(){if(this.configuration&&0!==Object.keys(this.configuration).length)return!0;var e="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==t?t:{};return!!(e.Gp&&e.Gp.Config&&e.Gp.Config.layers&&0!==Object.keys(e.Gp.Config.layers).length)&&(this.configuration=e.Gp.Config,!0)}};e.a=i}).call(this,i(7))},function(t){t.exports=JSON.parse('{"name":"geoportal-extensions","description":"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries","version":"3.0.6","date":"29/04/2025","leafletExtName":"French Geoportal Extension for Leaflet","leafletExtVersion":"2.4.3","olExtName":"French Geoportal Extension for OpenLayers","olExtVersion":"3.4.5","itownsExtName":"French Geoportal Extension for Itowns","itownsExtVersion":"2.5.2","main":"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js","types":"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts","module":"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js","directories":{},"scripts":{"setup":"npm install","clean":"echo \\"Warning: target not yet implemented!\\" && exit 0","eslint":"eslint src/","test":"npm run test:serve","test:serve":"cd test && webpack-dev-server --hot --config webpack.test.serve.js","sample":"npm run sample:serve","sample:serve":"npm run sample:ol:serve","sample:itowns:serve":"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path \'/dist/itowns/\' --port 9001 --open","sample:leaflet:serve":"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path \'/dist/leaflet/\' --port 9001 --open","sample:ol:serve":"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path \'/dist/openlayers/\' --port 9001 --open","generate-types:ol":"npx tsc -p build/types/tsconfig-openlayers.json","generate-types:leaflet":"npx tsc -p build/types/tsconfig-leaflet.json","generate-types:itowns":"npx tsc -p build/types/tsconfig-itowns.json","generate-jsdoc:ol":"jsdoc -c build/jsdoc/jsdoc-openlayers.json","generate-jsdoc:leaflet":"jsdoc -c build/jsdoc/jsdoc-leaflet.json","generate-jsdoc:itowns":"jsdoc -c build/jsdoc/jsdoc-itowns.json","doc":"npm run doc:serve","doc:serve":"npm run doc:ol:serve","doc:itowns:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open","doc:leaflet:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open","doc:ol:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open","build:dev":"npm-run-all --print-label --print-name build:*:dev","build:prod":"npm-run-all --print-label --print-name build:*:prod","build:src":"npm-run-all --print-label --print-name build:*:src","build":"npm-run-all --print-label --print-name build:*:*","build:itowns":"npm-run-all --print-label --print-name build:itowns:*","build:itowns:dev":"webpack --config build/webpack/webpack.config.itowns --mode=development","build:itowns:prod":"webpack --config build/webpack/webpack.config.itowns --mode=production","build:itowns:src":"webpack --config build/webpack/webpack.config.itowns --mode=none","build:ol":"npm-run-all --print-label --print-name build:ol:*","build:ol:dev":"webpack --config build/webpack/webpack.config.openlayers --mode=development","build:ol:prod":"webpack --config build/webpack/webpack.config.openlayers --mode=production","build:ol:src":"webpack --config build/webpack/webpack.config.openlayers --mode=none","build:leaflet":"npm-run-all --print-label --print-name build:leaflet:*","build:leaflet:dev":"webpack --config build/webpack/webpack.config.leaflet --mode=development","build:leaflet:prod":"webpack --config build/webpack/webpack.config.leaflet --mode=production","build:leaflet:src":"webpack --config build/webpack/webpack.config.leaflet --mode=none"},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-extensions.git"},"author":"IGNF","keywords":["geoportail","geoplateforme","javascript","OpenLayers","Leaflet","Itowns","3D"],"license":"CECILL-B","bugs":{"url":"https://github.com/IGNF/geoportal-extensions/issues"},"homepage":"https://github.com/IGNF/geoportal-extensions#readme","dependencies":{"@mapbox/mapbox-gl-style-spec":"13.20.1","eventbusjs":"0.2.0","geoportal-access-lib":"3.4.6","itowns":"2.38.2","leaflet":"1.9.4","leaflet-draw":"1.0.4","loglevel":"^1.6.7","markdown-toc":"^1.2.0","ol":"6.9.0","ol-mapbox-style":"6.7.0","proj4":"2.7.5","proj4leaflet":"1.0.2","sortablejs":"1.14.0","three":"0.137.5","typescript":"^4.5.5","whatwg-fetch":"3.0.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-transform-template-literals":"^7.7.4","@babel/preset-env":"^7.4.4","babel-loader":"^8.0.5","chai":"^4.2.0","chalk":"^4.0.0","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.0.3","core-js":"^3.6.4","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-loader":"^4.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","exports-loader":"^0.7.0","expose-loader":"^0.7.5","fs-extra":"^9.0.0","handlebars":"^4.7.5","handlebars-layouts":"^3.1.4","html-webpack-plugin":"^4.0.4","jsdoc-webpack-plugin":"^0.3.0","mini-css-extract-plugin":"^0.9.0","mocha":"^7.1.1","mocha-loader":"^5.0.0","npm-run-all":"^4.1.5","optimize-css-assets-webpack-plugin":"^5.0.1","path":"^0.12.7","replace-bundle-webpack-plugin-edited":"^1.0.0","requirejs":"^2.3.6","responsive-loader":"^1.2.0","speed-measure-webpack-plugin":"^1.3.0","string-template":"^1.0.0","style-loader":"^1.1.3","terser-webpack-plugin":"^2.0.0","url-loader":"^4.0.0","webpack":"^4.30.0","webpack-cli":"^3.3.1","webpack-dev-server":"^3.3.1","webpack-node-externals":"^1.7.2"},"packageManager":"yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"}')},function(t,e,i){var n,o;!function(r,s){"use strict";void 0===(o="function"==typeof(n=function(){var t=function(){},e="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],n={},o=null;function r(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(e){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(i){return"debug"===i&&(i="log"),"undefined"!=typeof console&&("trace"===i&&e?s:void 0!==console[i]?r(console,i):void 0!==console.log?r(console,"log"):t)}function l(){for(var e=this.getLevel(),n=0;n<i.length;n++){var o=i[n];this[o]=n<e?t:this.methodFactory(o,e,this.name)}if(this.log=this.debug,"undefined"==typeof console&&e<this.levels.SILENT)return"No console available for logging"}function c(t){return function(){"undefined"!=typeof console&&(l.call(this),this[t].apply(this,arguments))}}function u(t,e,i){return a(t)||c.apply(this,arguments)}function h(t,e){var r,s,a,c=this,h="loglevel";function d(){var t;if("undefined"!=typeof window&&h){try{t=window.localStorage[h]}catch(t){}if(void 0===t)try{var e=window.document.cookie,i=encodeURIComponent(h),n=e.indexOf(i+"=");-1!==n&&(t=/^([^;]+)/.exec(e.slice(n+i.length+1))[1])}catch(t){}return void 0===c.levels[t]&&(t=void 0),t}}function p(t){var e=t;if("string"==typeof e&&void 0!==c.levels[e.toUpperCase()]&&(e=c.levels[e.toUpperCase()]),"number"==typeof e&&e>=0&&e<=c.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?h+=":"+t:"symbol"==typeof t&&(h=void 0),c.name=t,c.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},c.methodFactory=e||u,c.getLevel=function(){return null!=a?a:null!=s?s:r},c.setLevel=function(t,e){return a=p(t),!1!==e&&function(t){var e=(i[t]||"silent").toUpperCase();if("undefined"!=typeof window&&h){try{return void(window.localStorage[h]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(h)+"="+e+";"}catch(t){}}}(a),l.call(c)},c.setDefaultLevel=function(t){s=p(t),d()||c.setLevel(t,!1)},c.resetLevel=function(){a=null,function(){if("undefined"!=typeof window&&h){try{window.localStorage.removeItem(h)}catch(t){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),l.call(c)},c.enableAll=function(t){c.setLevel(c.levels.TRACE,t)},c.disableAll=function(t){c.setLevel(c.levels.SILENT,t)},c.rebuild=function(){if(o!==c&&(r=p(o.getLevel())),l.call(c),o===c)for(var t in n)n[t].rebuild()},r=p(o?o.getLevel():"WARN");var m=d();null!=m&&(a=p(m)),l.call(c)}(o=new h).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=n[t];return e||(e=n[t]=new h(t,o.methodFactory)),e};var d="undefined"!=typeof window?window.log:void 0;return o.noConflict=function(){return"undefined"!=typeof window&&window.log===o&&(window.log=d),o},o.getLoggers=function(){return n},o.default=o,o})?n.call(e,i,e,t):n)||(t.exports=o)}()},function(t,e,i){"use strict";function n(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.getOwnPropertyDescriptors&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&"function"==typeof e.freeze?e.freeze(t):t}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var r=n({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});var s=n({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var a=n({script:!1,style:!1,textarea:!0,title:!0});function l(t){return t===c.HTML}var c=n({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),u=Object.keys(c).map((function(t){return c[t]}));var h=n({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.assign=function(t,e){if(null===t||"object"!=typeof t)throw new TypeError("target is not an object");for(var i in e)o(e,i)&&(t[i]=e[i]);return t},e.find=function(t,e,i){if(void 0===i&&(i=Array.prototype),t&&"function"==typeof i.find)return i.find.call(t,e);for(var n=0;n<t.length;n++)if(o(t,n)){var r=t[n];if(e.call(void 0,r,n,t))return r}},e.freeze=n,e.HTML_BOOLEAN_ATTRIBUTES=r,e.HTML_RAW_TEXT_ELEMENTS=a,e.HTML_VOID_ELEMENTS=s,e.hasDefaultHTMLNamespace=function(t){return l(t)||t===c.XML_XHTML_APPLICATION},e.hasOwn=o,e.isHTMLBooleanAttribute=function(t){return o(r,t.toLowerCase())},e.isHTMLRawTextElement=function(t){var e=t.toLowerCase();return o(a,e)&&!a[e]},e.isHTMLEscapableRawTextElement=function(t){var e=t.toLowerCase();return o(a,e)&&a[e]},e.isHTMLMimeType=l,e.isHTMLVoidElement=function(t){return o(s,t.toLowerCase())},e.isValidMimeType=function(t){return u.indexOf(t)>-1},e.MIME_TYPE=c,e.NAMESPACE=h},function(t){t.exports=JSON.parse('{"_from":"geoportal-access-lib@3.4.6","_id":"geoportal-access-lib@3.4.6","_inBundle":false,"_integrity":"sha512-TC0NKVHcJZ9QvkEDyuMB327lT0xQIcZoIE3aSNOHN4Bkt1TcF+D/zAMQTl2AVTAYdrLAqFl6bhTWn5r7VJvkpw==","_location":"/geoportal-access-lib","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"geoportal-access-lib@3.4.6","name":"geoportal-access-lib","escapedName":"geoportal-access-lib","rawSpec":"3.4.6","saveSpec":null,"fetchSpec":"3.4.6"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.4.6.tgz","_shasum":"39654a962e7cc994d44bf5e2a521a2397907daf0","_spec":"geoportal-access-lib@3.4.6","_where":"/home/runner/work/geoportal-extensions/geoportal-extensions","author":{"name":"IGNF"},"bugs":{"url":"https://github.com/IGNF/geoportal-access-lib/issues"},"bundleDependencies":false,"date":"19/12/2024","dependencies":{"@xmldom/xmldom":"^0.9.6","es6-promise":"^4.2.4","node-fetch":"^2.6.1"},"deprecated":false,"description":"French Geoportal resources access library","devDependencies":{"@babel/core":"^7.12.10","@babel/plugin-transform-template-literals":"^7.12.1","@babel/preset-env":"^7.12.11","babel-loader":"^8.2.2","chai":"^4.1.2","clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^5.1.2","eslint":"^7.18.0","eslint-config-standard":"^16.0.2","eslint-loader":"^4.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^5.0.0","glob":"^7.1.2","handlebars-layouts":"^3.1.4","handlebars-webpack-plugin":"^1.4.1","html-webpack-plugin":"^4.5.2","instant-mocha":"^1.5.3","istanbul-instrumenter-loader":"^3.0.1","jsdoc-webpack-plugin":"^0.3.0","loglevel":"^1.6.1","mocha":"^8.4.0","mocha-loader":"^5.1.5","mochawesome":"^6.2.1","nyc":"^15.1.0","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","sinon":"^9.2.4","sinon-es6":"0.0.3","speed-measure-webpack-plugin":"^1.4.2","string-template":"^1.0.0","terser-webpack-plugin":"^4.2.3","webpack":"^4.47.0","webpack-cli":"^3.3.12","webpack-dev-server":"^3.11.2","webpack-node-externals":"^2.5.2","webpack-shell-plugin":"^0.5.0"},"engines":{"node":">=20"},"homepage":"https://github.com/IGNF/geoportal-access-lib#readme","keywords":["geoplateforme","geoportail","webservice","javascript","es6"],"license":"CECILL-B","main":"dist/GpServices-src.js","module":"src/Gp.js","name":"geoportal-access-lib","nyc":{"include":["src/**/*.js"],"instrument":false,"sourceMap":false},"repository":{"type":"git","url":"git+https://github.com/IGNF/geoportal-access-lib.git"},"scripts":{"build":"webpack --mode=none","build:dev":"webpack --mode=development","build:prod":"webpack --mode=production","clean":"echo \\"Warning: no yet implemented!\\" && exit 0","cover":"nyc --reporter=lcov --reporter=text npm run test","doc":"npm run doc:serve","doc:serve":"webpack-dev-server --content-base jsdoc --port 9001 --open","eslint":"eslint src/","sample":"npm run sample:serve","sample:serve":"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path \'/dist/\' --port 9001 --open","sample:serve:dev":"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path \'/dist/\' --port 9001 --open","sample:serve:prod":"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path \'/dist/\' --port 9001 --open","setup":"npm install","test":"npx instant-mocha --mode=development --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\"test_*.js\\" test/spec/","test:end-to-end:serve":"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js","test:end-to-end:serve:docker":"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js","test:serve":"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js","test:serve:docker":"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js"},"version":"3.4.6"}')},function(t,e,i){"use strict";function n(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var o=i(4).freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),r=Object.keys(o);function s(t){return"number"==typeof t&&t>=1&&t<=25}function a(t,e){var i;s(t)?(this.name=r[t],this.message=e||""):(this.message=t,this.name="string"==typeof(i=e)&&i.substring(i.length-o.Error.length)===o.Error?e:o.Error),Error.captureStackTrace&&Error.captureStackTrace(this,a)}n(a,!0),Object.defineProperties(a.prototype,{code:{enumerable:!0,get:function(){var t=r.indexOf(this.name);return s(t)?t:0}}});for(var l={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},c=Object.entries(l),u=0;u<c.length;u++){a[c[u][0]]=c[u][1]}function h(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,h)}n(h),e.DOMException=a,e.DOMExceptionName=o,e.ExceptionCode=l,e.ParseError=h},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){(function(e){t.exports=e.proj4=i(47)}).call(this,i(7))},function(t,i){t.exports=e},function(t,e,i){"use strict";var n=i(4);e.assign=n.assign,e.hasDefaultHTMLNamespace=n.hasDefaultHTMLNamespace,e.isHTMLMimeType=n.isHTMLMimeType,e.isValidMimeType=n.isValidMimeType,e.MIME_TYPE=n.MIME_TYPE,e.NAMESPACE=n.NAMESPACE;var o=i(6);e.DOMException=o.DOMException,e.DOMExceptionName=o.DOMExceptionName,e.ExceptionCode=o.ExceptionCode,e.ParseError=o.ParseError;var r=i(11);e.Attr=r.Attr,e.CDATASection=r.CDATASection,e.CharacterData=r.CharacterData,e.Comment=r.Comment,e.Document=r.Document,e.DocumentFragment=r.DocumentFragment,e.DocumentType=r.DocumentType,e.DOMImplementation=r.DOMImplementation,e.Element=r.Element,e.Entity=r.Entity,e.EntityReference=r.EntityReference,e.LiveNodeList=r.LiveNodeList,e.NamedNodeMap=r.NamedNodeMap,e.Node=r.Node,e.NodeList=r.NodeList,e.Notation=r.Notation,e.ProcessingInstruction=r.ProcessingInstruction,e.Text=r.Text,e.XMLSerializer=r.XMLSerializer;var s=i(44);e.DOMParser=s.DOMParser,e.normalizeLineEndings=s.normalizeLineEndings,e.onErrorStopParsing=s.onErrorStopParsing,e.onWarningStopParsing=s.onWarningStopParsing},function(t,e,i){"use strict";var n=i(4),o=n.find,r=n.hasDefaultHTMLNamespace,s=n.hasOwn,a=n.isHTMLMimeType,l=n.isHTMLRawTextElement,c=n.isHTMLVoidElement,u=n.MIME_TYPE,h=n.NAMESPACE,d=Symbol(),p=i(6),m=p.DOMException,f=p.DOMExceptionName,g=i(12);function _(t){if(t!==d)throw new TypeError("Illegal constructor")}function v(t){return""!==t}function y(t,e){return s(t,e)||(t[e]=!0),t}function E(t){if(!t)return[];var e=function(t){return t?t.split(/[\t\n\f\r ]+/).filter(v):[]}(t);return Object.keys(e.reduce(y,{}))}function w(t){if(!g.QName_exact.test(t))throw new m(m.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function b(t,e){w(e),t=t||null;var i=null,o=e;if(e.indexOf(":")>=0){var r=e.split(":");i=r[0],o=r[1]}if(null!==i&&null===t)throw new m(m.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===i&&t!==n.NAMESPACE.XML)throw new m(m.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===i||"xmlns"===e)&&t!==n.NAMESPACE.XMLNS)throw new m(m.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===n.NAMESPACE.XMLNS&&"xmlns"!==i&&"xmlns"!==e)throw new m(m.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,i,o]}function C(t,e){for(var i in t)s(t,i)&&(e[i]=t[i])}function M(t,e){var i=t.prototype;if(!(i instanceof e)){function n(){}n.prototype=e.prototype,C(i,n=new n),t.prototype=i=n}i.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),i.constructor=t)}var P={},L=P.ELEMENT_NODE=1,S=P.ATTRIBUTE_NODE=2,x=P.TEXT_NODE=3,I=P.CDATA_SECTION_NODE=4,T=P.ENTITY_REFERENCE_NODE=5,G=P.ENTITY_NODE=6,R=P.PROCESSING_INSTRUCTION_NODE=7,D=P.COMMENT_NODE=8,k=P.DOCUMENT_NODE=9,A=P.DOCUMENT_TYPE_NODE=10,N=P.DOCUMENT_FRAGMENT_NODE=11,O=P.NOTATION_NODE=12,U=n.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function j(t){return t.guid||(t.guid=Math.random()),t.guid}function F(){}function q(t,e){this._node=t,this._refresh=e,B(this)}function B(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var i=t._refresh(t._node);if(St(t,"length",i.length),!t.$$length||i.length<t.$$length)for(var n=i.length;n in t;n++)s(t,n)&&delete t[n];C(i,t),t._inc=e}}function z(){}function H(t,e){for(var i=0;i<t.length;){if(t[i]===e)return i;i++}}function W(t,e,i,n){if(n?e[H(e,n)]=i:(e[e.length]=i,e.length++),t){i.ownerElement=t;var o=t.ownerDocument;o&&(n&&J(o,t,n),function(t,e,i){t&&t._inc++,i.namespaceURI===h.XMLNS&&(e._nsMap[i.prefix?i.localName:""]=i.value)}(o,t,i))}}function V(t,e,i){var n=H(e,i);if(n>=0){for(var o=e.length-1;n<=o;)e[n]=e[++n];if(e.length=o,t){var r=t.ownerDocument;r&&J(r,t,i),i.ownerElement=null}}}function Y(){}function X(t){_(t)}function Z(t){return("<"==t?"<":">"==t&&">")||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function K(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(K(t,e))return!0}while(t=t.nextSibling)}function Q(t,e){_(t);var i=e||{};this.ownerDocument=this,this.contentType=i.contentType||u.XML_APPLICATION,this.type=a(this.contentType)?"html":"xml"}function J(t,e,i,n){t&&t._inc++,i.namespaceURI===h.XMLNS&&delete e._nsMap[i.prefix?i.localName:""]}function $(t,e,i){if(t&&t._inc){t._inc++;var n=e.childNodes;if(i&&!i.nextSibling)n[n.length++]=i;else{for(var o=e.firstChild,r=0;o;)n[r++]=o,o=o.nextSibling;n.length=r,delete n[n.length]}}}function tt(t,e){if(t!==e.parentNode)throw new m(m.NOT_FOUND_ERR,"child's parent is not parent");var i=e.previousSibling,n=e.nextSibling;return i?i.nextSibling=n:t.firstChild=n,n?n.previousSibling=i:t.lastChild=i,$(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function et(t){return t&&t.nodeType===X.DOCUMENT_TYPE_NODE}function it(t){return t&&t.nodeType===X.ELEMENT_NODE}function nt(t){return t&&t.nodeType===X.TEXT_NODE}function ot(t,e){var i=t.childNodes||[];if(o(i,it)||et(e))return!1;var n=o(i,et);return!(e&&n&&i.indexOf(n)>i.indexOf(e))}function rt(t,e){var i=t.childNodes||[];if(o(i,(function(t){return it(t)&&t!==e})))return!1;var n=o(i,et);return!(e&&n&&i.indexOf(n)>i.indexOf(e))}function st(t,e,i){if(!function(t){return t&&(t.nodeType===X.DOCUMENT_NODE||t.nodeType===X.DOCUMENT_FRAGMENT_NODE||t.nodeType===X.ELEMENT_NODE)}(t))throw new m(m.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(i&&i.parentNode!==t)throw new m(m.NOT_FOUND_ERR,"child not in parent");if(!function(t){return t&&(t.nodeType===X.CDATA_SECTION_NODE||t.nodeType===X.COMMENT_NODE||t.nodeType===X.DOCUMENT_FRAGMENT_NODE||t.nodeType===X.DOCUMENT_TYPE_NODE||t.nodeType===X.ELEMENT_NODE||t.nodeType===X.PROCESSING_INSTRUCTION_NODE||t.nodeType===X.TEXT_NODE)}(e)||et(e)&&t.nodeType!==X.DOCUMENT_NODE)throw new m(m.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function at(t,e,i){var n=t.childNodes||[],r=e.childNodes||[];if(e.nodeType===X.DOCUMENT_FRAGMENT_NODE){var s=r.filter(it);if(s.length>1||o(r,nt))throw new m(m.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===s.length&&!ot(t,i))throw new m(m.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(it(e)&&!ot(t,i))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(et(e)){if(o(n,et))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=o(n,it);if(i&&n.indexOf(a)<n.indexOf(i))throw new m(m.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!i&&a)throw new m(m.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function lt(t,e,i){var n=t.childNodes||[],r=e.childNodes||[];if(e.nodeType===X.DOCUMENT_FRAGMENT_NODE){var s=r.filter(it);if(s.length>1||o(r,nt))throw new m(m.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===s.length&&!rt(t,i))throw new m(m.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(it(e)&&!rt(t,i))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(et(e)){if(o(n,(function(t){return et(t)&&t!==i})))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=o(n,it);if(i&&n.indexOf(a)<n.indexOf(i))throw new m(m.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function ct(t,e,i,n){st(t,e,i),t.nodeType===X.DOCUMENT_NODE&&(n||at)(t,e,i);var o=e.parentNode;if(o&&o.removeChild(e),e.nodeType===N){var r=e.firstChild;if(null==r)return e;var s=e.lastChild}else r=s=e;var a=i?i.previousSibling:t.lastChild;r.previousSibling=a,s.nextSibling=i,a?a.nextSibling=r:t.firstChild=r,null==i?t.lastChild=s:i.previousSibling=s;do{r.parentNode=t}while(r!==s&&(r=r.nextSibling));return $(t.ownerDocument||t,t,e),e.nodeType==N&&(e.firstChild=e.lastChild=null),e}function ut(t){_(t),this._nsMap=Object.create(null)}function ht(t){_(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function dt(t){_(t)}function pt(t){_(t)}function mt(t){_(t)}function ft(t){_(t)}function gt(t){_(t)}function _t(t){_(t)}function vt(t){_(t)}function yt(t){_(t)}function Et(t){_(t)}function wt(t){_(t)}function bt(){}function Ct(t){var e=[],i=this.nodeType===k&&this.documentElement||this,n=i.prefix,o=i.namespaceURI;if(o&&null==n&&null==(n=i.lookupPrefix(o)))var r=[{namespace:o,prefix:null}];return Lt(this,e,t,r),e.join("")}function Mt(t,e,i){var n=t.prefix||"",o=t.namespaceURI;if(!o)return!1;if("xml"===n&&o===h.XML||o===h.XMLNS)return!1;for(var r=i.length;r--;){var s=i[r];if(s.prefix===n)return s.namespace!==o}return!0}function Pt(t,e,i){t.push(" ",e,'="',i.replace(/[<>&"\t\n\r]/g,Z),'"')}function Lt(t,e,i,n){n||(n=[]);var o="html"===(t.nodeType===k?t:t.ownerDocument).type;if(i){if(!(t=i(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case L:var r=t.attributes,s=r.length,a=t.firstChild,u=t.tagName,d=u;if(!o&&!t.prefix&&t.namespaceURI){for(var p,m=0;m<r.length;m++)if("xmlns"===r.item(m).name){p=r.item(m).value;break}if(!p)for(var f=n.length-1;f>=0;f--){if(""===(_=n[f]).prefix&&_.namespace===t.namespaceURI){p=_.namespace;break}}if(p!==t.namespaceURI)for(f=n.length-1;f>=0;f--){var _;if((_=n[f]).namespace===t.namespaceURI){_.prefix&&(d=_.prefix+":"+u);break}}}e.push("<",d);for(var v=0;v<s;v++){"xmlns"==(y=r.item(v)).prefix?n.push({prefix:y.localName,namespace:y.value}):"xmlns"==y.nodeName&&n.push({prefix:"",namespace:y.value})}for(v=0;v<s;v++){var y,E,w;if(Mt(y=r.item(v),0,n))Pt(e,(E=y.prefix||"")?"xmlns:"+E:"xmlns",w=y.namespaceURI),n.push({prefix:E,namespace:w});Lt(y,e,i,n)}if(u===d&&Mt(t,0,n))Pt(e,(E=t.prefix||"")?"xmlns:"+E:"xmlns",w=t.namespaceURI),n.push({prefix:E,namespace:w});var b=!a;if(b&&(o||t.namespaceURI===h.HTML)&&(b=c(u)),b)e.push("/>");else{if(e.push(">"),o&&l(u))for(;a;)a.data?e.push(a.data):Lt(a,e,i,n.slice()),a=a.nextSibling;else for(;a;)Lt(a,e,i,n.slice()),a=a.nextSibling;e.push("</",d,">")}return;case k:case N:for(a=t.firstChild;a;)Lt(a,e,i,n.slice()),a=a.nextSibling;return;case S:return Pt(e,t.name,t.value);case x:return e.push(t.data.replace(/[<&>]/g,Z));case I:return e.push(g.CDATA_START,t.data,g.CDATA_END);case D:return e.push(g.COMMENT_START,t.data,g.COMMENT_END);case A:var C=t.publicId,M=t.systemId;return e.push(g.DOCTYPE_DECL_START," ",t.name),C?(e.push(" ",g.PUBLIC," ",C),M&&"."!==M&&e.push(" ",M)):M&&"."!==M&&e.push(" ",g.SYSTEM," ",M),t.internalSubset&&e.push(" [",t.internalSubset,"]"),void e.push(">");case R:return e.push("<?",t.target," ",t.data,"?>");case T:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function St(t,e,i){t[e]=i}F.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t){for(var e=[],i=0;i<this.length;i++)Lt(this[i],e,t);return e.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}},F.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},q.prototype.item=function(t){return B(this),this[t]||null},M(q,F),z.prototype={length:0,item:F.prototype.item,getNamedItem:function(t){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());for(var e=0;e<this.length;){var i=this[e];if(i.nodeName===t)return i;e++}return null},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!==this._ownerElement)throw new m(m.INUSE_ATTRIBUTE_ERR);var i=this.getNamedItemNS(t.namespaceURI,t.localName);return i===t?t:(W(this._ownerElement,this,t,i),i)},setNamedItemNS:function(t){return this.setNamedItem(t)},removeNamedItem:function(t){var e=this.getNamedItem(t);if(!e)throw new m(m.NOT_FOUND_ERR,t);return V(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var i=this.getNamedItemNS(t,e);if(!i)throw new m(m.NOT_FOUND_ERR,t?t+" : "+e:e);return V(this._ownerElement,this,i),i},getNamedItemNS:function(t,e){t||(t=null);for(var i=0;i<this.length;){var n=this[i];if(n.localName===e&&n.namespaceURI===t)return n;i++}return null}},z.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},Y.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,i){var n=u.XML_APPLICATION;t===h.HTML?n=u.XML_XHTML_APPLICATION:t===h.SVG&&(n=u.XML_SVG_IMAGE);var o=new Q(d,{contentType:n});if(o.implementation=this,o.childNodes=new F,o.doctype=i||null,i&&o.appendChild(i),e){var r=o.createElementNS(t,e);o.appendChild(r)}return o},createDocumentType:function(t,e,i,n){w(t);var o=new gt(d);return o.name=t,o.nodeName=t,o.publicId=e||"",o.systemId=i||"",o.internalSubset=n||"",o.childNodes=new F,o},createHTMLDocument:function(t){var e=new Q(d,{contentType:u.HTML});if(e.implementation=this,e.childNodes=new F,!1!==t){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var i=e.createElement("html");e.appendChild(i);var n=e.createElement("head");if(i.appendChild(n),"string"==typeof t){var o=e.createElement("title");o.appendChild(e.createTextNode(t)),n.appendChild(o)}i.appendChild(e.createElement("body"))}return e}},X.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var t=this.getRootNode();return t&&t.nodeType===t.DOCUMENT_NODE},contains:function(t){if(!t)return!1;var e=t;do{if(this===e)return!0;e=t.parentNode}while(e);return!1},getRootNode:function(t){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(t){if(!t)return!1;if(this.nodeType!==t.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==t.name)return!1;if(this.publicId!==t.publicId)return!1;if(this.systemId!==t.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==t.namespaceURI)return!1;if(this.prefix!==t.prefix)return!1;if(this.localName!==t.localName)return!1;if(this.attributes.length!==t.attributes.length)return!1;for(var e=0;e<this.attributes.length;e++){var i=this.attributes.item(e);if(!i.isEqualNode(t.getAttributeNodeNS(i.namespaceURI,i.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==t.namespaceURI)return!1;if(this.localName!==t.localName)return!1;if(this.value!==t.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==t.target||this.data!==t.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==t.data)return!1}if(this.childNodes.length!==t.childNodes.length)return!1;for(e=0;e<this.childNodes.length;e++)if(!this.childNodes[e].isEqualNode(t.childNodes[e]))return!1;return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return ct(this,t,e)},replaceChild:function(t,e){ct(this,t,e,lt),e&&this.removeChild(e)},removeChild:function(t){return tt(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,i,n){var o=new i.constructor(d);for(var r in i)if(s(i,r)){var a=i[r];"object"!=typeof a&&a!=o[r]&&(o[r]=a)}i.childNodes&&(o.childNodes=new F);switch(o.ownerDocument=e,o.nodeType){case L:var l=i.attributes,c=o.attributes=new z,u=l.length;c._ownerElement=o;for(var h=0;h<u;h++)o.setAttributeNode(t(e,l.item(h),!0));break;case S:n=!0}if(n)for(var p=i.firstChild;p;)o.appendChild(t(e,p,n)),p=p.nextSibling;return o}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==x&&t.nodeType==x?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},lookupPrefix:function(t){for(var e=this;e;){var i=e._nsMap;if(i)for(var n in i)if(s(i,n)&&i[n]===t)return n;e=e.nodeType==S?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var i=e._nsMap;if(i&&s(i,t))return i[t];e=e.nodeType==S?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)},compareDocumentPosition:function(t){if(this===t)return 0;var e=t,i=this,n=null,o=null;if(e instanceof ht&&(e=(n=e).ownerElement),i instanceof ht&&(i=(o=i).ownerElement,n&&e&&i===e))for(var r,s=0;r=i.attributes[s];s++){if(r===n)return U.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+U.DOCUMENT_POSITION_PRECEDING;if(r===o)return U.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+U.DOCUMENT_POSITION_FOLLOWING}if(!e||!i||i.ownerDocument!==e.ownerDocument)return U.DOCUMENT_POSITION_DISCONNECTED+U.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(j(i.ownerDocument)>j(e.ownerDocument)?U.DOCUMENT_POSITION_FOLLOWING:U.DOCUMENT_POSITION_PRECEDING);if(o&&e===i)return U.DOCUMENT_POSITION_CONTAINS+U.DOCUMENT_POSITION_PRECEDING;if(n&&e===i)return U.DOCUMENT_POSITION_CONTAINED_BY+U.DOCUMENT_POSITION_FOLLOWING;for(var a=[],l=e.parentNode;l;){if(!o&&l===i)return U.DOCUMENT_POSITION_CONTAINED_BY+U.DOCUMENT_POSITION_FOLLOWING;a.push(l),l=l.parentNode}a.reverse();for(var c=[],u=i.parentNode;u;){if(!n&&u===e)return U.DOCUMENT_POSITION_CONTAINS+U.DOCUMENT_POSITION_PRECEDING;c.push(u),u=u.parentNode}c.reverse();var h=function t(e,i){if(i.length<e.length)return t(i,e);var n=null;for(var o in e){if(e[o]!==i[o])return n;n=e[o]}return n}(a,c);for(var d in h.childNodes){var p=h.childNodes[d];if(p===i)return U.DOCUMENT_POSITION_FOLLOWING;if(p===e)return U.DOCUMENT_POSITION_PRECEDING;if(c.indexOf(p)>=0)return U.DOCUMENT_POSITION_FOLLOWING;if(a.indexOf(p)>=0)return U.DOCUMENT_POSITION_PRECEDING}return 0}},C(P,X),C(P,X.prototype),C(U,X),C(U,X.prototype),Q.prototype={implementation:null,nodeName:"#document",nodeType:k,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===N){for(var i=t.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,e),i=n}return t}return ct(this,t,e),t.ownerDocument=this,null===this.documentElement&&t.nodeType===L&&(this.documentElement=t),t},removeChild:function(t){var e=tt(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){ct(this,t,e,lt),t.ownerDocument=this,e&&this.removeChild(e),it(t)&&(this.documentElement=t)},importNode:function(t,e){return function t(e,i,n){var o;switch(i.nodeType){case L:(o=i.cloneNode(!1)).ownerDocument=e;case N:break;case S:n=!0}o||(o=i.cloneNode(!1));if(o.ownerDocument=e,o.parentNode=null,n)for(var r=i.firstChild;r;)o.appendChild(t(e,r,n)),r=r.nextSibling;return o}(this,t,e)},getElementById:function(t){var e=null;return K(this.documentElement,(function(i){if(i.nodeType==L&&i.getAttribute("id")==t)return e=i,!0})),e},createElement:function(t){var e=new ut(d);return e.ownerDocument=this,"html"===this.type&&(t=t.toLowerCase()),r(this.contentType)&&(e.namespaceURI=h.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new F,(e.attributes=new z)._ownerElement=e,e},createDocumentFragment:function(){var t=new Et(d);return t.ownerDocument=this,t.childNodes=new F,t},createTextNode:function(t){var e=new pt(d);return e.ownerDocument=this,e.childNodes=new F,e.appendData(t),e},createComment:function(t){var e=new mt(d);return e.ownerDocument=this,e.childNodes=new F,e.appendData(t),e},createCDATASection:function(t){var e=new ft(d);return e.ownerDocument=this,e.childNodes=new F,e.appendData(t),e},createProcessingInstruction:function(t,e){var i=new wt(d);return i.ownerDocument=this,i.childNodes=new F,i.nodeName=i.target=t,i.nodeValue=i.data=e,i},createAttribute:function(t){if(!g.QName_exact.test(t))throw new m(m.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return"html"===this.type&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new ht(d);return e.ownerDocument=this,e.childNodes=new F,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!g.Name.test(t))throw new m(m.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if("html"===this.type)throw new m("document is an html document",f.NotSupportedError);var e=new yt(d);return e.ownerDocument=this,e.childNodes=new F,e.nodeName=t,e},createElementNS:function(t,e){var i=b(t,e),n=new ut(d),o=n.attributes=new z;return n.childNodes=new F,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=i[0],n.prefix=i[1],n.localName=i[2],o._ownerElement=n,n},createAttributeNS:function(t,e){var i=b(t,e),n=new ht(d);return n.ownerDocument=this,n.childNodes=new F,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=i[0],n.prefix=i[1],n.localName=i[2],n}},M(Q,X),ut.prototype={nodeType:L,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===h.HTML},hasAttributes:function(){return!(!this.attributes||!this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var i=this.getAttributeNode(t);i?i.value=i.nodeValue=""+e:((i=this.ownerDocument._createAttribute(t)).value=i.nodeValue=""+e,this.setAttributeNode(i))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);return i?i.value:null},setAttributeNS:function(t,e,i){var n=b(t,e)[2],o=this.getAttributeNodeNS(t,n);o?o.value=o.nodeValue=""+i:((o=this.ownerDocument.createAttributeNS(t,e)).value=o.nodeValue=""+i,this.setAttributeNode(o))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=E(t);return new q(this,(function(i){var n=[];return e.length>0&&K(i,(function(o){if(o!==i&&o.nodeType===L){var r=o.getAttribute("class");if(r){var s=t===r;if(!s){var a=E(r);s=e.every((l=a,function(t){return l&&-1!==l.indexOf(t)}))}s&&n.push(o)}}var l})),n}))},getElementsByTagName:function(t){var e="html"===(this.nodeType===k?this:this.ownerDocument).type,i=t.toLowerCase();return new q(this,(function(n){var o=[];return K(n,(function(r){r!==n&&r.nodeType===L&&(("*"===t||r.getQualifiedName()===(e&&r.namespaceURI===h.HTML?i:t))&&o.push(r))})),o}))},getElementsByTagNameNS:function(t,e){return new q(this,(function(i){var n=[];return K(i,(function(o){o===i||o.nodeType!==L||"*"!==t&&o.namespaceURI!==t||"*"!==e&&o.localName!=e||n.push(o)})),n}))}},Q.prototype.getElementsByClassName=ut.prototype.getElementsByClassName,Q.prototype.getElementsByTagName=ut.prototype.getElementsByTagName,Q.prototype.getElementsByTagNameNS=ut.prototype.getElementsByTagNameNS,M(ut,X),ht.prototype.nodeType=S,M(ht,X),dt.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,i){i=this.data.substring(0,t)+i+this.data.substring(t+e),this.nodeValue=this.data=i,this.length=i.length}},M(dt,X),pt.prototype={nodeName:"#text",nodeType:x,splitText:function(t){var e=this.data,i=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},M(pt,dt),mt.prototype={nodeName:"#comment",nodeType:D},M(mt,dt),ft.prototype={nodeName:"#cdata-section",nodeType:I},M(ft,pt),gt.prototype.nodeType=A,M(gt,X),_t.prototype.nodeType=O,M(_t,X),vt.prototype.nodeType=G,M(vt,X),yt.prototype.nodeType=T,M(yt,X),Et.prototype.nodeName="#document-fragment",Et.prototype.nodeType=N,M(Et,X),wt.prototype.nodeType=R,M(wt,dt),bt.prototype.serializeToString=function(t,e){return Ct.call(t,e)},X.prototype.toString=Ct;try{if(Object.defineProperty){Object.defineProperty(q.prototype,"length",{get:function(){return B(this),this.$$length}}),Object.defineProperty(X.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case L:case N:var i=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&i.push(t(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case L:case N:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),St=function(t,e,i){t["$$"+e]=i}}}catch(t){}e._updateLiveList=B,e.Attr=ht,e.CDATASection=ft,e.CharacterData=dt,e.Comment=mt,e.Document=Q,e.DocumentFragment=Et,e.DocumentType=gt,e.DOMImplementation=Y,e.Element=ut,e.Entity=vt,e.EntityReference=yt,e.LiveNodeList=q,e.NamedNodeMap=z,e.Node=X,e.NodeList=F,e.Notation=_t,e.Text=pt,e.ProcessingInstruction=wt,e.XMLSerializer=bt},function(t,e,i){"use strict";function n(t){try{"function"!=typeof t&&(t=RegExp);var e=new t("𝌆","u").exec("𝌆");return!!e&&2===e[0].length}catch(t){}return!1}var o=n();function r(t){if("["!==t.source[0])throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function s(t,e){if("["!==t.source[0])throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||"string"!=typeof e)throw new Error(JSON.stringify(e)+" is not a valid search");if(-1===t.source.indexOf(e))throw new Error('"'+e+'" is not is /'+t.source+"/");if("-"===e&&1!==t.source.indexOf(e))throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),o?"u":"")}function a(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map((function(t){var i="string"==typeof t;if(i&&void 0===e&&"|"===t)throw new Error("use regg instead of reg to wrap expressions with `|`!");return i?t:t.source})).join(""),o?"mu":"m")}function l(t){if(0===arguments.length)throw new Error("no parameters provided");return a.apply(l,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var c=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;o&&(c=a("[",r(c),"\\u{10000}-\\u{10FFFF}","]"));var u=/[\x20\x09\x0D\x0A]/,h=r(u),d=a(u,"+"),p=a(u,"*"),m=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;o&&(m=a("[",r(m),"\\u{10000}-\\u{10FFFF}","]"));var f=a("[",r(m),r(/[-.0-9\xB7]/),r(/[\u0300-\u036F\u203F-\u2040]/),"]"),g=a(m,f,"*"),_=a(f,"+"),v=a("&",g,";"),y=l(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),E=l(v,"|",y),w=a("%",g,";"),b=l(a('"',l(/[^%&"]/,"|",w,"|",E),"*",'"'),"|",a("'",l(/[^%&']/,"|",w,"|",E),"*","'")),C=l('"',l(/[^<&"]/,"|",E),"*",'"',"|","'",l(/[^<&']/,"|",E),"*","'"),M=a(s(m,":"),s(f,":"),"*"),P=a(M,l(":",M),"?"),L=a("^",P,"$"),S=a("(",P,")"),x=l(/"[^"]*"|'[^']*'/),I=a(/^<\?/,"(",g,")",l(d,"(",c,"*?)"),"?",/\?>/),T=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,G=l('"',T,'*"',"|","'",s(T,"'"),"*'"),R=a("\x3c!--",l(s(c,"-"),"|",a("-",s(c,"-"))),"*","--\x3e"),D=l(a(/\(/,p,"#PCDATA",l(p,/\|/,p,P),"*",p,/\)\*/),"|",a(/\(/,p,"#PCDATA",p,/\)/)),k=l("EMPTY","|","ANY","|",D,"|",a(/\([^>]+\)/,/[?*+]?/)),A=a("<!ELEMENT",d,l(P,"|",w),d,l(k,"|",w),p,">"),N=a("NOTATION",d,/\(/,p,g,l(p,/\|/,p,g),"*",p,/\)/),O=a(/\(/,p,_,l(p,/\|/,p,_),"*",p,/\)/),U=l(N,"|",O),j=l(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",U),F=l(/#REQUIRED|#IMPLIED/,"|",l(l("#FIXED",d),"?",C)),q=a("<!ATTLIST",d,g,l(d,g,d,j,d,F),"*",p,">"),B=l('"about:legacy-compat"',"|","'about:legacy-compat'"),z=l(l("SYSTEM",d,x),"|",l("PUBLIC",d,G,d,x)),H=a("^",l(l("SYSTEM",d,"(?<SystemLiteralOnly>",x,")"),"|",l("PUBLIC",d,"(?<PubidLiteral>",G,")",d,"(?<SystemLiteral>",x,")"))),W=l(d,"NDATA",d,g),V=a("<!ENTITY",d,g,d,l(b,"|",l(z,W,"?")),p,">"),Y=l(b,"|",z),X=l(V,"|",a("<!ENTITY",d,"%",d,g,d,Y,p,">")),Z=a("PUBLIC",d,G),K=a("<!NOTATION",d,g,d,l(z,"|",Z),p,">"),Q=a(p,"=",p),J=/1[.]\d+/,$=a(d,"version",Q,l("'",J,"'","|",'"',J,'"')),tt=/[A-Za-z][-A-Za-z0-9._]*/,et=a(/^<\?xml/,$,l(d,"encoding",Q,l('"',tt,'"',"|","'",tt,"'")),"?",l(d,"standalone",Q,l("'",l("yes","|","no"),"'","|",'"',l("yes","|","no"),'"')),"?",p,/\?>/),it=a(c,"*?",/\]\]>/),nt=a(/<!\[CDATA\[/,it);e.chars=r,e.chars_without=s,e.detectUnicodeSupport=n,e.reg=a,e.regg=l,e.ABOUT_LEGACY_COMPAT="about:legacy-compat",e.ABOUT_LEGACY_COMPAT_SystemLiteral=B,e.AttlistDecl=q,e.CDATA_START="<![CDATA[",e.CDATA_END="]]>",e.CDSect=nt,e.Char=c,e.Comment=R,e.COMMENT_START="\x3c!--",e.COMMENT_END="--\x3e",e.DOCTYPE_DECL_START="<!DOCTYPE",e.elementdecl=A,e.EntityDecl=X,e.EntityValue=b,e.ExternalID=z,e.ExternalID_match=H,e.Name=g,e.NotationDecl=K,e.Reference=E,e.PEReference=w,e.PI=I,e.PUBLIC="PUBLIC",e.PubidLiteral=G,e.QName=P,e.QName_exact=L,e.QName_group=S,e.S=d,e.SChar_s=h,e.S_OPT=p,e.SYSTEM="SYSTEM",e.SystemLiteral=x,e.UNICODE_REPLACEMENT_CHARACTER="�",e.UNICODE_SUPPORT=o,e.XMLDecl=et},function(t,e){!function(t,e,i){var n;L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),n=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(n,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,n=e.clientY;this._startPoint.call(this,i,n)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,n=e.clientY;this._endPoint.call(this,i,n,t),this._clickHandled=null},_endPoint:function(e,i,n){if(this._mouseDownOrigin){var o=L.point(e,i).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(n.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(n.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(n.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,n=t.originalEvent;!n.touches||!n.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=n.touches[0].clientX,i=n.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var n=this._map.latLngToContainerPoint(i.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=n.distanceTo(r)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,n,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),s=this.options.guidelineDistance,a=this.options.maxGuideLineLength,l=r>a?r-a:s;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)i=l/r,n={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(o=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(o,n)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,i=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=i?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var i,n,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=o-(e?2:1),n=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[i].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[i].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=n*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?i&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(i)*(this.options.factor||1):this._measurementRunningTotal||0:i&&e?this._measurementRunningTotal+this._map.distance(e,i)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,n=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:n.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,n=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var r="";n&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,n=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=n+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler((function(t){t.addHooks()}))},removeHooks:function(){this._eachVertexHandler((function(t){t.removeHooks()}))},updateMarkers:function(){this._eachVertexHandler((function(t){t.updateMarkers()}))},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,i){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,i&&i.drawError&&(i.drawError=L.Util.extend({},this.options.drawError,i.drawError)),this._latlngs=e,L.setOptions(this,i)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,n,o,r,s=this._defaultShape();for(t=0,i=s.length;t<i;t++)(n=this._createMarker(s[t],t)).on("click",this._onMarkerClick,this),n.on("contextmenu",this._onContextMenu,this),this._markers.push(n);for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return i._origLatLng=t,i._index=e,i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(i),i},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,i=this._poly,n=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),i.options.poly){var o=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){L.extend(e._origLatLng,n),e.setLatLng(n);var r=i.options.color;i.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout((function(){i.setStyle({color:r}),o&&o.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})}),1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var s=this._poly.getLatLngs();this._poly._convertLatLngs(s,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,i=t.target;this._defaultShape().length<e||(this._removeMarker(i),this._updatePrevNext(i._prev,i._next),i._middleLeft&&this._markerGroup.removeLayer(i._middleLeft),i._middleRight&&this._markerGroup.removeLayer(i._middleRight),i._prev&&i._next?this._createMiddleMarker(i._prev,i._next):i._prev?i._next||(i._prev._middleRight=null):i._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly;this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),n=t.target;L.extend(n._origLatLng,i),n._middleLeft&&n._middleLeft.setLatLng(this._getMiddleLatLng(n._prev,n)),n._middleRight&&n._middleRight.setLatLng(this._getMiddleLatLng(n,n._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer((function(i){i._index>t&&(i._index+=e)}))},_createMiddleMarker:function(t,e){var i,n,o,r=this._getMiddleLatLng(t,e),s=this._createMarker(r);s.setOpacity(.6),t._middleRight=e._middleLeft=s,n=function(){s.off("touchmove",n,this);var o=e._index;s._index=o,s.off("click",i,this).on("click",this._onMarkerClick,this),r.lat=s.getLatLng().lat,r.lng=s.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,s),s.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,s),this._updatePrevNext(s,e),this._poly.fire("editstart")},o=function(){s.off("dragstart",n,this),s.off("dragend",o,this),s.off("touchmove",n,this),this._createMiddleMarker(t,s),this._createMiddleMarker(s,e)},i=function(){n.call(this),o.call(this),this._fireEdit()},s.on("click",i,this).on("dragstart",n,this).on("dragend",o,this).on("touchmove",n,this),this._markerGroup.addLayer(s)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,n=i.project(t.getLatLng()),o=i.project(e.getLatLng());return i.unproject(n._add(o)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,i=e.getLatLng();e===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,n=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target._cornerIndex;this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)},_onMarkerDragEnd:function(t){var e,i=t.target;i===this._moveMarker&&(e=this._shape.getBounds().getCenter(),i.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),n=this._shape.getBounds().getCenter(),o=[],r=0,s=i.length;r<s;r++)e=[i[r].lat-n.lat,i[r].lng-n.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook((function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook((function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))})),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var n=this._map.mouseEventToContainerPoint(i),o=this._map.mouseEventToLayerPoint(i),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:n,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){if(this._map._loaded){this._touchEvent(t,"touchstart")}},_onTouchEnd:function(t){if(this._map._loaded){this._touchEvent(t,"touchend")}},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){if(this._map._loaded){this._touchEvent(t,"touchleave")}},_onTouchMove:function(t){if(this._map._loaded){this._touchEvent(t,"touchmove")}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,n=t.length;i<n;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},n={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,n=t.length,o=0,r=Math.PI/180;if(n>2){for(var s=0;s<n;s++)e=t[s],o+=((i=t[(s+1)%n]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(i.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var i=parseFloat(t).toFixed(e),n=L.drawLocal.format&&L.drawLocal.format.numeric,o=n&&n.delimiters,r=o&&o.thousands,s=o&&o.decimal;if(r||s){var a=i.split(".");i=r?a[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):a[0],s=s||".",a.length>1&&(i=i+s+a[1])}return i},readableArea:function(t,e,i){var o,r;return i=L.Util.extend({},n,i),e?(r=["ha","m"],type=typeof e,"string"===type?r=[e]:"boolean"!==type&&(r=e),o=t>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*t,i.km)+" km²":t>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*t,i.ha)+" ha":L.GeometryUtil.formattedNumber(t,i.m)+" m²"):o=(t/=.836127)>=3097600?L.GeometryUtil.formattedNumber(t/3097600,i.mi)+" mi²":t>=4840?L.GeometryUtil.formattedNumber(t/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(t,i.yd)+" yd²",o},readableDistance:function(t,e,i,o,r){var s;switch(r=L.Util.extend({},n,r),e?"string"==typeof e?e:"metric":i?"feet":o?"nauticalMile":"yards"){case"metric":s=t>1e3?L.GeometryUtil.formattedNumber(t/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(t,r.m)+" m";break;case"feet":t*=3.28083,s=L.GeometryUtil.formattedNumber(t,r.ft)+" ft";break;case"nauticalMile":t*=.53996,s=L.GeometryUtil.formattedNumber(t/1e3,r.nm)+" nm";break;case"yards":default:s=(t*=1.09361)>1760?L.GeometryUtil.formattedNumber(t/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(t,r.yd)+" yd"}return s},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}}),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,n){return this._checkCounterclockwise(t,i,n)!==this._checkCounterclockwise(e,i,n)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,n)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,n=this._getProjectedPoints(),o=n?n.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=n[t-1],i=n[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),n=i?i.length:0,o=i?i[n-1]:null,r=n-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,n){var o,r,s=this._getProjectedPoints();n=n||0;for(var a=i;a>n;a--)if(o=s[a-1],r=s[a],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i<e.length;i++)t.push(this._map.latLngToLayerPoint(e[i]));return t}}),L.Polygon.include({intersects:function(){var t,e,i,n,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],i=o[t-1],n=t-2,this._lineSegmentsIntersectsRange(i,e,n,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),n=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(n||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),n=!0),i.appendChild(e));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook((function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))})),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),n=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,n++,o,r[e].title);if(n)return this._lastButtonIndex=--n,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,i=this._actionButtons.length;e<i;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,i,n,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:n+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=i,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),i=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(i),t.title&&(e.title=t.title,i.innerHTML=t.title),t.text&&(e.innerHTML=t.text,i.innerHTML=t.text);var n=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,n,t.callback,t.context),e},_disposeButton:function(t,e){var i=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,i,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,n,o,r=this._actionsContainer,s=this.getActions(t),a=s.length;for(i=0,n=this._actionButtons.length;i<n;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<a;l++)"enabled"in s[l]&&!s[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:s[l].title,text:s[l].text,container:e,callback:s[l].callback,context:s[l].context}),this._actionButtons.push({button:o,callback:s[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,i=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=i+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,n=t.layer||t.target||t;this._backupLayer(n),this.options.poly&&(i=L.Util.extend({},this.options.poly),n.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=n.options.color,e.fillColor=n.options.fillColor),n.options.original=L.extend({},n.options),n.options.editing=e),n instanceof L.Marker?(n.editing&&n.editing.enable(),n.dragging.enable(),n.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):n.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),n=this._map.layerPointToLatLng(i);t.target.setLatLng(n)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){(function(e,i){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var n;n=function(){"use strict";function t(t){return"function"==typeof t}var n=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=0,r=void 0,s=void 0,a=function(t,e){m[o]=t,m[o+1]=e,2===(o+=2)&&(s?s(f):E())},l="undefined"!=typeof window?window:void 0,c=l||{},u=c.MutationObserver||c.WebKitMutationObserver,h="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var t=setTimeout;return function(){return t(f,1)}}var m=new Array(1e3);function f(){for(var t=0;t<o;t+=2)(0,m[t])(m[t+1]),m[t]=void 0,m[t+1]=void 0;o=0}var g,_,v,y,E=void 0;function w(t,e){var i=this,n=new this.constructor(M);void 0===n[C]&&k(n);var o=i._state;if(o){var r=arguments[o-1];a((function(){return R(o,n,r,i._result)}))}else T(i,n,t,e);return n}function b(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(M);return L(e,t),e}h?E=function(){return e.nextTick(f)}:u?(_=0,v=new u(f),y=document.createTextNode(""),v.observe(y,{characterData:!0}),E=function(){y.data=_=++_%2}):d?((g=new MessageChannel).port1.onmessage=f,E=function(){return g.port2.postMessage(0)}):E=void 0===l?function(){try{var t=Function("return this")().require("vertx");return void 0!==(r=t.runOnLoop||t.runOnContext)?function(){r(f)}:p()}catch(t){return p()}}():p();var C=Math.random().toString(36).substring(2);function M(){}function P(e,i,n){i.constructor===e.constructor&&n===w&&i.constructor.resolve===b?function(t,e){1===e._state?x(t,e._result):2===e._state?I(t,e._result):T(e,void 0,(function(e){return L(t,e)}),(function(e){return I(t,e)}))}(e,i):void 0===n?x(e,i):t(n)?function(t,e,i){a((function(t){var n=!1,o=function(t,e,i,n){try{t.call(e,i,n)}catch(t){return t}}(i,e,(function(i){n||(n=!0,e!==i?L(t,i):x(t,i))}),(function(e){n||(n=!0,I(t,e))}),t._label);!n&&o&&(n=!0,I(t,o))}),t)}(e,i,n):x(e,i)}function L(t,e){if(t===e)I(t,new TypeError("You cannot resolve a promise with itself"));else if(function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}(e)){var i=void 0;try{i=e.then}catch(e){return void I(t,e)}P(t,e,i)}else x(t,e)}function S(t){t._onerror&&t._onerror(t._result),G(t)}function x(t,e){void 0===t._state&&(t._result=e,t._state=1,0!==t._subscribers.length&&a(G,t))}function I(t,e){void 0===t._state&&(t._state=2,t._result=e,a(S,t))}function T(t,e,i,n){var o=t._subscribers,r=o.length;t._onerror=null,o[r]=e,o[r+1]=i,o[r+2]=n,0===r&&t._state&&a(G,t)}function G(t){var e=t._subscribers,i=t._state;if(0!==e.length){for(var n=void 0,o=void 0,r=t._result,s=0;s<e.length;s+=3)n=e[s],o=e[s+i],n?R(i,n,o,r):o(r);t._subscribers.length=0}}function R(e,i,n,o){var r=t(n),s=void 0,a=void 0,l=!0;if(r){try{s=n(o)}catch(t){l=!1,a=t}if(i===s)return void I(i,new TypeError("A promises callback cannot return that same promise."))}else s=o;void 0!==i._state||(r&&l?L(i,s):!1===l?I(i,a):1===e?x(i,s):2===e&&I(i,s))}var D=0;function k(t){t[C]=D++,t._state=void 0,t._result=void 0,t._subscribers=[]}var A=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(M),this.promise[C]||k(this.promise),n(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&x(this.promise,this._result))):I(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;void 0===this._state&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,n=i.resolve;if(n===b){var o=void 0,r=void 0,s=!1;try{o=t.then}catch(t){s=!0,r=t}if(o===w&&void 0!==t._state)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(i===N){var a=new i(M);s?I(a,r):P(a,t,o),this._willSettleAt(a,e)}else this._willSettleAt(new i((function(e){return e(t)})),e)}else this._willSettleAt(n(t),e)},t.prototype._settledAt=function(t,e,i){var n=this.promise;void 0===n._state&&(this._remaining--,2===t?I(n,i):this._result[e]=i),0===this._remaining&&x(n,this._result)},t.prototype._willSettleAt=function(t,e){var i=this;T(t,void 0,(function(t){return i._settledAt(1,e,t)}),(function(t){return i._settledAt(2,e,t)}))},t}(),N=function(){function e(t){this[C]=D++,this._result=this._state=void 0,this._subscribers=[],M!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){L(t,e)}),(function(e){I(t,e)}))}catch(e){I(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var i=this.constructor;return t(e)?this.then((function(t){return i.resolve(e()).then((function(){return t}))}),(function(t){return i.resolve(e()).then((function(){throw t}))})):this.then(e,e)},e}();return N.prototype.then=w,N.all=function(t){return new A(this,t).promise},N.race=function(t){var e=this;return n(t)?new e((function(i,n){for(var o=t.length,r=0;r<o;r++)e.resolve(t[r]).then(i,n)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))},N.resolve=b,N.reject=function(t){var e=new this(M);return I(e,t),e},N._setScheduler=function(t){s=t},N._setAsap=function(t){a=t},N._asap=a,N.polyfill=function(){var t=void 0;if(void 0!==i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=N},N.Promise=N,N},t.exports=n()}).call(this,i(43),i(7))},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e){var i,n,o=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!u){var t=a(d);u=!0;for(var e=c.length;e;){for(l=c,c=[];++h<e;)l&&l[h].run();h=-1,e=c.length}l=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function f(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];c.push(new m(t,e)),1!==c.length||u||a(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=f,o.addListener=f,o.once=f,o.off=f,o.removeListener=f,o.removeAllListeners=f,o.emit=f,o.prependListener=f,o.prependOnceListener=f,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,i){"use strict";var n=i(4),o=i(11),r=i(6),s=i(45),a=i(46),l=o.DOMImplementation,c=n.hasDefaultHTMLNamespace,u=n.isHTMLMimeType,h=n.isValidMimeType,d=n.MIME_TYPE,p=n.NAMESPACE,m=r.ParseError,f=a.XMLReader;function g(t){return t.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028\u2029]/g,"\n")}function _(t){if(void 0===(t=t||{}).locator&&(t.locator=!0),this.assign=t.assign||n.assign,this.domHandler=t.domHandler||v,this.onError=t.onError||t.errorHandler,t.errorHandler&&"function"!=typeof t.errorHandler)throw new TypeError("errorHandler object is no longer supported, switch to onError!");t.errorHandler&&t.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=t.normalizeLineEndings||g,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}function v(t){var e=t||{};this.mimeType=e.mimeType||d.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function y(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function E(t,e,i){return"string"==typeof t?t.substr(e,i):t.length>=e+i||e?new java.lang.String(t,e,i)+"":t}function w(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}_.prototype.parseFromString=function(t,e){if(!h(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var i=this.assign(Object.create(null),this.xmlns),o=s.XML_ENTITIES,r=i[""]||null;c(e)?(o=s.HTML_ENTITIES,r=p.HTML):e===d.XML_SVG_IMAGE&&(r=p.SVG),i[""]=r,i.xml=i.xml||p.XML;var a=new this.domHandler({mimeType:e,defaultNamespace:r,onError:this.onError}),l=this.locator?{}:void 0;this.locator&&a.setDocumentLocator(l);var u=new f;return u.errorHandler=a,u.domBuilder=a,!n.isHTMLMimeType(e)&&"string"!=typeof t&&u.errorHandler.fatalError("source is not a string"),u.parse(this.normalizeLineEndings(String(t)),i,o),a.doc.documentElement||u.errorHandler.fatalError("missing root element"),a.doc},v.prototype={startDocument:function(){var t=new l;this.doc=u(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,i,n){var o=this.doc,r=o.createElementNS(t,i||e),s=n.length;w(this,r),this.currentElement=r,this.locator&&y(this.locator,r);for(var a=0;a<s;a++){t=n.getURI(a);var l=n.getValue(a),c=(i=n.getQName(a),o.createAttributeNS(t,i));this.locator&&y(n.getLocator(a),c),c.value=c.nodeValue=l,r.setAttributeNode(c)}},endElement:function(t,e,i){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var i=this.doc.createProcessingInstruction(t,e);this.locator&&y(this.locator,i),w(this,i)},ignorableWhitespace:function(t,e,i){},characters:function(t,e,i){if(t=E.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(t);else n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&y(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){t&&(t.lineNumber=0),this.locator=t},comment:function(t,e,i){t=E.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&y(this.locator,n),w(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,i,n){var o=this.doc.implementation;if(o&&o.createDocumentType){var r=o.createDocumentType(t,e,i,n);this.locator&&y(this.locator,r),w(this,r),this.doc.doctype=r}},reportError:function(t,e){if("function"==typeof this.onError)try{this.onError(t,e,this)}catch(i){throw new m("Reporting "+t+' "'+e+'" caused '+i,this.locator)}else console.error("[xmldom "+t+"]\t"+e,function(t){if(t)return"\n@#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}(this.locator))},warning:function(t){this.reportError("warning",t)},error:function(t){this.reportError("error",t)},fatalError:function(t){throw this.reportError("fatalError",t),new m(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){v.prototype[t]=function(){return null}})),e.__DOMHandler=v,e.DOMParser=_,e.normalizeLineEndings=g,e.onErrorStopParsing=function(t){if("error"===t)throw"onErrorStopParsing"},e.onWarningStopParsing=function(){throw"onWarningStopParsing"}},function(t,e,i){"use strict";var n=i(4).freeze;e.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),e.entityMap=e.HTML_ENTITIES},function(t,e,i){"use strict";var n=i(4),o=i(12),r=i(6),s=n.isHTMLEscapableRawTextElement,a=n.isHTMLMimeType,l=n.isHTMLRawTextElement,c=n.hasOwn,u=n.NAMESPACE,h=r.ParseError,d=r.DOMException;function p(){}p.prototype={parse:function(t,e,i){var r=this.domBuilder;r.startDocument(),y(e,e=Object.create(null)),function(t,e,i,r,s){var l=a(r.mimeType);t.indexOf(o.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");function u(t){var e=";"===t[t.length-1]?t:t+";";if(!l&&e!==t)return s.error("EntityRef: expecting ;"),t;var n=o.Reference.exec(e);if(!n||n[0].length!==e.length)return s.error("entity not matching Reference production: "+t),t;var r=e.slice(1,-1);return c(i,r)?i[r]:"#"===r.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),i=56320+(1023&t);return String.fromCharCode(e,i)}return String.fromCharCode(t)}(parseInt(r.substring(1).replace("x","0x"))):(s.error("entity not found:"+t),t)}function p(e){if(e>I){var i=t.substring(I,e).replace(m,u);P&&L(I),r.characters(i,0,e-I),I=e}}var y=0,E=0,M=/\r\n?|\n|$/g,P=r.locator;function L(e,i){for(;e>=E&&(i=M.exec(t));)y=E,E=i.index+i[0].length,P.lineNumber++;P.columnNumber=e-y+1}var S=[{currentNSMap:e}],x=[],I=0;for(;;){try{var T=t.indexOf("<",I);if(T<0){if(!l&&x.length>0)return s.fatalError("unclosed xml tag(s): "+x.join(", "));if(!t.substring(I).match(/^\s*$/)){var G=r.doc,R=G.createTextNode(t.substring(I));if(G.documentElement)return s.error("Extra content at the end of the document");G.appendChild(R),r.currentElement=R}return}if(T>I){var D=t.substring(I,T);l||0!==x.length||(D=D.replace(new RegExp(o.S_OPT.source,"g"),""))&&s.error("Unexpected content outside root element: '"+D+"'"),p(T)}switch(t.charAt(T+1)){case"/":var k=t.indexOf(">",T+2),A=t.substring(T+2,k>0?k:void 0);if(!A)return s.fatalError("end tag name missing");var N=k>0&&o.reg("^",o.QName_group,o.S_OPT,"$").exec(A);if(!N)return s.fatalError('end tag name contains invalid characters: "'+A+'"');if(!r.currentElement&&!r.doc.documentElement)return;var O=x[x.length-1]||r.currentElement.tagName||r.doc.documentElement.tagName||"";if(O!==N[1]){var U=N[1].toLowerCase();if(!l||O.toLowerCase()!==U)return s.fatalError('Opening and ending tag mismatch: "'+O+'" != "'+A+'"')}var j=S.pop();x.pop();var F=j.localNSMap;if(r.endElement(j.uri,j.localName,O),F)for(var q in F)c(F,q)&&r.endPrefixMapping(q);k++;break;case"?":P&&L(T),k=b(t,T,r,s);break;case"!":P&&L(T),k=w(t,T,r,s,l);break;default:P&&L(T);var B=new C,z=S[S.length-1].currentNSMap,H=(k=g(t,T,B,z,u,s,l),B.length);if(B.closed||(l&&n.isHTMLVoidElement(B.tagName)?B.closed=!0:x.push(B.tagName)),P&&H){for(var W=f(P,{}),V=0;V<H;V++){var Y=B[V];L(Y.offset),Y.locator=f(P,{})}r.locator=W,_(B,r,z)&&S.push(B),r.locator=P}else _(B,r,z)&&S.push(B);l&&!B.closed?k=v(t,k,B.tagName,u,r):k++}}catch(t){if(t instanceof h)throw t;if(t instanceof d)throw new h(t.name+": "+t.message,r.locator,t);s.error("element parse error: "+t),k=-1}k>I?I=k:p(Math.max(T,I)+1)}}(t,e,i,r,this.errorHandler),r.endDocument()}};var m=/&#?\w+;?/g;function f(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function g(t,e,i,n,o,r,s){function a(t,e,n){return c(i.attributeNames,t)?r.fatalError("Attribute "+t+" redefined"):!s&&e.indexOf("<")>=0?r.fatalError("Unescaped '<' not allowed in attributes values"):void i.addValue(t,e.replace(/[\t\n\r]/g," ").replace(m,o),n)}for(var l,u=++e,h=0;;){var d=t.charAt(u);switch(d){case"=":if(1===h)l=t.slice(e,u),h=3;else{if(2!==h)throw new Error("attribute equal must after attrName");h=3}break;case"'":case'"':if(3===h||1===h){if(1===h&&(r.warning('attribute value must after "="'),l=t.slice(e,u)),e=u+1,!((u=t.indexOf(d,e))>0))throw new Error("attribute value no end '"+d+"' match");a(l,p=t.slice(e,u),e-1),h=5}else{if(4!=h)throw new Error('attribute value must after "="');a(l,p=t.slice(e,u),e),r.warning('attribute "'+l+'" missed start quot('+d+")!!"),e=u+1,h=5}break;case"/":switch(h){case 0:i.setTagName(t.slice(e,u));case 5:case 6:case 7:h=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),0==h&&i.setTagName(t.slice(e,u)),u;case">":switch(h){case 0:i.setTagName(t.slice(e,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=t.slice(e,u)).slice(-1)&&(i.closed=!0,p=p.slice(0,-1));case 2:2===h&&(p=l),4==h?(r.warning('attribute "'+p+'" missed quot(")!'),a(l,p,e)):(s||r.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),a(p,p,e));break;case 3:if(!s)return r.fatalError("AttValue: ' or \" expected")}return u;case"":d=" ";default:if(d<=" ")switch(h){case 0:i.setTagName(t.slice(e,u)),h=6;break;case 1:l=t.slice(e,u),h=2;break;case 4:var p=t.slice(e,u);r.warning('attribute "'+p+'" missed quot(")!!'),a(l,p,e);case 5:h=6}else switch(h){case 2:s||r.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),a(l,l,e),e=u,h=1;break;case 5:r.warning('attribute space is required"'+l+'"!!');case 6:h=1,e=u;break;case 3:h=4,e=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function _(t,e,i){for(var n=t.tagName,o=null,r=t.length;r--;){var s=t[r],a=s.qName,l=s.value;if((m=a.indexOf(":"))>0)var h=s.prefix=a.slice(0,m),d=a.slice(m+1),p="xmlns"===h&&d;else d=a,h=null,p="xmlns"===a&&"";s.localName=d,!1!==p&&(null==o&&(o=Object.create(null),y(i,i=Object.create(null))),i[p]=o[p]=l,s.uri=u.XMLNS,e.startPrefixMapping(p,l))}for(r=t.length;r--;)(s=t[r]).prefix&&("xml"===s.prefix&&(s.uri=u.XML),"xmlns"!==s.prefix&&(s.uri=i[s.prefix]));var m;(m=n.indexOf(":"))>0?(h=t.prefix=n.slice(0,m),d=t.localName=n.slice(m+1)):(h=null,d=t.localName=n);var f=t.uri=i[h||""];if(e.startElement(f,d,n,t),!t.closed)return t.currentNSMap=i,t.localNSMap=o,!0;if(e.endElement(f,d,n),o)for(h in o)c(o,h)&&e.endPrefixMapping(h)}function v(t,e,i,n,o){var r=s(i);if(r||l(i)){var a=t.indexOf("</"+i+">",e),c=t.substring(e+1,a);return r&&(c=c.replace(m,n)),o.characters(c,0,c.length),a}return e+1}function y(t,e){for(var i in t)c(t,i)&&(e[i]=t[i])}function E(t,e){var i=e;function n(e){return e=e||0,t.charAt(i+e)}function r(t){i+=t=t||1}function s(){return t.substring(i)}return{char:n,getIndex:function(){return i},getMatch:function(t){var e=o.reg("^",t).exec(s());return e?(r(e[0].length),e[0]):null},getSource:function(){return t},skip:r,skipBlanks:function(){for(var e=0;i<t.length;){var o=n();if(" "!==o&&"\n"!==o&&"\t"!==o&&"\r"!==o)return e;e++,r()}return-1},substringFromIndex:s,substringStartsWith:function(e){return t.substring(i,i+e.length)===e},substringStartsWithCaseInsensitive:function(e){return t.substring(i,i+e.length).toUpperCase()===e.toUpperCase()}}}function w(t,e,i,n,r){var s=E(t,e);switch(r?s.char(2).toUpperCase():s.char(2)){case"-":var a=s.getMatch(o.Comment);return a?(i.comment(a,o.COMMENT_START.length,a.length-o.COMMENT_START.length-o.COMMENT_END.length),s.getIndex()):n.fatalError("comment is not well-formed at position "+s.getIndex());case"[":var l=s.getMatch(o.CDSect);return l?r||i.currentElement?(i.startCDATA(),i.characters(l,o.CDATA_START.length,l.length-o.CDATA_START.length-o.CDATA_END.length),i.endCDATA(),s.getIndex()):n.fatalError("CDATA outside of element"):n.fatalError("Invalid CDATA starting at position "+e);case"D":if(i.doc&&i.doc.documentElement)return n.fatalError("Doctype not allowed inside or after documentElement at position "+s.getIndex());if(r?!s.substringStartsWithCaseInsensitive(o.DOCTYPE_DECL_START):!s.substringStartsWith(o.DOCTYPE_DECL_START))return n.fatalError("Expected "+o.DOCTYPE_DECL_START+" at position "+s.getIndex());if(s.skip(o.DOCTYPE_DECL_START.length),s.skipBlanks()<1)return n.fatalError("Expected whitespace after "+o.DOCTYPE_DECL_START+" at position "+s.getIndex());var c={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(c.name=s.getMatch(o.Name),!c.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+s.getIndex());if(r&&"html"!==c.name.toLowerCase()&&n.warning("Unexpected DOCTYPE in HTML document at position "+s.getIndex()),s.skipBlanks(),s.substringStartsWith(o.PUBLIC)||s.substringStartsWith(o.SYSTEM)){var u=o.ExternalID_match.exec(s.substringFromIndex());if(!u)return n.fatalError("doctype external id is not well-formed at position "+s.getIndex());void 0!==u.groups.SystemLiteralOnly?c.systemId=u.groups.SystemLiteralOnly:(c.systemId=u.groups.SystemLiteral,c.publicId=u.groups.PubidLiteral),s.skip(u[0].length)}else if(r&&s.substringStartsWithCaseInsensitive(o.SYSTEM)){if(s.skip(o.SYSTEM.length),s.skipBlanks()<1)return n.fatalError("Expected whitespace after "+o.SYSTEM+" at position "+s.getIndex());if(c.systemId=s.getMatch(o.ABOUT_LEGACY_COMPAT_SystemLiteral),!c.systemId)return n.fatalError("Expected "+o.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+o.SYSTEM+" at position "+s.getIndex())}return r&&c.systemId&&!o.ABOUT_LEGACY_COMPAT_SystemLiteral.test(c.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+s.getIndex()),r||(s.skipBlanks(),c.internalSubset=function(t,e){function i(t,e){var i=o.PI.exec(t.substringFromIndex());return i?"xml"===i[1].toLowerCase()?e.fatalError("xml declaration is only allowed at the start of the document, but found at position "+t.getIndex()):(t.skip(i[0].length),i[0]):e.fatalError("processing instruction is not well-formed at position "+t.getIndex())}var n=t.getSource();if("["===t.char()){t.skip(1);for(var r=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),"]"===t.char()){var s=n.substring(r,t.getIndex());return t.skip(1),s}var a=null;if("<"===t.char()&&"!"===t.char(1))switch(t.char(2)){case"E":"L"===t.char(3)?a=t.getMatch(o.elementdecl):"N"===t.char(3)&&(a=t.getMatch(o.EntityDecl));break;case"A":a=t.getMatch(o.AttlistDecl);break;case"N":a=t.getMatch(o.NotationDecl);break;case"-":a=t.getMatch(o.Comment)}else if("<"===t.char()&&"?"===t.char(1))a=i(t,e);else{if("%"!==t.char())return e.fatalError("Error detected in Markup declaration");a=t.getMatch(o.PEReference)}if(!a)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}(s,n)),s.skipBlanks(),">"!==s.char()?n.fatalError("doctype not terminated with > at position "+s.getIndex()):(s.skip(1),i.startDTD(c.name,c.publicId,c.systemId,c.internalSubset),i.endDTD(),s.getIndex());default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function b(t,e,i,n){var r=t.substring(e).match(o.PI);if(!r)return n.fatalError("Invalid processing instruction starting at position "+e);if("xml"===r[1].toLowerCase()){if(e>0)return n.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!o.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return i.processingInstruction(r[1],r[2]),e+r[0].length}function C(){this.attributeNames=Object.create(null)}C.prototype={setTagName:function(t){if(!o.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,i){if(!o.QName_exact.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:i}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=p,e.parseUtils=E,e.parseDoctypeCommentOrCData=w},function(t,e,i){t.exports=function(){"use strict";var t=484813681109536e-20,e=Math.PI/2,i=.017453292519943295,n=57.29577951308232,o=Math.PI/4,r=2*Math.PI,s=3.14159265359,a={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},c=/[\s_\-\/\(\)]/g;function u(t,e){if(t[e])return t[e];for(var i,n=Object.keys(t),o=e.toLowerCase().replace(c,""),r=-1;++r<n.length;)if((i=n[r]).toLowerCase().replace(c,"")===o)return t[i]}var h=function(t){var e,n,o,r={},s=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t}),{}),c={proj:"projName",datum:"datumCode",rf:function(t){r.rf=parseFloat(t)},lat_0:function(t){r.lat0=t*i},lat_1:function(t){r.lat1=t*i},lat_2:function(t){r.lat2=t*i},lat_ts:function(t){r.lat_ts=t*i},lon_0:function(t){r.long0=t*i},lon_1:function(t){r.long1=t*i},lon_2:function(t){r.long2=t*i},alpha:function(t){r.alpha=parseFloat(t)*i},gamma:function(t){r.rectified_grid_angle=parseFloat(t)},lonc:function(t){r.longc=t*i},x_0:function(t){r.x0=parseFloat(t)},y_0:function(t){r.y0=parseFloat(t)},k_0:function(t){r.k0=parseFloat(t)},k:function(t){r.k0=parseFloat(t)},a:function(t){r.a=parseFloat(t)},b:function(t){r.b=parseFloat(t)},r_a:function(){r.R_A=!0},zone:function(t){r.zone=parseInt(t,10)},south:function(){r.utmSouth=!0},towgs84:function(t){r.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){r.to_meter=parseFloat(t)},units:function(t){r.units=t;var e=u(l,t);e&&(r.to_meter=e.to_meter)},from_greenwich:function(t){r.from_greenwich=t*i},pm:function(t){var e=u(a,t);r.from_greenwich=(e||parseFloat(t))*i},nadgrids:function(t){"@null"===t?r.datumCode="none":r.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(r.axis=t)},approx:function(){r.approx=!0}};for(e in s)n=s[e],e in c?"function"==typeof(o=c[e])?o(n):r[o]=n:r[e]=n;return"string"==typeof r.datumCode&&"WGS84"!==r.datumCode&&(r.datumCode=r.datumCode.toLowerCase()),r},d=/\s/,p=/[A-Za-z]/,m=/[A-Za-z84]/,f=/[,\]]/,g=/[\d\.E\-\+]/;function _(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function v(t,e,i){Array.isArray(e)&&(i.unshift(e),e=null);var n=e?{}:t,o=i.reduce((function(t,e){return y(e,t),t}),n);e&&(t[e]=o)}function y(t,e){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(e[i]={},void y(t[0],e[i])):void(e[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in e||(e[i]=[]),void e[i].push(t);var n;switch(Array.isArray(i)||(e[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&y(t[2],e[i]));case"SPHEROID":case"ELLIPSOID":return e[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&y(t[3],e[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void v(e,i,t);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return y(t,e[i]);return v(e,i,t)}}else e[i]=t;else e[i]=!0}else e[t]=!0}function E(t){return.017453292519943295*t}_.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;d.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},_.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(f.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},_.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},_.prototype.number=function(t){if(!g.test(t)){if(f.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},_.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},_.prototype.keyword=function(t){if(m.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!f.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},_.prototype.neutral=function(t){if(p.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(g.test(t))return this.word=t,void(this.state=3);if(!f.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},_.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var w=function(t){var e=new _(t).output(),i=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",i]);var o={};return y(e,o),function(t){if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var e="",i=0,n=t.AXIS.length;i<n;++i){var o=[t.AXIS[i][0].toLowerCase(),t.AXIS[i][1].toLowerCase()];-1!==o[0].indexOf("north")||("y"===o[0]||"lat"===o[0])&&"north"===o[1]?e+="n":-1!==o[0].indexOf("south")||("y"===o[0]||"lat"===o[0])&&"south"===o[1]?e+="s":-1!==o[0].indexOf("east")||("x"===o[0]||"lon"===o[0])&&"east"===o[1]?e+="e":-1===o[0].indexOf("west")&&("x"!==o[0]&&"lon"!==o[0]||"west"!==o[1])||(e+="w")}2===e.length&&(e+="u"),3===e.length&&(t.axis=e)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var r=t.GEOGCS;function s(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(r=t),r&&(r.DATUM?t.datumCode=r.DATUM.name.toLowerCase():t.datumCode=r.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),r.DATUM&&r.DATUM.SPHEROID&&(t.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=r.DATUM.SPHEROID.a,t.rf=parseFloat(r.DATUM.SPHEROID.rf,10)),r.DATUM&&r.DATUM.TOWGS84&&(t.datum_params=r.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",E],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",E],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",E],["lat0","latitude_of_origin",E],["lat0","standard_parallel_1",E],["lat1","standard_parallel_1",E],["lat2","standard_parallel_2",E],["azimuth","Azimuth"],["alpha","azimuth",E],["srsCode","name"]].forEach((function(e){return function(t,e){var i=e[0],n=e[1];!(i in t)&&n in t&&(t[i]=t[n],3===e.length&&(t[i]=e[2](t[i])))}(t,e)})),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=E(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(o),o};function b(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?b[t]=h(arguments[1]):b[t]=w(arguments[1]):b[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?b.apply(e,t):b(t)}));if("string"==typeof t){if(t in b)return b[t]}else"EPSG"in t?b["EPSG:"+t.EPSG]=t:"ESRI"in t?b["ESRI:"+t.ESRI]=t:"IAU2000"in t?b["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(b);var C=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],M=["3857","900913","3785","102113"];function P(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in b}(t))return b[t];if(function(t){return C.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=w(t);if(function(t){var e=u(t,"authority");if(e){var i=u(e,"epsg");return i&&M.indexOf(i)>-1}}(e))return b["EPSG:3857"];var i=function(t){var e=u(t,"extension");if(e)return u(e,"proj4")}(e);return i?h(i):e}return function(t){return"+"===t[0]}(t)?h(t):void 0}var L=function(t,e){var i,n;if(t=t||{},!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t},S=function(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)},x=function(t){return t<0?-1:1},I=function(t){return Math.abs(t)<=s?t:t-x(t)*r},T=function(t,i,n){var o=t*n,r=.5*t;return o=Math.pow((1-o)/(1+o),r),Math.tan(.5*(e-i))/o},G=function(t,i){for(var n,o,r=.5*t,s=e-2*Math.atan(i),a=0;a<=15;a++)if(n=t*Math.sin(s),s+=o=e-2*Math.atan(i*Math.pow((1-n)/(1+n),r))-s,Math.abs(o)<=1e-10)return s;return-9999};function R(t){return t}var D=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=S(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var i,r,s=t.x,a=t.y;if(a*n>90&&a*n<-90&&s*n>180&&s*n<-180)return null;if(Math.abs(Math.abs(a)-e)<=1e-10)return null;if(this.sphere)i=this.x0+this.a*this.k0*I(s-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(o+.5*a));else{var l=Math.sin(a),c=T(this.e,a,l);i=this.x0+this.a*this.k0*I(s-this.long0),r=this.y0-this.a*this.k0*Math.log(c)}return t.x=i,t.y=r,t},inverse:function(t){var i,n,o=t.x-this.x0,r=t.y-this.y0;if(this.sphere)n=e-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var s=Math.exp(-r/(this.a*this.k0));if(-9999===(n=G(this.e,s)))return null}return i=I(this.long0+o/(this.a*this.k0)),t.x=i,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:R,inverse:R,names:["longlat","identity"]}],k={},A=[];function N(t,e){var i=A.length;return t.names?(A[i]=t,t.names.forEach((function(t){k[t.toLowerCase()]=i})),this):(console.log(e),!0)}var O={start:function(){D.forEach(N)},add:N,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==k[e]&&A[k[e]]?A[k[e]]:void 0}},U={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},j=U.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};U.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var F={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},q={};function B(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:q[t]||null,isNull:!1}}function z(t){return t/3600*Math.PI/180}function H(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function W(t){return t.map((function(t){return[z(t.longitudeShift),z(t.latitudeShift)]}))}function V(t,e,i){return{name:H(t,e+8,e+16).trim(),parent:H(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function Y(t,e,i,n){for(var o=e+176,r=[],s=0;s<i.gridNodeCount;s++){var a={latitudeShift:t.getFloat32(o+16*s,n),longitudeShift:t.getFloat32(o+16*s+4,n),latitudeAccuracy:t.getFloat32(o+16*s+8,n),longitudeAccuracy:t.getFloat32(o+16*s+12,n)};r.push(a)}return r}function X(e,i){if(!(this instanceof X))return new X(e);i=i||function(t){if(t)throw t};var n=P(e);if("object"==typeof n){var o=X.projections.get(n.projName);if(o){if(n.datumCode&&"none"!==n.datumCode){var r=u(F,n.datumCode);r&&(n.datum_params=n.datum_params||(r.towgs84?r.towgs84.split(","):null),n.ellps=r.ellipse,n.datumName=r.datumName?r.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var s,a,l,c,h,d,p,m=function(t,e,i,n,o){if(!t){var r=u(U,n);r||(r=j),t=r.a,e=r.b,i=r.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<1e-10)&&(o=!0,e=t),{a:t,b:e,rf:i,sphere:o}}(n.a,n.b,n.rf,n.ellps,n.sphere),f=(s=m.a,a=m.b,m.rf,l=n.R_A,d=((c=s*s)-(h=a*a))/c,p=0,l?(c=(s*=1-d*(.16666666666666666+d*(.04722222222222222+.022156084656084655*d)))*s,d=0):p=Math.sqrt(d),{es:d,e:p,ep2:(c-h)/h}),g=function(t){return void 0===t?null:t.split(",").map(B)}(n.nadgrids),_=n.datum||function(e,i,n,o,r,s,a){var l={};return l.datum_type=void 0===e||"none"===e?5:4,i&&(l.datum_params=i.map(parseFloat),0===l.datum_params[0]&&0===l.datum_params[1]&&0===l.datum_params[2]||(l.datum_type=1),l.datum_params.length>3&&(0===l.datum_params[3]&&0===l.datum_params[4]&&0===l.datum_params[5]&&0===l.datum_params[6]||(l.datum_type=2,l.datum_params[3]*=t,l.datum_params[4]*=t,l.datum_params[5]*=t,l.datum_params[6]=l.datum_params[6]/1e6+1))),a&&(l.datum_type=3,l.grids=a),l.a=n,l.b=o,l.es=r,l.ep2=s,l}(n.datumCode,n.datum_params,m.a,m.b,f.es,f.ep2,g);L(this,n),L(this,o),this.a=m.a,this.b=m.b,this.rf=m.rf,this.sphere=m.sphere,this.es=f.es,this.e=f.e,this.ep2=f.ep2,this.datum=_,this.init(),i(null,this)}else i(e)}else i(e)}function Z(t,i,n){var o,r,s,a,l=t.x,c=t.y,u=t.z?t.z:0;if(c<-e&&c>-1.001*e)c=-e;else if(c>e&&c<1.001*e)c=e;else{if(c<-e)return{x:-1/0,y:-1/0,z:t.z};if(c>e)return{x:1/0,y:1/0,z:t.z}}return l>Math.PI&&(l-=2*Math.PI),r=Math.sin(c),a=Math.cos(c),s=r*r,{x:((o=n/Math.sqrt(1-i*s))+u)*a*Math.cos(l),y:(o+u)*a*Math.sin(l),z:(o*(1-i)+u)*r}}function K(t,e,i,n){var o,r,s,a,l,c,u,h,d,p,m,f,g,_,v,y=t.x,E=t.y,w=t.z?t.z:0;if(o=Math.sqrt(y*y+E*E),r=Math.sqrt(y*y+E*E+w*w),o/i<1e-12){if(_=0,r/i<1e-12)return v=-n,{x:t.x,y:t.y,z:t.z}}else _=Math.atan2(E,y);s=w/r,h=(a=o/r)*(1-e)*(l=1/Math.sqrt(1-e*(2-e)*a*a)),d=s*l,g=0;do{g++,c=e*(u=i/Math.sqrt(1-e*d*d))/(u+(v=o*h+w*d-u*(1-e*d*d))),f=(m=s*(l=1/Math.sqrt(1-c*(2-c)*a*a)))*h-(p=a*(1-c)*l)*d,h=p,d=m}while(f*f>1e-24&&g<30);return{x:_,y:Math.atan(m/Math.abs(p)),z:v}}function Q(t){return 1===t||2===t}X.projections=O,X.projections.start();var J=function(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var n=t.a,o=t.es;if(3===t.datum_type){if(0!==$(t,!1,i))return;n=6378137,o=.0066943799901413165}var r=e.a,s=e.b,a=e.es;return 3===e.datum_type&&(r=6378137,s=6356752.314,a=.0066943799901413165),o!==a||n!==r||Q(t.datum_type)||Q(e.datum_type)?(i=Z(i,o,n),Q(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],o=i[1],r=i[2],s=i[3],a=i[4],l=i[5],c=i[6];return{x:c*(t.x-l*t.y+a*t.z)+n,y:c*(l*t.x+t.y-s*t.z)+o,z:c*(-a*t.x+s*t.y+t.z)+r}}}(i,t.datum_type,t.datum_params)),Q(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],o=i[1],r=i[2],s=i[3],a=i[4],l=i[5],c=i[6],u=(t.x-n)/c,h=(t.y-o)/c,d=(t.z-r)/c;return{x:u+l*h-a*d,y:-l*u+h+s*d,z:a*u-s*h+d}}}(i,e.datum_type,e.datum_params)),i=K(i,a,r,s),3!==e.datum_type||0===$(e,!0,i)?i:void 0):i};function $(t,e,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var o={x:-i.x,y:i.y},r={x:Number.NaN,y:Number.NaN},s=[],a=0;a<t.grids.length;a++){var l=t.grids[a];if(s.push(l.name),l.isNull){r=o;break}if(null!==l.grid){var c=l.grid.subgrids[0],u=(Math.abs(c.del[1])+Math.abs(c.del[0]))/1e4,h=c.ll[0]-u,d=c.ll[1]-u,p=c.ll[0]+(c.lim[0]-1)*c.del[0]+u,m=c.ll[1]+(c.lim[1]-1)*c.del[1]+u;if(!(d>o.y||h>o.x||m<o.y||p<o.x||(r=tt(o,e,c),isNaN(r.x))))break}else if(l.mandatory)return console.log("Unable to find mandatory grid '"+l.name+"'"),-1}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-o.x*n+" "+o.y*n+" tried: '"+s+"'"),-1):(i.x=-r.x,i.y=r.y,0)}function tt(t,e,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var o={x:t.x,y:t.y};o.x-=i.ll[0],o.y-=i.ll[1],o.x=I(o.x-Math.PI)+Math.PI;var r=et(o,i);if(e){if(isNaN(r.x))return n;r.x=o.x-r.x,r.y=o.y-r.y;var s,a,l=9;do{if(a=et(r,i),isNaN(a.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}s={x:o.x-(a.x+r.x),y:o.y-(a.y+r.y)},r.x+=s.x,r.y+=s.y}while(l--&&Math.abs(s.x)>1e-12&&Math.abs(s.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=I(r.x+i.ll[0]),n.y=r.y+i.ll[1]}else isNaN(r.x)||(n.x=t.x+r.x,n.y=t.y+r.y);return n}function et(t,e){var i,n={x:t.x/e.del[0],y:t.y/e.del[1]},o=Math.floor(n.x),r=Math.floor(n.y),s=n.x-1*o,a=n.y-1*r,l={x:Number.NaN,y:Number.NaN};if(o<0||o>=e.lim[0])return l;if(r<0||r>=e.lim[1])return l;i=r*e.lim[0]+o;var c=e.cvs[i][0],u=e.cvs[i][1];i++;var h=e.cvs[i][0],d=e.cvs[i][1];i+=e.lim[0];var p=e.cvs[i][0],m=e.cvs[i][1];i--;var f=e.cvs[i][0],g=e.cvs[i][1],_=s*a,v=s*(1-a),y=(1-s)*(1-a),E=(1-s)*a;return l.x=y*c+v*h+E*f+_*p,l.y=y*u+v*d+E*g+_*m,l}var it=function(t,e,i){var n,o,r,s=i.x,a=i.y,l=i.z||0,c={};for(r=0;r<3;r++)if(!e||2!==r||void 0!==i.z)switch(0===r?(n=s,o=-1!=="ew".indexOf(t.axis[r])?"x":"y"):1===r?(n=a,o=-1!=="ns".indexOf(t.axis[r])?"y":"x"):(n=l,o="z"),t.axis[r]){case"e":c[o]=n;break;case"w":c[o]=-n;break;case"n":c[o]=n;break;case"s":c[o]=-n;break;case"u":void 0!==i[o]&&(c.z=n);break;case"d":void 0!==i[o]&&(c.z=-n);break;default:return null}return c},nt=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e};function ot(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function rt(t,e,o,r){var s;if(Array.isArray(o)&&(o=nt(o)),function(t){ot(t.x),ot(t.y)}(o),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(o=rt(t,s=new X("WGS84"),o,r),t=s),r&&"enu"!==t.axis&&(o=it(t,!1,o)),"longlat"===t.projName)o={x:o.x*i,y:o.y*i,z:o.z||0};else if(t.to_meter&&(o={x:o.x*t.to_meter,y:o.y*t.to_meter,z:o.z||0}),!(o=t.inverse(o)))return;if(t.from_greenwich&&(o.x+=t.from_greenwich),o=J(t.datum,e.datum,o))return e.from_greenwich&&(o={x:o.x-e.from_greenwich,y:o.y,z:o.z||0}),"longlat"===e.projName?o={x:o.x*n,y:o.y*n,z:o.z||0}:(o=e.forward(o),e.to_meter&&(o={x:o.x/e.to_meter,y:o.y/e.to_meter,z:o.z||0})),r&&"enu"!==e.axis?it(e,!0,o):o}var st=X("WGS84");function at(t,e,i,n){var o,r,s;return Array.isArray(i)?(o=rt(t,e,i,n)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof o.z?[o.x,o.y,o.z].concat(i.splice(3)):[o.x,o.y,i[2]].concat(i.splice(3)):[o.x,o.y].concat(i.splice(2)):[o.x,o.y]):(r=rt(t,e,i,n),2===(s=Object.keys(i)).length||s.forEach((function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=i[n]})),r)}function lt(t){return t instanceof X?t:t.oProj?t.oProj:X(t)}function ct(t,e,i){t=lt(t);var n,o=!1;return void 0===e?(e=t,t=st,o=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,e=t,t=st,o=!0),e=lt(e),i?at(t,e,i):(n={forward:function(i,n){return at(t,e,i,n)},inverse:function(i,n){return at(e,t,i,n)}},o&&(n.oProj=e),n)}var ut=65,ht=73,dt=79,pt={forward:mt,inverse:function(t){var e=vt(Et(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:ft};function mt(t,e){return e=e||5,function(t,e){var i,n,o,r,s,a,l,c,u,h,d,p,m,f,g="00000"+t.easting,_="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(u=t.easting,h=t.northing,d=t.zoneNumber,p=yt(d),m=Math.floor(u/1e5),f=Math.floor(h/1e5)%20,i=m,n=f,r="AJSAJS".charCodeAt(o=p-1),s="AFAFAF".charCodeAt(o),c=!1,(a=r+i-1)>90&&(a=a-90+ut-1,c=!0),(a===ht||r<ht&&a>ht||(a>ht||r<ht)&&c)&&a++,(a===dt||r<dt&&a>dt||(a>dt||r<dt)&&c)&&++a===ht&&a++,a>90&&(a=a-90+ut-1),(l=s+n)>86?(l=l-86+ut-1,c=!0):c=!1,(l===ht||s<ht&&l>ht||(l>ht||s<ht)&&c)&&l++,(l===dt||s<dt&&l>dt||(l>dt||s<dt)&&c)&&++l===ht&&l++,l>86&&(l=l-86+ut-1),String.fromCharCode(a)+String.fromCharCode(l))+g.substr(g.length-5,e)+_.substr(_.length-5,e)}(function(t){var e,i,n,o,r,s,a,l=t.lat,c=t.lon,u=6378137,h=gt(l),d=gt(c);a=Math.floor((c+180)/6)+1,180===c&&(a=60),l>=56&&l<64&&c>=3&&c<12&&(a=32),l>=72&&l<84&&(c>=0&&c<9?a=31:c>=9&&c<21?a=33:c>=21&&c<33?a=35:c>=33&&c<42&&(a=37)),s=gt(6*(a-1)-180+3),e=u/Math.sqrt(1-.00669438*Math.sin(h)*Math.sin(h)),i=Math.tan(h)*Math.tan(h),n=.006739496752268451*Math.cos(h)*Math.cos(h),o=Math.cos(h)*(d-s),r=u*(.9983242984503243*h-.002514607064228144*Math.sin(2*h)+2639046602129982e-21*Math.sin(4*h)-3.418046101696858e-9*Math.sin(6*h));var p,m,f=.9996*e*(o+(1-i+n)*o*o*o/6+(5-18*i+i*i+72*n-.39089081163157013)*o*o*o*o*o/120)+5e5,g=.9996*(r+e*Math.tan(h)*(o*o/2+(5-i+9*n+4*n*n)*o*o*o*o/24+(61-58*i+i*i+600*n-2.2240339282485886)*o*o*o*o*o*o/720));return l<0&&(g+=1e7),{northing:Math.round(g),easting:Math.round(f),zoneNumber:a,zoneLetter:(p=l,m="Z",84>=p&&p>=72?m="X":72>p&&p>=64?m="W":64>p&&p>=56?m="V":56>p&&p>=48?m="U":48>p&&p>=40?m="T":40>p&&p>=32?m="S":32>p&&p>=24?m="R":24>p&&p>=16?m="Q":16>p&&p>=8?m="P":8>p&&p>=0?m="N":0>p&&p>=-8?m="M":-8>p&&p>=-16?m="L":-16>p&&p>=-24?m="K":-24>p&&p>=-32?m="J":-32>p&&p>=-40?m="H":-40>p&&p>=-48?m="G":-48>p&&p>=-56?m="F":-56>p&&p>=-64?m="E":-64>p&&p>=-72?m="D":-72>p&&p>=-80&&(m="C"),m)}}({lat:t[1],lon:t[0]}),e)}function ft(t){var e=vt(Et(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function gt(t){return t*(Math.PI/180)}function _t(t){return t/Math.PI*180}function vt(t){var e=t.northing,i=t.easting,n=t.zoneLetter,o=t.zoneNumber;if(o<0||o>60)return null;var r,s,a,l,c,u,h,d,p=6378137,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),f=i-5e5,g=e;n<"N"&&(g-=1e7),u=6*(o-1)-180+3,d=(h=g/.9996/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*h)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*h)+151*m*m*m/96*Math.sin(6*h),r=p/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),s=Math.tan(d)*Math.tan(d),a=.006739496752268451*Math.cos(d)*Math.cos(d),l=.99330562*p/Math.pow(1-.00669438*Math.sin(d)*Math.sin(d),1.5),c=f/(.9996*r);var _=d-r*Math.tan(d)/l*(c*c/2-(5+3*s+10*a-4*a*a-.06065547077041606)*c*c*c*c/24+(61+90*s+298*a+45*s*s-1.6983531815716497-3*a*a)*c*c*c*c*c*c/720);_=_t(_);var v,y=(c-(1+2*s+a)*c*c*c/6+(5-2*a+28*s-3*a*a+.05391597401814761+24*s*s)*c*c*c*c*c/120)/Math.cos(d);if(y=u+_t(y),t.accuracy){var E=vt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});v={top:E.lat,right:E.lon,bottom:_,left:y}}else v={lat:_,lon:y};return v}function yt(t){var e=t%6;return 0===e&&(e=6),e}function Et(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,n=null,o="",r=0;!/[A-Z]/.test(e=t.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+t;o+=e,r++}var s=parseInt(o,10);if(0===r||r+3>i)throw"MGRSPoint bad conversion from: "+t;var a=t.charAt(r++);if(a<="A"||"B"===a||"Y"===a||a>="Z"||"I"===a||"O"===a)throw"MGRSPoint zone letter "+a+" not handled: "+t;n=t.substring(r,r+=2);for(var l=yt(s),c=function(t,e){for(var i="AJSAJS".charCodeAt(e-1),n=1e5,o=!1;i!==t.charCodeAt(0);){if(++i===ht&&i++,i===dt&&i++,i>90){if(o)throw"Bad character: "+t;i=ut,o=!0}n+=1e5}return n}(n.charAt(0),l),u=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i="AFAFAF".charCodeAt(e-1),n=0,o=!1;i!==t.charCodeAt(0);){if(++i===ht&&i++,i===dt&&i++,i>86){if(o)throw"Bad character: "+t;i=ut,o=!0}n+=1e5}return n}(n.charAt(1),l);u<wt(a);)u+=2e6;var h=i-r;if(h%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var d,p,m,f=h/2,g=0,_=0;return f>0&&(d=1e5/Math.pow(10,f),p=t.substring(r,r+f),g=parseFloat(p)*d,m=t.substring(r+f),_=parseFloat(m)*d),{easting:g+c,northing:_+u,zoneLetter:a,zoneNumber:s,accuracy:d}}function wt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function bt(t,e,i){if(!(this instanceof bt))return new bt(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=e,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}bt.fromMGRS=function(t){return new bt(ft(t))},bt.prototype.toMGRS=function(t){return mt([this.x,this.y],t)};var Ct=.01068115234375,Mt=function(t){var e=[];e[0]=1-t*(.25+t*(.046875+t*(.01953125+t*Ct))),e[1]=t*(.75-t*(.046875+t*(.01953125+t*Ct)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e},Pt=function(t,e,i,n){return i*=e,e*=e,n[0]*t-i*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))},Lt=function(t,e,i){for(var n=1/(1-e),o=t,r=20;r;--r){var s=Math.sin(o),a=1-e*s*s;if(o-=a=(Pt(o,s,Math.cos(o),i)-t)*(a*Math.sqrt(a))*n,Math.abs(a)<1e-10)return o}return o},St={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Mt(this.es),this.ml0=Pt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,n,o=t.x,r=t.y,s=I(o-this.long0),a=Math.sin(r),l=Math.cos(r);if(this.es){var c=l*s,u=Math.pow(c,2),h=this.ep2*Math.pow(l,2),d=Math.pow(h,2),p=Math.abs(l)>1e-10?Math.tan(r):0,m=Math.pow(p,2),f=Math.pow(m,2);e=1-this.es*Math.pow(a,2),c/=Math.sqrt(e);var g=Pt(r,a,l,this.en);i=this.a*(this.k0*c*(1+u/6*(1-m+h+u/20*(5-18*m+f+14*h-58*m*h+u/42*(61+179*f-f*m-479*m)))))+this.x0,n=this.a*(this.k0*(g-this.ml0+a*s*c/2*(1+u/12*(5-m+9*h+4*d+u/30*(61+f-58*m+270*h-330*m*h+u/56*(1385+543*f-f*m-3111*m))))))+this.y0}else{var _=l*Math.sin(s);if(Math.abs(Math.abs(_)-1)<1e-10)return 93;if(i=.5*this.a*this.k0*Math.log((1+_)/(1-_))+this.x0,n=l*Math.cos(s)/Math.sqrt(1-Math.pow(_,2)),(_=Math.abs(n))>=1){if(_-1>1e-10)return 93;n=0}else n=Math.acos(n);r<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var i,n,o,r,s=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(i=this.ml0+a/this.k0,n=Lt(i,this.es,this.en),Math.abs(n)<e){var l=Math.sin(n),c=Math.cos(n),u=Math.abs(c)>1e-10?Math.tan(n):0,h=this.ep2*Math.pow(c,2),d=Math.pow(h,2),p=Math.pow(u,2),m=Math.pow(p,2);i=1-this.es*Math.pow(l,2);var f=s*Math.sqrt(i)/this.k0,g=Math.pow(f,2);o=n-(i*=u)*g/(1-this.es)*.5*(1-g/12*(5+3*p-9*h*p+h-4*d-g/30*(61+90*p-252*h*p+45*m+46*h-g/56*(1385+3633*p+4095*m+1574*m*p)))),r=I(this.long0+f*(1-g/6*(1+2*p+h-g/20*(5+28*p+24*m+8*h*p+6*h-g/42*(61+662*p+1320*m+720*m*p))))/c)}else o=e*x(a),r=0;else{var _=Math.exp(s/this.k0),v=.5*(_-1/_),y=this.lat0+a/this.k0,E=Math.cos(y);i=Math.sqrt((1-Math.pow(E,2))/(1+Math.pow(v,2))),o=Math.asin(i),a<0&&(o=-o),r=0===v&&0===E?0:I(Math.atan2(v,E)+this.long0)}return t.x=r,t.y=o,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},xt=function(t){var e=Math.exp(t);return e=(e-1/e)/2},It=function(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),n=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))},Tt=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}(e*(1+e/(It(1,e)+1))),t<0?-e:e},Gt=function(t,e){for(var i,n=2*Math.cos(2*e),o=t.length-1,r=t[o],s=0;--o>=0;)i=n*r-s+t[o],s=r,r=i;return e+i*Math.sin(2*e)},Rt=function(t,e,i){for(var n,o,r=Math.sin(e),s=Math.cos(e),a=xt(i),l=function(t){var e=Math.exp(t);return e=(e+1/e)/2}(i),c=2*s*l,u=-2*r*a,h=t.length-1,d=t[h],p=0,m=0,f=0;--h>=0;)n=m,o=p,d=c*(m=d)-n-u*(p=f)+t[h],f=u*m-o+c*p;return[(c=r*l)*d-(u=s*a)*f,c*f+u*d]},Dt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(St.init.apply(this),this.forward=St.forward,this.inverse=St.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=Gt(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var i,n=2*Math.cos(e),o=t.length-1,r=t[o],s=0;--o>=0;)i=n*r-s+t[o],s=r,r=i;return Math.sin(e)*i}(this.gtu,2*n))},forward:function(t){var e=I(t.x-this.long0),i=t.y;i=Gt(this.cbg,i);var n=Math.sin(i),o=Math.cos(i),r=Math.sin(e),s=Math.cos(e);i=Math.atan2(n,s*o),e=Math.atan2(r*o,It(n,o*s)),e=Tt(Math.tan(e));var a,l,c=Rt(this.gtu,2*i,2*e);return i+=c[0],e+=c[1],Math.abs(e)<=2.623395162778?(a=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(a=1/0,l=1/0),t.x=a,t.y=l,t},inverse:function(t){var e,i,n=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var r=Rt(this.utg,2*o,2*n);o+=r[0],n+=r[1],n=Math.atan(xt(n));var s=Math.sin(o),a=Math.cos(o),l=Math.sin(n),c=Math.cos(n);o=Math.atan2(s*c,It(l,c*a)),n=Math.atan2(l,c*a),e=I(n+this.long0),i=Gt(this.cgb,o)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},kt={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(I(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*i,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Dt.init.apply(this),this.forward=Dt.forward,this.inverse=Dt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},At=function(t,e){return Math.pow((1-t)/(1+t),e)},Nt={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+o)/(Math.pow(Math.tan(.5*this.lat0+o),this.C)*At(this.e*t,this.ratexp))},forward:function(t){var i=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+o),this.C)*At(this.e*Math.sin(n),this.ratexp))-e,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,n=t.y,r=Math.pow(Math.tan(.5*n+o)/this.K,1/this.C),s=20;s>0&&(n=2*Math.atan(r*At(this.e*Math.sin(t.y),-.5*this.e))-e,!(Math.abs(n-t.y)<1e-14));--s)t.y=n;return s?(t.x=i,t.y=n,t):null},names:["gauss"]},Ot={init:function(){Nt.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,n,o;return t.x=I(t.x-this.long0),Nt.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),n=Math.cos(t.x),o=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*n),t.x=o*i*Math.sin(t.x),t.y=o*(this.cosc0*e-this.sinc0*i*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,n,o,r;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,r=Math.sqrt(t.x*t.x+t.y*t.y)){var s=2*Math.atan2(r,this.R2);e=Math.sin(s),i=Math.cos(s),o=Math.asin(i*this.sinc0+t.y*e*this.cosc0/r),n=Math.atan2(t.x*e,r*this.cosc0*i-t.y*this.sinc0*e)}else o=this.phic0,n=0;return t.x=n,t.y=o,Nt.inverse.apply(this,[t]),t.x=I(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ut={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+x(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*S(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/T(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=S(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-e,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,n,o,r,s,a,l=t.x,c=t.y,u=Math.sin(c),h=Math.cos(c),d=I(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=1e-10&&Math.abs(c+this.lat0)<=1e-10?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*u+this.coslat0*h*Math.cos(d)),t.x=this.a*i*h*Math.sin(d)+this.x0,t.y=this.a*i*(this.coslat0*u-this.sinlat0*h*Math.cos(d))+this.y0,t):(n=2*Math.atan(this.ssfn_(c,u,this.e))-e,r=Math.cos(n),o=Math.sin(n),Math.abs(this.coslat0)<=1e-10?(s=T(this.e,c*this.con,this.con*u),a=2*this.a*this.k0*s/this.cons,t.x=this.x0+a*Math.sin(l-this.long0),t.y=this.y0-this.con*a*Math.cos(l-this.long0),t):(Math.abs(this.sinlat0)<1e-10?(i=2*this.a*this.k0/(1+r*Math.cos(d)),t.y=i*o):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*o+this.cosX0*r*Math.cos(d))),t.y=i*(this.cosX0*o-this.sinX0*r*Math.cos(d))+this.y0),t.x=i*r*Math.sin(d)+this.x0,t))},inverse:function(t){var i,n,o,r,s;t.x-=this.x0,t.y-=this.y0;var a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var l=2*Math.atan(a/(2*this.a*this.k0));return i=this.long0,n=this.lat0,a<=1e-10?(t.x=i,t.y=n,t):(n=Math.asin(Math.cos(l)*this.sinlat0+t.y*Math.sin(l)*this.coslat0/a),i=Math.abs(this.coslat0)<1e-10?this.lat0>0?I(this.long0+Math.atan2(t.x,-1*t.y)):I(this.long0+Math.atan2(t.x,t.y)):I(this.long0+Math.atan2(t.x*Math.sin(l),a*this.coslat0*Math.cos(l)-t.y*this.sinlat0*Math.sin(l))),t.x=i,t.y=n,t)}if(Math.abs(this.coslat0)<=1e-10){if(a<=1e-10)return n=this.lat0,i=this.long0,t.x=i,t.y=n,t;t.x*=this.con,t.y*=this.con,o=a*this.cons/(2*this.a*this.k0),n=this.con*G(this.e,o),i=this.con*I(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,a<=1e-10?s=this.X0:(s=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/a),i=I(this.long0+Math.atan2(t.x*Math.sin(r),a*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),n=-1*G(this.e,Math.tan(.5*(e+s)));return t.x=i,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,i,n){return i*=n,Math.tan(.5*(e+t))*Math.pow((1-i)/(1+i),.5*n)}},jt={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,o=2*n-Math.pow(n,2),r=this.e=Math.sqrt(o);this.R=this.k0*i*Math.sqrt(1-o)/(1-o*Math.pow(e,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),a=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+r*e)/(1-r*e));this.K=s-this.alpha*a+this.alpha*r/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(t.x-this.lambda0),s=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(r));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*s+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,o=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),s=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),a=this.lambda0+s/this.alpha,l=0,c=r,u=-1e3,h=0;Math.abs(c-u)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=a,t.y=c,t},names:["somerc"]},Ft={init:function(){var t,n,s,a,l,c,u,h,d,p,m,f,g,_=0,v=0,y=0,E=0,w=0,b=0,C=0;this.no_off=(g="object"==typeof(f=this).PROJECTION?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var P=!1;if("rectified_grid_angle"in this&&(P=!0),M&&(C=this.alpha),P&&(_=this.rectified_grid_angle*i),M||P)v=this.longc;else if(y=this.long1,w=this.lat1,E=this.long2,b=this.lat2,Math.abs(w-b)<=1e-7||(t=Math.abs(w))<=1e-7||Math.abs(t-e)<=1e-7||Math.abs(Math.abs(this.lat0)-e)<=1e-7||Math.abs(Math.abs(b)-e)<=1e-7)throw new Error;var L=1-this.es;n=Math.sqrt(L),Math.abs(this.lat0)>1e-10?(h=Math.sin(this.lat0),s=Math.cos(this.lat0),t=1-this.es*h*h,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/L),this.A=this.B*this.k0*n/t,(l=(a=this.B*n/(s*Math.sqrt(t)))*a-1)<=0?l=0:(l=Math.sqrt(l),this.lat0<0&&(l=-l)),this.E=l+=a,this.E*=Math.pow(T(this.e,this.lat0,h),this.B)):(this.B=1/n,this.A=this.k0,this.E=a=l=1),M||P?(M?(m=Math.asin(Math.sin(C)/a),P||(_=C)):(m=_,C=Math.asin(a*Math.sin(m))),this.lam0=v-Math.asin(.5*(l-1/l)*Math.tan(m))/this.B):(c=Math.pow(T(this.e,w,Math.sin(w)),this.B),u=Math.pow(T(this.e,b,Math.sin(b)),this.B),l=this.E/c,d=(u-c)/(u+c),p=((p=this.E*this.E)-u*c)/(p+u*c),(t=y-E)<-Math.pi?E-=r:t>Math.pi&&(E+=r),this.lam0=I(.5*(y+E)-Math.atan(p*Math.tan(.5*this.B*(y-E))/d)/this.B),m=Math.atan(2*Math.sin(this.B*I(y-this.lam0))/(l-1/l)),_=C=Math.asin(a*Math.sin(m))),this.singam=Math.sin(m),this.cosgam=Math.cos(m),this.sinrot=Math.sin(_),this.cosrot=Math.cos(_),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(a*a-1)/Math.cos(C))),this.lat0<0&&(this.u_0=-this.u_0)),l=.5*m,this.v_pole_n=this.ArB*Math.log(Math.tan(o-l)),this.v_pole_s=this.ArB*Math.log(Math.tan(o+l))},forward:function(t){var i,n,o,r,s,a,l,c,u={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-e)>1e-10){if(i=.5*((s=this.E/Math.pow(T(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/s)),n=.5*(s+a),r=Math.sin(this.B*t.x),o=(i*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(o)-1)<1e-10)throw new Error;c=.5*this.ArB*Math.log((1-o)/(1+o)),a=Math.cos(this.B*t.x),l=Math.abs(a)<1e-7?this.A*t.x:this.ArB*Math.atan2(i*this.cosgam+r*this.singam,a)}else c=t.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*t.y;return this.no_rot?(u.x=l,u.y=c):(l-=this.u_0,u.x=c*this.cosrot+l*this.sinrot,u.y=l*this.cosrot-c*this.sinrot),u.x=this.a*u.x+this.x0,u.y=this.a*u.y+this.y0,u},inverse:function(t){var i,n,o,r,s,a,l,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,i=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((o=Math.exp(-this.BrA*n))-1/o),s=.5*(o+1/o),l=((a=Math.sin(this.BrA*i))*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(l)-1)<1e-10)c.x=0,c.y=l<0?-e:e;else{if(c.y=this.E/Math.sqrt((1+l)/(1-l)),c.y=G(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(r*this.cosgam-a*this.singam,Math.cos(this.BrA*i))}return c.x+=this.lam0,c},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},qt={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),n=S(this.e,e,i),o=T(this.e,this.lat1,e),r=Math.sin(this.lat2),s=Math.cos(this.lat2),a=S(this.e,r,s),l=T(this.e,this.lat2,r),c=T(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(n/a)/Math.log(o/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=1e-10&&(n=x(n)*(e-2e-10));var o,r,s=Math.abs(Math.abs(n)-e);if(s>1e-10)o=T(this.e,n,Math.sin(n)),r=this.a*this.f0*Math.pow(o,this.ns);else{if((s=n*this.ns)<=0)return null;r=0}var a=this.ns*I(i-this.long0);return t.x=this.k0*(r*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(a))+this.y0,t},inverse:function(t){var i,n,o,r,s,a=(t.x-this.x0)/this.k0,l=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(a*a+l*l),n=1):(i=-Math.sqrt(a*a+l*l),n=-1);var c=0;if(0!==i&&(c=Math.atan2(n*a,n*l)),0!==i||this.ns>0){if(n=1/this.ns,o=Math.pow(i/(this.a*this.f0),n),-9999===(r=G(this.e,o)))return null}else r=-e;return s=I(c/this.ns+this.long0),t.x=s,t.y=r,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]},Bt={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,o,r,s,a,l=t.x,c=t.y,u=I(l-this.long0);return e=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),r=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(o)),s=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),t.y=a*Math.cos(s)/1,t.x=a*Math.sin(s)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,o,r,s,a,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),r=Math.sqrt(t.x*t.x+t.y*t.y),o=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/r,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),i=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(e)),t.x=this.long0-i/this.alfa,s=e,a=0;var c=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-t.y)<1e-10&&(a=1),s=t.y,c+=1}while(0===a&&c<15);return c>=15?null:t},names:["Krovak","krovak"]},zt=function(t,e,i,n,o){return t*o-e*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)},Ht=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Wt=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Vt=function(t){return.05859375*t*t*(1+.75*t)},Yt=function(t){return t*t*t*(35/3072)},Xt=function(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)},Zt=function(t){return Math.abs(t)<e?t:t-x(t)*Math.PI},Kt=function(t,e,i,n,o){var r,s;r=t/e;for(var a=0;a<15;a++)if(r+=s=(t-(e*r-i*Math.sin(2*r)+n*Math.sin(4*r)-o*Math.sin(6*r)))/(e-2*i*Math.cos(2*r)+4*n*Math.cos(4*r)-6*o*Math.cos(6*r)),Math.abs(s)<=1e-10)return r;return NaN},Qt={init:function(){this.sphere||(this.e0=Ht(this.es),this.e1=Wt(this.es),this.e2=Vt(this.es),this.e3=Yt(this.es),this.ml0=this.a*zt(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,n=t.x,o=t.y;if(n=I(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(o)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var r=Math.sin(o),s=Math.cos(o),a=Xt(this.a,this.e,r),l=Math.tan(o)*Math.tan(o),c=n*Math.cos(o),u=c*c,h=this.es*s*s/(1-this.es);e=a*c*(1-u*l*(1/6-(8-l+8*h)*u/120)),i=this.a*zt(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+a*r/s*u*(.5+(5-l+6*h)*u/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,n,o=t.x/this.a,r=t.y/this.a;if(this.sphere){var s=r+this.lat0;i=Math.asin(Math.sin(s)*Math.cos(o)),n=Math.atan2(Math.tan(o),Math.cos(s))}else{var a=this.ml0/this.a+r,l=Kt(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(l)-e)<=1e-10)return t.x=this.long0,t.y=e,r<0&&(t.y*=-1),t;var c=Xt(this.a,this.e,Math.sin(l)),u=c*c*c/this.a/this.a*(1-this.es),h=Math.pow(Math.tan(l),2),d=o*this.a/c,p=d*d;i=l-c*Math.tan(l)/u*d*d*(.5-(1+3*h)*d*d/24),n=d*(1-p*(h/3+(1+3*h)*h*p/15))/Math.cos(l)}return t.x=I(n+this.long0),t.y=Zt(i),t},names:["Cassini","Cassini_Soldner","cass"]},Jt=function(t,e){var i;return t>1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e},$t={init:function(){var t,i=Math.abs(this.lat0);if(Math.abs(i-e)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Jt(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=.3333333333333333*t,e=t*t,i[0]+=.17222222222222222*e,i[1]=.06388888888888888*e,e*=t,i[0]+=.10257936507936508*e,i[1]+=.0664021164021164*e,i[2]=.016415012942191543*e,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Jt(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,n,r,s,a,l,c,u,h,d,p=t.x,m=t.y;if(p=I(p-this.long0),this.sphere){if(a=Math.sin(m),d=Math.cos(m),r=Math.cos(p),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+d*r:1+this.sinph0*a+this.cosph0*d*r)<=1e-10)return null;i=(n=Math.sqrt(2/n))*d*Math.sin(p),n*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*d*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(m+this.lat0)<1e-10)return null;n=o-.5*m,i=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(p),n*=r}}else{switch(c=0,u=0,h=0,r=Math.cos(p),s=Math.sin(p),a=Math.sin(m),l=Jt(this.e,a),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=l/this.qp,u=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:h=1+this.sinb1*c+this.cosb1*u*r;break;case this.EQUIT:h=1+u*r;break;case this.N_POLE:h=e+m,l=this.qp-l;break;case this.S_POLE:h=m-e,l=this.qp+l}if(Math.abs(h)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),n=this.mode===this.OBLIQ?this.ymf*h*(this.cosb1*c-this.sinb1*u*r):(h=Math.sqrt(2/(1+u*r)))*c*this.ymf,i=this.xmf*h*u*s;break;case this.N_POLE:case this.S_POLE:l>=0?(i=(h=Math.sqrt(l))*s,n=r*(this.mode===this.S_POLE?h:-h)):i=n=0}}return t.x=this.a*i+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,n,o,r,s,a,l,c,u,h,d=t.x/this.a,p=t.y/this.a;if(this.sphere){var m,f=0,g=0;if((n=.5*(m=Math.sqrt(d*d+p*p)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(g=Math.sin(n),f=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(m)<=1e-10?0:Math.asin(p*g/m),d*=g,p=f*m;break;case this.OBLIQ:n=Math.abs(m)<=1e-10?this.lat0:Math.asin(f*this.sinph0+p*g*this.cosph0/m),d*=g*this.cosph0,p=(f-Math.sin(n)*this.sinph0)*m;break;case this.N_POLE:p=-p,n=e-n;break;case this.S_POLE:n-=e}i=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,p):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,p*=this.dd,(a=Math.sqrt(d*d+p*p))<1e-10)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*a/this.rq),o=Math.cos(r),d*=r=Math.sin(r),this.mode===this.OBLIQ?(l=o*this.sinb1+p*r*this.cosb1/a,s=this.qp*l,p=a*this.cosb1*o-p*this.sinb1*r):(l=p*r/a,s=this.qp*l,p=a*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),!(s=d*d+p*p))return t.x=this.long0,t.y=this.lat0,t;l=1-s/this.qp,this.mode===this.S_POLE&&(l=-l)}i=Math.atan2(d,p),c=Math.asin(l),u=this.apa,h=c+c,n=c+u[0]*Math.sin(h)+u[1]*Math.sin(h+h)+u[2]*Math.sin(h+h+h)}return t.x=I(this.long0+i),t.y=n,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},te=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)},ee={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=S(this.e3,this.sin_po,this.cos_po),this.qs1=Jt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=S(this.e3,this.sin_po,this.cos_po),this.qs2=Jt(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Jt(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=Jt(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*I(e-this.long0),s=o*Math.sin(r)+this.x0,a=this.rh-o*Math.cos(r)+this.y0;return t.x=s,t.y=a,t},inverse:function(t){var e,i,n,o,r,s;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),o=0,0!==e&&(o=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?s=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,s=this.phi1z(this.e3,i)),r=I(o/this.ns0+this.long0),t.x=r,t.y=s,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,o,r,s=te(.5*e);if(t<1e-10)return s;for(var a=t*t,l=1;l<=25;l++)if(s+=r=.5*(o=1-(n=t*(i=Math.sin(s)))*n)*o/Math.cos(s)*(e/(1-a)-i/o+.5/t*Math.log((1-n)/(1+n))),Math.abs(r)<=1e-7)return s;return null}},ie={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,n,o,r,s,a,l=t.x,c=t.y;return n=I(l-this.long0),e=Math.sin(c),i=Math.cos(c),o=Math.cos(n),(r=this.sin_p14*e+this.cos_p14*i*o)>0||Math.abs(r)<=1e-10?(s=this.x0+1*this.a*i*Math.sin(n)/r,a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*o)/r):(s=this.x0+this.infinity_dist*i*Math.sin(n),a=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*o)),t.x=s,t.y=a,t},inverse:function(t){var e,i,n,o,r,s;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(o=Math.atan2(e,this.rc),i=Math.sin(o),n=Math.cos(o),s=te(n*this.sin_p14+t.y*i*this.cos_p14/e),r=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),r=I(this.long0+r)):(s=this.phic0,r=0),t.x=r,t.y=s,t},names:["gnom"]},ne={init:function(){this.sphere||(this.k0=S(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,o=t.y,r=I(n-this.long0);if(this.sphere)e=this.x0+this.a*r*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(o)/Math.cos(this.lat_ts);else{var s=Jt(this.e,Math.sin(o));e=this.x0+this.a*this.k0*r,i=this.y0+this.a*s*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var i,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=I(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,i){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-n)<1e-6)return i<0?-1*e:e;for(var o,r,s,a,l=Math.asin(.5*i),c=0;c<30;c++)if(r=Math.sin(l),s=Math.cos(l),a=t*r,l+=o=Math.pow(1-a*a,2)/(2*s)*(i/(1-t*t)-r/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(o)<=1e-10)return l;return NaN}(this.e,2*t.y*this.k0/this.a),i=I(this.long0+t.x/(this.a*this.k0))),t.x=i,t.y=n,t},names:["cea"]},oe={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=I(e-this.long0),o=Zt(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*o,t},inverse:function(t){var e=t.x,i=t.y;return t.x=I(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=Zt(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},re={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ht(this.es),this.e1=Wt(this.es),this.e2=Vt(this.es),this.e3=Yt(this.es),this.ml0=this.a*zt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,o=t.x,r=t.y,s=I(o-this.long0);if(n=s*Math.sin(r),this.sphere)Math.abs(r)<=1e-10?(e=this.a*s,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(r),i=this.a*(Zt(r-this.lat0)+(1-Math.cos(n))/Math.tan(r)));else if(Math.abs(r)<=1e-10)e=this.a*s,i=-1*this.ml0;else{var a=Xt(this.a,this.e,Math.sin(r))/Math.tan(r);e=a*Math.sin(n),i=this.a*zt(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+a*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,o,r,s,a,l,c;if(n=t.x-this.x0,o=t.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=1e-10)e=I(n/this.a+this.long0),i=0;else{var u;for(s=this.lat0+o/this.a,a=n*n/this.a/this.a+s*s,l=s,r=20;r;--r)if(l+=c=-1*(s*(l*(u=Math.tan(l))+1)-l-.5*(l*l+a)*u)/((l-s)/u-1),Math.abs(c)<=1e-10){i=l;break}e=I(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(o+this.ml0)<=1e-10)i=0,e=I(this.long0+n/this.a);else{var h,d,p,m,f;for(s=(this.ml0+o)/this.a,a=n*n/this.a/this.a+s*s,l=s,r=20;r;--r)if(f=this.e*Math.sin(l),h=Math.sqrt(1-f*f)*Math.tan(l),d=this.a*zt(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(s*(h*(m=d/this.a)+1)-m-.5*h*(m*m+a))/(this.es*Math.sin(2*l)*(m*m+a-2*s*m)/(4*h)+(s-m)*(h*p-2/Math.sin(2*l))-p),Math.abs(c)<=1e-10){i=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=I(this.long0+Math.asin(n*h/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","poly"]},se={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var i,n=e.x,o=e.y-this.lat0,r=n-this.long0,s=o/t*1e-5,a=r,l=1,c=0;for(i=1;i<=10;i++)l*=s,c+=this.A[i]*l;var u,h=c,d=a,p=1,m=0,f=0,g=0;for(i=1;i<=6;i++)u=m*h+p*d,p=p*h-m*d,m=u,f=f+this.B_re[i]*p-this.B_im[i]*m,g=g+this.B_im[i]*p+this.B_re[i]*m;return e.x=g*this.a+this.x0,e.y=f*this.a+this.y0,e},inverse:function(e){var i,n,o=e.x,r=e.y,s=o-this.x0,a=(r-this.y0)/this.a,l=s/this.a,c=1,u=0,h=0,d=0;for(i=1;i<=6;i++)n=u*a+c*l,c=c*a-u*l,u=n,h=h+this.C_re[i]*c-this.C_im[i]*u,d=d+this.C_im[i]*c+this.C_re[i]*u;for(var p=0;p<this.iterations;p++){var m,f=h,g=d,_=a,v=l;for(i=2;i<=6;i++)m=g*h+f*d,f=f*h-g*d,g=m,_+=(i-1)*(this.B_re[i]*f-this.B_im[i]*g),v+=(i-1)*(this.B_im[i]*f+this.B_re[i]*g);f=1,g=0;var y=this.B_re[1],E=this.B_im[1];for(i=2;i<=6;i++)m=g*h+f*d,f=f*h-g*d,g=m,y+=i*(this.B_re[i]*f-this.B_im[i]*g),E+=i*(this.B_im[i]*f+this.B_re[i]*g);var w=y*y+E*E;h=(_*y+v*E)/w,d=(v*y-_*E)/w}var b=h,C=d,M=1,P=0;for(i=1;i<=9;i++)M*=b,P+=this.D[i]*M;var L=this.lat0+P*t*1e5,S=this.long0+C;return e.x=S,e.y=L,e},names:["New_Zealand_Map_Grid","nzmg"]},ae={init:function(){},forward:function(t){var e=t.x,i=t.y,n=I(e-this.long0),o=this.x0+this.a*n,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=o,t.y=r,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=I(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=i,t},names:["Miller_Cylindrical","mill"]},le={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Mt(this.es)},forward:function(t){var e,i,n=t.x,o=t.y;if(n=I(n-this.long0),this.sphere){if(this.m)for(var r=this.n*Math.sin(o),s=20;s;--s){var a=(this.m*o+Math.sin(o)-r)/(this.m+Math.cos(o));if(o-=a,Math.abs(a)<1e-10)break}else o=1!==this.n?Math.asin(this.n*Math.sin(o)):o;e=this.a*this.C_x*n*(this.m+Math.cos(o)),i=this.a*this.C_y*o}else{var l=Math.sin(o),c=Math.cos(o);i=this.a*Pt(o,l,c,this.en),e=this.a*n*c/Math.sqrt(1-this.es*l*l)}return t.x=e,t.y=i,t},inverse:function(t){var i,n,o,r;return t.x-=this.x0,o=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,o/=this.C_x*(this.m+Math.cos(i)),this.m?i=te((this.m*i+Math.sin(i))/this.n):1!==this.n&&(i=te(Math.sin(i)/this.n)),o=I(o+this.long0),i=Zt(i)):(i=Lt(t.y/this.a,this.es,this.en),(r=Math.abs(i))<e?(r=Math.sin(i),n=this.long0+t.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(i)),o=I(n)):r-1e-10<e&&(o=this.long0)),t.x=o,t.y=i,t},names:["Sinusoidal","sinu"]},ce={init:function(){},forward:function(t){for(var e=t.x,i=t.y,n=I(e-this.long0),o=i,r=Math.PI*Math.sin(i);;){var s=-(o+Math.sin(o)-r)/(1+Math.cos(o));if(o+=s,Math.abs(s)<1e-10)break}o/=2,Math.PI/2-Math.abs(i)<1e-10&&(n=0);var a=.900316316158*this.a*n*Math.cos(o)+this.x0,l=1.4142135623731*this.a*Math.sin(o)+this.y0;return t.x=a,t.y=l,t},inverse:function(t){var e,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),e=Math.asin(i);var n=I(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var o=Math.asin(i);return t.x=n,t.y=o,t},names:["Mollweide","moll"]},ue={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ht(this.es),this.e1=Wt(this.es),this.e2=Vt(this.es),this.e3=Yt(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=S(this.e,this.sinphi,this.cosphi),this.ml1=zt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=S(this.e,this.sinphi,this.cosphi),this.ml2=zt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=zt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var o=zt(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-o)}var r=this.ns*I(i-this.long0),s=this.x0+e*Math.sin(r),a=this.y0+this.rh-e*Math.cos(r);return t.x=s,t.y=a,t},inverse:function(t){var e,i,n,o;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var r=0;if(0!==i&&(r=Math.atan2(e*t.x,e*t.y)),this.sphere)return o=I(this.long0+r/this.ns),n=Zt(this.g-i/this.a),t.x=o,t.y=n,t;var s=this.g-i/this.a;return n=Kt(s,this.e0,this.e1,this.e2,this.e3),o=I(this.long0+r/this.ns),t.x=o,t.y=n,t},names:["Equidistant_Conic","eqdc"]},he={init:function(){this.R=this.a},forward:function(t){var i,n,o=t.x,r=t.y,s=I(o-this.long0);Math.abs(r)<=1e-10&&(i=this.x0+this.R*s,n=this.y0);var a=te(2*Math.abs(r/Math.PI));(Math.abs(s)<=1e-10||Math.abs(Math.abs(r)-e)<=1e-10)&&(i=this.x0,n=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var l=.5*Math.abs(Math.PI/s-s/Math.PI),c=l*l,u=Math.sin(a),h=Math.cos(a),d=h/(u+h-1),p=d*d,m=d*(2/u-1),f=m*m,g=Math.PI*this.R*(l*(d-f)+Math.sqrt(c*(d-f)*(d-f)-(f+c)*(p-f)))/(f+c);s<0&&(g=-g),i=this.x0+g;var _=c+d;return g=Math.PI*this.R*(m*_-l*Math.sqrt((f+c)*(c+1)-_*_))/(f+c),n=r>=0?this.y0+g:this.y0-g,t.x=i,t.y=n,t},inverse:function(t){var e,i,n,o,r,s,a,l,c,u,h,d;return t.x-=this.x0,t.y-=this.y0,h=Math.PI*this.R,r=(n=t.x/h)*n+(o=t.y/h)*o,h=3*(o*o/(l=-2*(s=-Math.abs(o)*(1+r))+1+2*o*o+r*r)+(2*(a=s-2*o*o+n*n)*a*a/l/l/l-9*s*a/l/l)/27)/(c=(s-a*a/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(h)>1&&(h=h>=0?1:-1),d=Math.acos(h)/3,i=t.y>=0?(-u*Math.cos(d+Math.PI/3)-a/3/l)*Math.PI:-(-u*Math.cos(d+Math.PI/3)-a/3/l)*Math.PI,e=Math.abs(n)<1e-10?this.long0:I(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-o*o)+r*r))/2/n),t.x=e,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},de={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var i,n,o,r,s,a,l,c,u,h,d,p,m,f,g,_,v,y,E,w,b,C,M=t.x,P=t.y,L=Math.sin(t.y),S=Math.cos(t.y),x=I(M-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(t.x=this.x0+this.a*(e-P)*Math.sin(x),t.y=this.y0-this.a*(e-P)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=1e-10?(t.x=this.x0+this.a*(e+P)*Math.sin(x),t.y=this.y0+this.a*(e+P)*Math.cos(x),t):(y=this.sin_p12*L+this.cos_p12*S*Math.cos(x),v=(_=Math.acos(y))?_/Math.sin(_):1,t.x=this.x0+this.a*v*S*Math.sin(x),t.y=this.y0+this.a*v*(this.cos_p12*L-this.sin_p12*S*Math.cos(x)),t):(i=Ht(this.es),n=Wt(this.es),o=Vt(this.es),r=Yt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(s=this.a*zt(i,n,o,r,e),a=this.a*zt(i,n,o,r,P),t.x=this.x0+(s-a)*Math.sin(x),t.y=this.y0-(s-a)*Math.cos(x),t):Math.abs(this.sin_p12+1)<=1e-10?(s=this.a*zt(i,n,o,r,e),a=this.a*zt(i,n,o,r,P),t.x=this.x0+(s+a)*Math.sin(x),t.y=this.y0+(s+a)*Math.cos(x),t):(l=L/S,c=Xt(this.a,this.e,this.sin_p12),u=Xt(this.a,this.e,L),h=Math.atan((1-this.es)*l+this.es*c*this.sin_p12/(u*S)),E=0===(d=Math.atan2(Math.sin(x),this.cos_p12*Math.tan(h)-this.sin_p12*Math.cos(x)))?Math.asin(this.cos_p12*Math.sin(h)-this.sin_p12*Math.cos(h)):Math.abs(Math.abs(d)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(h)-this.sin_p12*Math.cos(h)):Math.asin(Math.sin(x)*Math.cos(h)/Math.sin(d)),p=this.e*this.sin_p12/Math.sqrt(1-this.es),_=c*E*(1-(w=E*E)*(g=(m=this.e*this.cos_p12*Math.cos(d)/Math.sqrt(1-this.es))*m)*(1-g)/6+(b=w*E)/8*(f=p*m)*(1-2*g)+(C=b*E)/120*(g*(4-7*g)-3*p*p*(1-7*g))-C*E/48*f),t.x=this.x0+_*Math.sin(d),t.y=this.y0+_*Math.cos(d),t))},inverse:function(t){var i,n,o,r,s,a,l,c,u,h,d,p,m,f,g,_,v,y,E,w,b,C,M;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((i=Math.sqrt(t.x*t.x+t.y*t.y))>2*e*this.a)return;return n=i/this.a,o=Math.sin(n),r=Math.cos(n),s=this.long0,Math.abs(i)<=1e-10?a=this.lat0:(a=te(r*this.sin_p12+t.y*o*this.cos_p12/i),l=Math.abs(this.lat0)-e,s=Math.abs(l)<=1e-10?this.lat0>=0?I(this.long0+Math.atan2(t.x,-t.y)):I(this.long0-Math.atan2(-t.x,t.y)):I(this.long0+Math.atan2(t.x*o,i*this.cos_p12*r-t.y*this.sin_p12*o))),t.x=s,t.y=a,t}return c=Ht(this.es),u=Wt(this.es),h=Vt(this.es),d=Yt(this.es),Math.abs(this.sin_p12-1)<=1e-10?(p=this.a*zt(c,u,h,d,e),i=Math.sqrt(t.x*t.x+t.y*t.y),a=Kt((p-i)/this.a,c,u,h,d),s=I(this.long0+Math.atan2(t.x,-1*t.y)),t.x=s,t.y=a,t):Math.abs(this.sin_p12+1)<=1e-10?(p=this.a*zt(c,u,h,d,e),i=Math.sqrt(t.x*t.x+t.y*t.y),a=Kt((i-p)/this.a,c,u,h,d),s=I(this.long0+Math.atan2(t.x,t.y)),t.x=s,t.y=a,t):(i=Math.sqrt(t.x*t.x+t.y*t.y),g=Math.atan2(t.x,t.y),m=Xt(this.a,this.e,this.sin_p12),_=Math.cos(g),y=-(v=this.e*this.cos_p12*_)*v/(1-this.es),E=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),C=1-y*(b=(w=i/m)-y*(1+y)*Math.pow(w,3)/6-E*(1+3*y)*Math.pow(w,4)/24)*b/2-w*b*b*b/6,f=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*_),s=I(this.long0+Math.asin(Math.sin(g)*Math.sin(b)/Math.cos(f))),M=Math.sin(f),a=Math.atan2((M-this.es*C*this.sin_p12)*Math.tan(f),M*(1-this.es)),t.x=s,t.y=a,t)},names:["Azimuthal_Equidistant","aeqd"]},pe={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,n,o,r,s,a,l=t.x,c=t.y;return n=I(l-this.long0),e=Math.sin(c),i=Math.cos(c),o=Math.cos(n),((r=this.sin_p14*e+this.cos_p14*i*o)>0||Math.abs(r)<=1e-10)&&(s=1*this.a*i*Math.sin(n),a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*o)),t.x=s,t.y=a,t},inverse:function(t){var i,n,o,r,s,a,l;return t.x-=this.x0,t.y-=this.y0,i=Math.sqrt(t.x*t.x+t.y*t.y),n=te(i/this.a),o=Math.sin(n),r=Math.cos(n),a=this.long0,Math.abs(i)<=1e-10?(l=this.lat0,t.x=a,t.y=l,t):(l=te(r*this.sin_p14+t.y*o*this.cos_p14/i),s=Math.abs(this.lat0)-e,Math.abs(s)<=1e-10?(a=this.lat0>=0?I(this.long0+Math.atan2(t.x,-t.y)):I(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=l,t):(a=I(this.long0+Math.atan2(t.x*o,i*this.cos_p14*r-t.y*this.sin_p14*o)),t.x=a,t.y=l,t))},names:["ortho"]},me=1,fe=2,ge=3,_e=4,ve=5,ye=6,Ee=1,we=2,be=3,Ce=4;function Me(t,i,n,r){var a;return t<1e-10?(r.value=Ee,a=0):(a=Math.atan2(i,n),Math.abs(a)<=o?r.value=Ee:a>o&&a<=e+o?(r.value=we,a-=e):a>e+o||a<=-(e+o)?(r.value=be,a=a>=0?a-s:a+s):(r.value=Ce,a+=e)),a}function Pe(t,e){var i=t+e;return i<-s?i+=r:i>+s&&(i-=r),i}var Le,Se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=e-o/2?this.face=ve:this.lat0<=-(e-o/2)?this.face=ye:Math.abs(this.long0)<=o?this.face=me:Math.abs(this.long0)<=e+o?this.face=this.long0>0?fe:_e:this.face=ge,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,n,r,a,l,c,u={x:0,y:0},h={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,this.face===ve)a=e-i,n>=o&&n<=e+o?(h.value=Ee,r=n-e):n>e+o||n<=-(e+o)?(h.value=we,r=n>0?n-s:n+s):n>-(e+o)&&n<=-o?(h.value=be,r=n+e):(h.value=Ce,r=n);else if(this.face===ye)a=e+i,n>=o&&n<=e+o?(h.value=Ee,r=-n+e):n<o&&n>=-o?(h.value=we,r=-n):n<-o&&n>=-(e+o)?(h.value=be,r=-n-e):(h.value=Ce,r=n>0?-n+s:-n-s);else{var d,p,m,f,g,_;this.face===fe?n=Pe(n,+e):this.face===ge?n=Pe(n,+s):this.face===_e&&(n=Pe(n,-e)),f=Math.sin(i),g=Math.cos(i),_=Math.sin(n),d=g*Math.cos(n),p=g*_,m=f,this.face===me?r=Me(a=Math.acos(d),m,p,h):this.face===fe?r=Me(a=Math.acos(p),m,-d,h):this.face===ge?r=Me(a=Math.acos(-d),m,-p,h):this.face===_e?r=Me(a=Math.acos(-p),m,d,h):(a=r=0,h.value=Ee)}return c=Math.atan(12/s*(r+Math.acos(Math.sin(r)*Math.cos(o))-e)),l=Math.sqrt((1-Math.cos(a))/(Math.cos(c)*Math.cos(c))/(1-Math.cos(Math.atan(1/Math.cos(r))))),h.value===we?c+=e:h.value===be?c+=s:h.value===Ce&&(c+=1.5*s),u.x=l*Math.cos(c),u.y=l*Math.sin(c),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,t.x=u.x,t.y=u.y,t},inverse:function(t){var i,n,o,r,a,l,c,u,h,d,p,m,f={lam:0,phi:0},g={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?g.value=Ee:t.y>=0&&t.y>=Math.abs(t.x)?(g.value=we,i-=e):t.x<0&&-t.x>=Math.abs(t.y)?(g.value=be,i=i<0?i+s:i-s):(g.value=Ce,i+=e),h=s/12*Math.tan(i),a=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),l=Math.atan(a),(c=1-(o=Math.cos(i))*o*(r=Math.tan(n))*r*(1-Math.cos(Math.atan(1/Math.cos(l)))))<-1?c=-1:c>1&&(c=1),this.face===ve)u=Math.acos(c),f.phi=e-u,g.value===Ee?f.lam=l+e:g.value===we?f.lam=l<0?l+s:l-s:g.value===be?f.lam=l-e:f.lam=l;else if(this.face===ye)u=Math.acos(c),f.phi=u-e,g.value===Ee?f.lam=-l+e:g.value===we?f.lam=-l:g.value===be?f.lam=-l-e:f.lam=l<0?-l-s:-l+s;else{var _,v,y;h=(_=c)*_,v=(h+=(y=h>=1?0:Math.sqrt(1-h)*Math.sin(l))*y)>=1?0:Math.sqrt(1-h),g.value===we?(h=v,v=-y,y=h):g.value===be?(v=-v,y=-y):g.value===Ce&&(h=v,v=y,y=-h),this.face===fe?(h=_,_=-v,v=h):this.face===ge?(_=-_,v=-v):this.face===_e&&(h=_,_=v,v=-h),f.phi=Math.acos(-y)-e,f.lam=Math.atan2(v,_),this.face===fe?f.lam=Pe(f.lam,-e):this.face===ge?f.lam=Pe(f.lam,-s):this.face===_e&&(f.lam=Pe(f.lam,+e))}return 0!==this.es&&(d=f.phi<0?1:0,p=Math.tan(f.phi),m=this.b/Math.sqrt(p*p+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-m*m)/(this.one_minus_f*m)),d&&(f.phi=-f.phi)),f.lam+=this.long0,t.x=f.lam,t.y=f.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},xe=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ie=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Te=n/5,Ge=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))},Re={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=I(t.x-this.long0),i=Math.abs(t.y),o=Math.floor(i*Te);o<0?o=0:o>=18&&(o=17);var r={x:Ge(xe[o],i=n*(i-.08726646259971647*o))*e,y:Ge(Ie[o],i)};return t.y<0&&(r.y=-r.y),r.x=r.x*this.a*.8487+this.x0,r.y=r.y*this.a*1.3523+this.y0,r},inverse:function(t){var n={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(n.y>=1)n.x/=xe[18][0],n.y=t.y<0?-e:e;else{var o=Math.floor(18*n.y);for(o<0?o=0:o>=18&&(o=17);;)if(Ie[o][0]>n.y)--o;else{if(!(Ie[o+1][0]<=n.y))break;++o}var r=Ie[o],s=5*(n.y-r[0])/(Ie[o+1][0]-r[0]);s=function(t,e,i,n){for(var o=e;n;--n){var r=t(o);if(o-=r,Math.abs(r)<i)break}return o}((function(t){return(Ge(r,t)-n.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(r,t)}),s,1e-10,100),n.x/=Ge(xe[o],s),n.y=(5*o+s)*i,t.y<0&&(n.y=-n.y)}return n.x=I(n.x+this.long0),n},names:["Robinson","robin"]},De={init:function(){this.name="geocent"},forward:function(t){return Z(t,this.es,this.a)},inverse:function(t){return K(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},ke=0,Ae=1,Ne=2,Oe=3,Ue={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},je={init:function(){if(Object.keys(Ue).forEach(function(t){if(void 0===this[t])this[t]=Ue[t].def;else{if(Ue[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ue[t].num&&(this[t]=parseFloat(this[t]))}Ue[t].degrees&&(this[t]=this[t]*i)}.bind(this)),Math.abs(Math.abs(this.lat0)-e)<1e-10?this.mode=this.lat0<0?Ae:ke:Math.abs(this.lat0)<1e-10?this.mode=Ne:(this.mode=Oe,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,n=this.azi;this.cg=Math.cos(n),this.sg=Math.sin(n),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,i,n,o,r=Math.sin(t.y),s=Math.cos(t.y),a=Math.cos(t.x);switch(this.mode){case Oe:i=this.sinph0*r+this.cosph0*s*a;break;case Ne:i=s*a;break;case Ae:i=-r;break;case ke:i=r}switch(e=(i=this.pn1/(this.p-i))*s*Math.sin(t.x),this.mode){case Oe:i*=this.cosph0*r-this.sinph0*s*a;break;case Ne:i*=r;break;case ke:i*=-s*a;break;case Ae:i*=s*a}return o=1/((n=i*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-i*this.sg)*this.cw*o,i=n*o,t.x=e*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,i,n,o={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,i=this.pn1*t.y*this.cw*n,t.x=e*this.cg+i*this.sg,t.y=i*this.cg-e*this.sg;var r=It(t.x,t.y);if(Math.abs(r)<1e-10)o.x=0,o.y=t.y;else{var s,a;switch(a=1-r*r*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/r+r/this.pn1),s=Math.sqrt(1-a*a),this.mode){case Oe:o.y=Math.asin(s*this.sinph0+t.y*a*this.cosph0/r),t.y=(s-this.sinph0*Math.sin(o.y))*r,t.x*=a*this.cosph0;break;case Ne:o.y=Math.asin(t.y*a/r),t.y=s*r,t.x*=a;break;case ke:o.y=Math.asin(s),t.y=-t.y;break;case Ae:o.y=-Math.asin(s)}o.x=Math.atan2(t.x,t.y)}return t.x=o.x+this.long0,t.y=o.y,t},names:["Tilted_Perspective","tpers"]};return ct.defaultDatum="WGS84",ct.Proj=X,ct.WGS84=new ct.Proj("WGS84"),ct.Point=bt,ct.toPoint=nt,ct.defs=b,ct.nadgrid=function(t,e){var i=new DataView(e),n=function(t){var e=t.getInt32(8,!1);return 11!==e&&(11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(i),o=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:H(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(i,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=function(t,e,i){for(var n=[],o=0;o<e.nSubgrids;o++){var r=V(t,176,i),s=Y(t,176,r,i),a=Math.round(1+(r.upperLongitude-r.lowerLongitude)/r.longitudeInterval),l=Math.round(1+(r.upperLatitude-r.lowerLatitude)/r.latitudeInterval);n.push({ll:[z(r.lowerLongitude),z(r.lowerLatitude)],del:[z(r.longitudeInterval),z(r.latitudeInterval)],lim:[a,l],count:r.gridNodeCount,cvs:W(s)})}return n}(i,o,n),s={header:o,subgrids:r};return q[t]=s,s},ct.transform=rt,ct.mgrs=pt,ct.version="2.7.5",(Le=ct).Proj.projections.add(St),Le.Proj.projections.add(Dt),Le.Proj.projections.add(kt),Le.Proj.projections.add(Ot),Le.Proj.projections.add(Ut),Le.Proj.projections.add(jt),Le.Proj.projections.add(Ft),Le.Proj.projections.add(qt),Le.Proj.projections.add(Bt),Le.Proj.projections.add(Qt),Le.Proj.projections.add($t),Le.Proj.projections.add(ee),Le.Proj.projections.add(ie),Le.Proj.projections.add(ne),Le.Proj.projections.add(oe),Le.Proj.projections.add(re),Le.Proj.projections.add(se),Le.Proj.projections.add(ae),Le.Proj.projections.add(le),Le.Proj.projections.add(ce),Le.Proj.projections.add(ue),Le.Proj.projections.add(he),Le.Proj.projections.add(de),Le.Proj.projections.add(pe),Le.Proj.projections.add(Se),Le.Proj.projections.add(Re),Le.Proj.projections.add(De),Le.Proj.projections.add(je),ct}()},function(t,e,i){var n,o,r;o=[i(0),i(8)],void 0===(r="function"==typeof(n=function(t,e){return e.__esModule&&e.default&&(e=e.default),t.Proj={},t.Proj._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},t.Proj.Projection=t.Class.extend({initialize:function(e,i,n){var o=t.Proj._isProj4Obj(e);this._proj=o?e:this._projFromCodeDef(e,i),this.bounds=o?i:n},project:function(e){var i=this._proj.forward([e.lng,e.lat]);return new t.Point(i[0],i[1])},unproject:function(e,i){var n=this._proj.inverse([e.x,e.y]);return new t.LatLng(n[1],n[0],i)},_projFromCodeDef:function(t,i){if(i)e.defs(t,i);else if(void 0===e.defs[t]){var n=t.split(":");if(n.length>3&&(t=n[n.length-3]+":"+n[n.length-1]),void 0===e.defs[t])throw"No projection definition for code "+t}return e(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(e,i,n){var o,r,s,a;if(t.Proj._isProj4Obj(e)?(o=(r=e).srsCode,a=i||{},this.projection=new t.Proj.Projection(r,a.bounds)):(o=e,s=i,a=n||{},this.projection=new t.Proj.Projection(o,s,a.bounds)),t.Util.setOptions(this,a),this.code=o,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var l=this.options.resolutions.length-1;l>=0;l--)this.options.resolutions[l]&&(this._scales[l]=1/this.options.resolutions[l])}this.infinite=!this.options.bounds},scale:function(t){var e,i=Math.floor(t);return t===i?this._scales[t]:(e=this._scales[i])+(this._scales[i+1]-e)*(t-i)},zoom:function(t){var e,i,n=this._closestElement(this._scales,t),o=this._scales.indexOf(n);return t===n?o:void 0===n?-1/0:(i=o+1,void 0===(e=this._scales[i])?1/0:(t-n)/(e-n)+o)},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,e){for(var i,n=t.length;n--;)t[n]<=e&&(void 0===i||i<t[n])&&(i=t[n]);return i}}),t.Proj.GeoJSON=t.GeoJSON.extend({initialize:function(e,i){this._callLevel=0,t.GeoJSON.prototype.initialize.call(this,e,i)},addData:function(e){var i;e&&(e.crs&&"name"===e.crs.type?i=new t.Proj.CRS(e.crs.properties.name):e.crs&&e.crs.type&&(i=new t.Proj.CRS(e.crs.type+":"+e.crs.properties.code)),void 0!==i&&(this.options.coordsToLatLng=function(e){var n=t.point(e[0],e[1]);return i.projection.unproject(n)})),this._callLevel++;try{t.GeoJSON.prototype.addData.call(this,e)}finally{this._callLevel--,0===this._callLevel&&delete this.options.coordsToLatLng}}}),t.Proj.geoJson=function(e,i){return new t.Proj.GeoJSON(e,i)},t.Proj.ImageOverlay=t.ImageOverlay.extend({initialize:function(e,i,n){t.ImageOverlay.prototype.initialize.call(this,e,null,n),this._projectedBounds=i},_animateZoom:function(e){var i=this._map.getZoomScale(e.zoom),n=t.point(this._projectedBounds.min.x,this._projectedBounds.max.y),o=this._projectedToNewLayerPoint(n,e.zoom,e.center);t.DomUtil.setTransform(this._image,o,i)},_reset:function(){var e=this._map.getZoom(),i=this._map.getPixelOrigin(),n=t.bounds(this._transform(this._projectedBounds.min,e)._subtract(i),this._transform(this._projectedBounds.max,e)._subtract(i)),o=n.getSize();t.DomUtil.setPosition(this._image,n.min),this._image.style.width=o.x+"px",this._image.style.height=o.y+"px"},_projectedToNewLayerPoint:function(t,e,i){var n=this._map.getSize()._divideBy(2),o=this._map.project(i,e)._subtract(n)._round().add(this._map._getMapPanePos());return this._transform(t,e)._subtract(o)},_transform:function(t,e){var i=this._map.options.crs,n=i.transformation,o=i.scale(e);return n.transform(t,o)}}),t.Proj.imageOverlay=function(e,i,n){return new t.Proj.ImageOverlay(e,i,n)},t.Proj})?n.apply(e,o):n)||(t.exports=r)},function(t,e,i){"use strict";i.r(e),i.d(e,"Services",(function(){return vo})),i.d(e,"Error",(function(){return yo})),i.d(e,"Helper",(function(){return Eo})),i.d(e,"Protocols",(function(){return wo})),i.d(e,"servicesDate",(function(){return bo})),i.d(e,"servicesVersion",(function(){return Co})),i.d(e,"leafletExtVersion",(function(){return Mo})),i.d(e,"leafletExtDate",(function(){return Po})),i.d(e,"LayerUtils",(function(){return oo})),i.d(e,"ProxyUtils",(function(){return go})),i.d(e,"ColorUtils",(function(){return _o})),i.d(e,"MathUtils",(function(){return wn})),i.d(e,"Logger",(function(){return l})),i.d(e,"Config",(function(){return Lo})),i.d(e,"LExtended",(function(){return r.a}));var n=i(2),o=i(0),r=i.n(o);i(15),i(16),i(17),i(18),i(19),i(20),i(21),i(22),i(23),i(24),i(25),i(26),i(27),i(28),i(29),i(30),i(31),i(32),i(33),i(34),i(35),i(36),i(37),i(38),i(39),i(40),i(41);i(42);var s,a=i(3),l={getLogger:function(t){if(void 0===e)var e={env:{VERBOSE:!1}};e.env.VERBOSE?a.enableAll():a.disableAll();var i=t||"default";return a.getLogger(i)},disableAll:function(){var t=a.getLoggers();for(var e in t){if(Object.hasOwnProperty.call(t,e))t[e].disableAll()}},enableAll:function(){var t=a.getLoggers();for(var e in t){if(Object.hasOwnProperty.call(t,e))t[e].enableAll()}}},c={generate:(s=Math.floor(Date.now()),function(){return s++}),name:function(t){var e=null,i=t.lastIndexOf("-");return e=-1===i?t:t.substring(0,i),e},index:function(t){var e=null,i=this.name(t),n=i.lastIndexOf("_");return-1!==n&&(e=i.substring(n+1)),e},uuid:function(t){var e=null,i=t.lastIndexOf("-");return-1!==i&&(e=parseInt(t.substring(i+1),10)),e}};
/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function h(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(e){p(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t){return(d="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 p(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(){return(m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function f(t,e){if(null==t)return{};var i,n,o=function(t,e){if(null==t)return{};var i,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}return o}function g(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var _=g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=g(/Edge/i),y=g(/firefox/i),E=g(/safari/i)&&!g(/chrome/i)&&!g(/android/i),w=g(/iP(ad|od|hone)/i),b=g(/chrome/i)&&g(/android/i),C={capture:!1,passive:!1};function M(t,e,i){t.addEventListener(e,i,!_&&C)}function P(t,e,i){t.removeEventListener(e,i,!_&&C)}function L(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function S(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function x(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&L(t,e):L(t,e))||n&&t===i)return t;if(t===i)break}while(t=S(t))}return null}var I,T=/\s+/g;function G(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(T," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(T," ")}}function R(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function D(t,e){var i="";if("string"==typeof t)i=t;else do{var n=R(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(i)}function k(t,e,i){if(t){var n=t.getElementsByTagName(e),o=0,r=n.length;if(i)for(;o<r;o++)i(n[o],o);return n}return[]}function A(){var t=document.scrollingElement;return t||document.documentElement}function N(t,e,i,n,o){if(t.getBoundingClientRect||t===window){var r,s,a,l,c,u,h;if(t!==window&&t.parentNode&&t!==A()?(s=(r=t.getBoundingClientRect()).top,a=r.left,l=r.bottom,c=r.right,u=r.height,h=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(o=o||t.parentNode,!_))do{if(o&&o.getBoundingClientRect&&("none"!==R(o,"transform")||i&&"static"!==R(o,"position"))){var d=o.getBoundingClientRect();s-=d.top+parseInt(R(o,"border-top-width")),a-=d.left+parseInt(R(o,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(o=o.parentNode);if(n&&t!==window){var p=D(o||t),m=p&&p.a,f=p&&p.d;p&&(l=(s/=f)+(u/=f),c=(a/=m)+(h/=m))}return{top:s,left:a,bottom:l,right:c,width:h,height:u}}}function O(t,e,i){for(var n=B(t,!0),o=N(t)[e];n;){var r=N(n)[i];if(!("top"===i||"left"===i?o>=r:o<=r))return n;if(n===A())break;n=B(n,!1)}return!1}function U(t,e,i,n){for(var o=0,r=0,s=t.children;r<s.length;){if("none"!==s[r].style.display&&s[r]!==Vt.ghost&&(n||s[r]!==Vt.dragged)&&x(s[r],i.draggable,t,!1)){if(o===e)return s[r];o++}r++}return null}function j(t,e){for(var i=t.lastElementChild;i&&(i===Vt.ghost||"none"===R(i,"display")||e&&!L(i,e));)i=i.previousElementSibling;return i||null}function F(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Vt.clone||e&&!L(t,e)||i++;return i}function q(t){var e=0,i=0,n=A();if(t)do{var o=D(t),r=o.a,s=o.d;e+=t.scrollLeft*r,i+=t.scrollTop*s}while(t!==n&&(t=t.parentNode));return[e,i]}function B(t,e){if(!t||!t.getBoundingClientRect)return A();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var o=R(i);if(i.clientWidth<i.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!i.getBoundingClientRect||i===document.body)return A();if(n||e)return i;n=!0}}}while(i=i.parentNode);return A()}function z(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function H(t,e){return function(){if(!I){var i=arguments,n=this;1===i.length?t.call(n,i[0]):t.apply(n,i),I=setTimeout((function(){I=void 0}),e)}}}function W(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function V(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}var Y="Sortable"+(new Date).getTime();function X(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==R(t,"display")&&t!==Vt.ghost){e.push({target:t,rect:N(t)});var i=h({},e[e.length-1].rect);if(t.thisAnimationDuration){var n=D(t,!0);n&&(i.top-=n.f,i.left-=n.e)}t.fromRect=i}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(e,{target:t}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var o=!1,r=0;e.forEach((function(t){var e=0,i=t.target,s=i.fromRect,a=N(i),l=i.prevFromRect,c=i.prevToRect,u=t.rect,h=D(i,!0);h&&(a.top-=h.f,a.left-=h.e),i.toRect=a,i.thisAnimationDuration&&z(l,a)&&!z(s,a)&&(u.top-a.top)/(u.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(u,l,c,n.options)),z(a,s)||(i.prevFromRect=s,i.prevToRect=a,e||(e=n.options.animation),n.animate(i,u,a,e)),e&&(o=!0,r=Math.max(r,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof i&&i()}),r):"function"==typeof i&&i(),e=[]},animate:function(t,e,i,n){if(n){R(t,"transition",""),R(t,"transform","");var o=D(this.el),r=o&&o.a,s=o&&o.d,a=(e.left-i.left)/(r||1),l=(e.top-i.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,R(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),R(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}}var Z=[],K={initializeByDefault:!0},Q={mount:function(t){for(var e in K)K.hasOwnProperty(e)&&!(e in t)&&(t[e]=K[e]);Z.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Z.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var o=t+"Global";Z.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][o]&&e[n.pluginName][o](h({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](h({sortable:e},i)))}))},initializePlugins:function(t,e,i,n){for(var o in Z.forEach((function(n){var o=n.pluginName;if(t.options[o]||n.initializeByDefault){var r=new n(t,e,t.options);r.sortable=t,r.options=t.options,t[o]=r,m(i,r.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var r=this.modifyOption(t,o,t.options[o]);void 0!==r&&(t.options[o]=r)}},getEventProperties:function(t,e){var i={};return Z.forEach((function(n){"function"==typeof n.eventProperties&&m(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return Z.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(n=o.optionListeners[e].call(t[o.pluginName],i))})),n}};function J(t){var e=t.sortable,i=t.rootEl,n=t.name,o=t.targetEl,r=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,m=t.putSortable,f=t.extraEventProperties;if(e=e||i&&i[Y]){var g,y=e.options,E="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||_||v?(g=document.createEvent("Event")).initEvent(n,!0,!0):g=new CustomEvent(n,{bubbles:!0,cancelable:!0}),g.to=s||i,g.from=a||i,g.item=o||i,g.clone=r,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=p,g.pullMode=m?m.lastPutMode:void 0;var w=h(h({},f),Q.getEventProperties(n,e));for(var b in w)g[b]=w[b];i&&i.dispatchEvent(g),y[E]&&y[E].call(e,g)}}var $=["evt"],tt=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,o=f(i,$);Q.pluginEvent.bind(Vt)(t,e,h({dragEl:it,parentEl:nt,ghostEl:ot,rootEl:rt,nextEl:st,lastDownEl:at,cloneEl:lt,cloneHidden:ct,dragStarted:bt,putSortable:ft,activeSortable:Vt.active,originalEvent:n,oldIndex:ut,oldDraggableIndex:dt,newIndex:ht,newDraggableIndex:pt,hideGhostForTarget:Bt,unhideGhostForTarget:zt,cloneNowHidden:function(){ct=!0},cloneNowShown:function(){ct=!1},dispatchSortableEvent:function(t){et({sortable:e,name:t,originalEvent:n})}},o))};function et(t){J(h({putSortable:ft,cloneEl:lt,targetEl:it,rootEl:rt,oldIndex:ut,oldDraggableIndex:dt,newIndex:ht,newDraggableIndex:pt},t))}var it,nt,ot,rt,st,at,lt,ct,ut,ht,dt,pt,mt,ft,gt,_t,vt,yt,Et,wt,bt,Ct,Mt,Pt,Lt,St=!1,xt=!1,It=[],Tt=!1,Gt=!1,Rt=[],Dt=!1,kt=[],At="undefined"!=typeof document,Nt=w,Ot=v||_?"cssFloat":"float",Ut=At&&!b&&!w&&"draggable"in document.createElement("div"),jt=function(){if(At){if(_)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ft=function(t,e){var i=R(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=U(t,0,e),r=U(t,1,e),s=o&&R(o),a=r&&R(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+N(o).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+N(r).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&"none"!==s.float){var u="left"===s.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==u?"horizontal":"vertical"}return o&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=n&&"none"===i[Ot]||r&&"none"===i[Ot]&&l+c>n)?"vertical":"horizontal"},qt=function(t){function e(t,i){return function(n,o,r,s){var a=n.options.group.name&&o.options.group.name&&n.options.group.name===o.options.group.name;if(null==t&&(i||a))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,o,r,s),i)(n,o,r,s);var l=(i?n:o).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var i={},n=t.group;n&&"object"==d(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},Bt=function(){!jt&&ot&&R(ot,"display","none")},zt=function(){!jt&&ot&&R(ot,"display","")};At&&document.addEventListener("click",(function(t){if(xt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),xt=!1,!1}),!0);var Ht=function(t){if(it){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,r=t.clientY,It.some((function(t){var e=t[Y].options.emptyInsertThreshold;if(e&&!j(t)){var i=N(t),n=o>=i.left-e&&o<=i.right+e,a=r>=i.top-e&&r<=i.bottom+e;return n&&a?s=t:void 0}})),s);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Y]._onDragOver(i)}}var o,r,s},Wt=function(t){it&&it.parentNode[Y]._isOutsideThisEl(t.target)};function Vt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=m({},e),t[Y]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ft(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Vt.supportPointer&&"PointerEvent"in window&&!E,emptyInsertThreshold:5};for(var n in Q.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var o in qt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Ut,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?M(t,"pointerdown",this._onTapStart):(M(t,"mousedown",this._onTapStart),M(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(M(t,"dragover",this),M(t,"dragenter",this)),It.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),m(this,X())}function Yt(t,e,i,n,o,r,s,a){var l,c,u=t[Y],h=u.options.onMove;return!window.CustomEvent||_||v?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=o||e,l.relatedRect=r||N(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(c=h.call(u,l,s)),c}function Xt(t){t.draggable=!1}function Zt(){Dt=!1}function Kt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Qt(t){return setTimeout(t,0)}function Jt(t){return clearTimeout(t)}Vt.prototype={constructor:Vt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ct=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,it):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,o=n.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=n.filter;if(function(t){kt.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&kt.push(n)}}(i),!it&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!E||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=x(a,n.draggable,i,!1))&&a.animated||at===a)){if(ut=F(a),dt=F(a,n.draggable),"function"==typeof c){if(c.call(this,t,a,this))return et({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:i,fromEl:i}),tt("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=x(l,n.trim(),i,!1))return et({sortable:e,rootEl:n,name:"filter",targetEl:a,fromEl:i,toEl:i}),tt("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());n.handle&&!x(l,n.handle,i,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,i){var n,o=this,r=o.el,s=o.options,a=r.ownerDocument;if(i&&!it&&i.parentNode===r){var l=N(i);if(rt=r,nt=(it=i).parentNode,st=it.nextSibling,at=i,mt=s.group,Vt.dragged=it,gt={target:it,clientX:(e||t).clientX,clientY:(e||t).clientY},Et=gt.clientX-l.left,wt=gt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,it.style["will-change"]="all",n=function(){tt("delayEnded",o,{evt:t}),Vt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!y&&o.nativeDraggable&&(it.draggable=!0),o._triggerDragStart(t,e),et({sortable:o,name:"choose",originalEvent:t}),G(it,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){k(it,t.trim(),Xt)})),M(a,"dragover",Ht),M(a,"mousemove",Ht),M(a,"touchmove",Ht),M(a,"mouseup",o._onDrop),M(a,"touchend",o._onDrop),M(a,"touchcancel",o._onDrop),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,it.draggable=!0),tt("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||_))n();else{if(Vt.eventCanceled)return void this._onDrop();M(a,"mouseup",o._disableDelayedDrag),M(a,"touchend",o._disableDelayedDrag),M(a,"touchcancel",o._disableDelayedDrag),M(a,"mousemove",o._delayedDragTouchMoveHandler),M(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&M(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(n,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){it&&Xt(it),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;P(t,"mouseup",this._disableDelayedDrag),P(t,"touchend",this._disableDelayedDrag),P(t,"touchcancel",this._disableDelayedDrag),P(t,"mousemove",this._delayedDragTouchMoveHandler),P(t,"touchmove",this._delayedDragTouchMoveHandler),P(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?M(document,"pointermove",this._onTouchMove):M(document,e?"touchmove":"mousemove",this._onTouchMove):(M(it,"dragend",this),M(rt,"dragstart",this._onDragStart));try{document.selection?Qt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(St=!1,rt&&it){tt("dragStarted",this,{evt:e}),this.nativeDraggable&&M(document,"dragover",Wt);var i=this.options;!t&&G(it,i.dragClass,!1),G(it,i.ghostClass,!0),Vt.active=this,t&&this._appendGhost(),et({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_t){this._lastX=_t.clientX,this._lastY=_t.clientY,Bt();for(var t=document.elementFromPoint(_t.clientX,_t.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(_t.clientX,_t.clientY))!==e;)e=t;if(it.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]){if(e[Y]._onDragOver({clientX:_t.clientX,clientY:_t.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);zt()}},_onTouchMove:function(t){if(gt){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=ot&&D(ot,!0),s=ot&&r&&r.a,a=ot&&r&&r.d,l=Nt&&Lt&&q(Lt),c=(o.clientX-gt.clientX+n.x)/(s||1)+(l?l[0]-Rt[0]:0)/(s||1),u=(o.clientY-gt.clientY+n.y)/(a||1)+(l?l[1]-Rt[1]:0)/(a||1);if(!Vt.active&&!St){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(ot){r?(r.e+=c-(vt||0),r.f+=u-(yt||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");R(ot,"webkitTransform",h),R(ot,"mozTransform",h),R(ot,"msTransform",h),R(ot,"transform",h),vt=c,yt=u,_t=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ot){var t=this.options.fallbackOnBody?document.body:rt,e=N(it,!0,Nt,!0,t),i=this.options;if(Nt){for(Lt=t;"static"===R(Lt,"position")&&"none"===R(Lt,"transform")&&Lt!==document;)Lt=Lt.parentNode;Lt!==document.body&&Lt!==document.documentElement?(Lt===document&&(Lt=A()),e.top+=Lt.scrollTop,e.left+=Lt.scrollLeft):Lt=A(),Rt=q(Lt)}G(ot=it.cloneNode(!0),i.ghostClass,!1),G(ot,i.fallbackClass,!0),G(ot,i.dragClass,!0),R(ot,"transition",""),R(ot,"transform",""),R(ot,"box-sizing","border-box"),R(ot,"margin",0),R(ot,"top",e.top),R(ot,"left",e.left),R(ot,"width",e.width),R(ot,"height",e.height),R(ot,"opacity","0.8"),R(ot,"position",Nt?"absolute":"fixed"),R(ot,"zIndex","100000"),R(ot,"pointerEvents","none"),Vt.ghost=ot,t.appendChild(ot),R(ot,"transform-origin",Et/parseInt(ot.style.width)*100+"% "+wt/parseInt(ot.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,o=i.options;tt("dragStart",this,{evt:t}),Vt.eventCanceled?this._onDrop():(tt("setupClone",this),Vt.eventCanceled||((lt=V(it)).draggable=!1,lt.style["will-change"]="",this._hideClone(),G(lt,this.options.chosenClass,!1),Vt.clone=lt),i.cloneId=Qt((function(){tt("clone",i),Vt.eventCanceled||(i.options.removeCloneOnHide||rt.insertBefore(lt,it),i._hideClone(),et({sortable:i,name:"clone"}))})),!e&&G(it,o.dragClass,!0),e?(xt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(P(document,"mouseup",i._onDrop),P(document,"touchend",i._onDrop),P(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",o.setData&&o.setData.call(i,n,it)),M(document,"drop",i),R(it,"transform","translateZ(0)")),St=!0,i._dragStartId=Qt(i._dragStarted.bind(i,e,t)),M(document,"selectstart",i),bt=!0,E&&R(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,o,r=this.el,s=t.target,a=this.options,l=a.group,c=Vt.active,u=mt===l,d=a.sort,p=ft||c,m=this,f=!1;if(!Dt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=x(s,a.draggable,r,!0),D("dragOver"),Vt.eventCanceled)return f;if(it.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||m._ignoreWhileAnimating===s)return A(!1);if(xt=!1,c&&!a.disabled&&(u?d||(n=nt!==rt):ft===this||(this.lastPutMode=mt.checkPull(this,c,it,t))&&l.checkPut(this,c,it,t))){if(o="vertical"===this._getDirection(t,s),e=N(it),D("dragOverValid"),Vt.eventCanceled)return f;if(n)return nt=rt,k(),this._hideClone(),D("revert"),Vt.eventCanceled||(st?rt.insertBefore(it,st):rt.appendChild(it)),A(!0);var g=j(r,a.draggable);if(!g||function(t,e,i){var n=N(j(i.el,i.options.draggable));return e?t.clientX>n.right+10||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+10}(t,o,this)&&!g.animated){if(g===it)return A(!1);if(g&&r===t.target&&(s=g),s&&(i=N(s)),!1!==Yt(rt,r,it,e,s,i,t,!!s))return k(),r.appendChild(it),nt=r,q(),A(!0)}else if(g&&function(t,e,i){var n=N(U(i.el,0,i.options,!0));return e?t.clientX<n.left-10||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-10||t.clientY<n.bottom&&t.clientX<n.left}(t,o,this)){var _=U(r,0,a,!0);if(_===it)return A(!1);if(i=N(s=_),!1!==Yt(rt,r,it,e,s,i,t,!1))return k(),r.insertBefore(it,_),nt=r,q(),A(!0)}else if(s.parentNode===r){i=N(s);var v,y,E,w=it.parentNode!==r,b=!function(t,e,i){var n=i?t.left:t.top,o=i?t.right:t.bottom,r=i?t.width:t.height,s=i?e.left:e.top,a=i?e.right:e.bottom,l=i?e.width:e.height;return n===s||o===a||n+r/2===s+l/2}(it.animated&&it.toRect||e,s.animated&&s.toRect||i,o),C=o?"top":"left",M=O(s,"top","top")||O(it,"top","top"),P=M?M.scrollTop:void 0;if(Ct!==s&&(y=i[C],Tt=!1,Gt=!b&&a.invertSwap||w),0!==(v=function(t,e,i,n,o,r,s,a){var l=n?t.clientY:t.clientX,c=n?i.height:i.width,u=n?i.top:i.left,h=n?i.bottom:i.right,d=!1;if(!s)if(a&&Pt<c*o){if(!Tt&&(1===Mt?l>u+c*r/2:l<h-c*r/2)&&(Tt=!0),Tt)d=!0;else if(1===Mt?l<u+Pt:l>h-Pt)return-Mt}else if(l>u+c*(1-o)/2&&l<h-c*(1-o)/2)return function(t){return F(it)<F(t)?1:-1}(e);if((d=d||s)&&(l<u+c*r/2||l>h-c*r/2))return l>u+c/2?1:-1;return 0}(t,s,i,o,b?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Gt,Ct===s))){var L=F(it);do{L-=v,E=nt.children[L]}while(E&&("none"===R(E,"display")||E===ot))}if(0===v||E===s)return A(!1);Ct=s,Mt=v;var S=s.nextElementSibling,I=!1,T=Yt(rt,r,it,e,s,i,t,I=1===v);if(!1!==T)return 1!==T&&-1!==T||(I=1===T),Dt=!0,setTimeout(Zt,30),k(),I&&!S?r.appendChild(it):s.parentNode.insertBefore(it,I?S:s),M&&W(M,0,P-M.scrollTop),nt=it.parentNode,void 0===y||Gt||(Pt=Math.abs(y-N(s)[C])),q(),A(!0)}if(r.contains(it))return A(!1)}return!1}function D(a,l){tt(a,m,h({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:d,fromSortable:p,target:s,completed:A,onMove:function(i,n){return Yt(rt,r,it,e,i,N(i),t,n)},changed:q},l))}function k(){D("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function A(e){return D("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(m),m!==p&&(G(it,ft?ft.options.ghostClass:c.options.ghostClass,!1),G(it,a.ghostClass,!0)),ft!==m&&m!==Vt.active?ft=m:m===Vt.active&&ft&&(ft=null),p===m&&(m._ignoreWhileAnimating=s),m.animateAll((function(){D("dragOverAnimationComplete"),m._ignoreWhileAnimating=null})),m!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(s===it&&!it.animated||s===r&&!s.animated)&&(Ct=null),a.dragoverBubble||t.rootEl||s===document||(it.parentNode[Y]._isOutsideThisEl(t.target),!e&&Ht(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),f=!0}function q(){ht=F(it),pt=F(it,a.draggable),et({sortable:m,name:"change",toEl:r,newIndex:ht,newDraggableIndex:pt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){P(document,"mousemove",this._onTouchMove),P(document,"touchmove",this._onTouchMove),P(document,"pointermove",this._onTouchMove),P(document,"dragover",Ht),P(document,"mousemove",Ht),P(document,"touchmove",Ht)},_offUpEvents:function(){var t=this.el.ownerDocument;P(t,"mouseup",this._onDrop),P(t,"touchend",this._onDrop),P(t,"pointerup",this._onDrop),P(t,"touchcancel",this._onDrop),P(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;ht=F(it),pt=F(it,i.draggable),tt("drop",this,{evt:t}),nt=it&&it.parentNode,ht=F(it),pt=F(it,i.draggable),Vt.eventCanceled||(St=!1,Gt=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Jt(this.cloneId),Jt(this._dragStartId),this.nativeDraggable&&(P(document,"drop",this),P(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),E&&R(document.body,"user-select",""),R(it,"transform",""),t&&(bt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),ot&&ot.parentNode&&ot.parentNode.removeChild(ot),(rt===nt||ft&&"clone"!==ft.lastPutMode)&<&<.parentNode&<.parentNode.removeChild(lt),it&&(this.nativeDraggable&&P(it,"dragend",this),Xt(it),it.style["will-change"]="",bt&&!St&&G(it,ft?ft.options.ghostClass:this.options.ghostClass,!1),G(it,this.options.chosenClass,!1),et({sortable:this,name:"unchoose",toEl:nt,newIndex:null,newDraggableIndex:null,originalEvent:t}),rt!==nt?(ht>=0&&(et({rootEl:nt,name:"add",toEl:nt,fromEl:rt,originalEvent:t}),et({sortable:this,name:"remove",toEl:nt,originalEvent:t}),et({rootEl:nt,name:"sort",toEl:nt,fromEl:rt,originalEvent:t}),et({sortable:this,name:"sort",toEl:nt,originalEvent:t})),ft&&ft.save()):ht!==ut&&ht>=0&&(et({sortable:this,name:"update",toEl:nt,originalEvent:t}),et({sortable:this,name:"sort",toEl:nt,originalEvent:t})),Vt.active&&(null!=ht&&-1!==ht||(ht=ut,pt=dt),et({sortable:this,name:"end",toEl:nt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){tt("nulling",this),rt=it=nt=ot=st=lt=at=ct=gt=_t=bt=ht=pt=ut=dt=Ct=Mt=ft=mt=Vt.dragged=Vt.ghost=Vt.clone=Vt.active=null,kt.forEach((function(t){t.checked=!0})),kt.length=vt=yt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":it&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,o=i.length,r=this.options;n<o;n++)x(t=i[n],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Kt(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var o=n.children[e];x(o,this.options.draggable,n,!1)&&(i[t]=o)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return x(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Q.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&qt(i)},destroy:function(){tt("destroy",this);var t=this.el;t[Y]=null,P(t,"mousedown",this._onTapStart),P(t,"touchstart",this._onTapStart),P(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(P(t,"dragover",this),P(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),It.splice(It.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!ct){if(tt("hideClone",this),Vt.eventCanceled)return;R(lt,"display","none"),this.options.removeCloneOnHide&<.parentNode&<.parentNode.removeChild(lt),ct=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(ct){if(tt("showClone",this),Vt.eventCanceled)return;it.parentNode!=rt||this.options.group.revertClone?st?rt.insertBefore(lt,st):rt.appendChild(lt):rt.insertBefore(lt,it),this.options.group.revertClone&&this.animate(it,lt),R(lt,"display",""),ct=!1}}else this._hideClone()}},At&&M(document,"touchmove",(function(t){(Vt.active||St)&&t.cancelable&&t.preventDefault()})),Vt.utils={on:M,off:P,css:R,find:k,is:function(t,e){return!!x(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:H,closest:x,toggleClass:G,clone:V,index:F,nextTick:Qt,cancelNextTick:Jt,detectDirection:Ft,getChild:U},Vt.get=function(t){return t[Y]},Vt.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Vt.utils=h(h({},Vt.utils),t.utils)),Q.mount(t)}))},Vt.create=function(t,e){return new Vt(t,e)},Vt.version="1.14.0";var $t,te,ee,ie,ne,oe,re=[],se=!1;function ae(){re.forEach((function(t){clearInterval(t.pid)})),re=[]}function le(){clearInterval(oe)}var ce=H((function(t,e,i,n){if(e.scroll){var o,r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=A(),u=!1;te!==i&&(te=i,ae(),$t=e.scroll,o=e.scrollFn,!0===$t&&($t=B(i,!0)));var h=0,d=$t;do{var p=d,m=N(p),f=m.top,g=m.bottom,_=m.left,v=m.right,y=m.width,E=m.height,w=void 0,b=void 0,C=p.scrollWidth,M=p.scrollHeight,P=R(p),L=p.scrollLeft,S=p.scrollTop;p===c?(w=y<C&&("auto"===P.overflowX||"scroll"===P.overflowX||"visible"===P.overflowX),b=E<M&&("auto"===P.overflowY||"scroll"===P.overflowY||"visible"===P.overflowY)):(w=y<C&&("auto"===P.overflowX||"scroll"===P.overflowX),b=E<M&&("auto"===P.overflowY||"scroll"===P.overflowY));var x=w&&(Math.abs(v-r)<=a&&L+y<C)-(Math.abs(_-r)<=a&&!!L),I=b&&(Math.abs(g-s)<=a&&S+E<M)-(Math.abs(f-s)<=a&&!!S);if(!re[h])for(var T=0;T<=h;T++)re[T]||(re[T]={});re[h].vx==x&&re[h].vy==I&&re[h].el===p||(re[h].el=p,re[h].vx=x,re[h].vy=I,clearInterval(re[h].pid),0==x&&0==I||(u=!0,re[h].pid=setInterval(function(){n&&0===this.layer&&Vt.active._onTouchMove(ne);var e=re[this.layer].vy?re[this.layer].vy*l:0,i=re[this.layer].vx?re[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Vt.dragged.parentNode[Y],i,e,t,ne,re[this.layer].el)||W(re[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&d!==c&&(d=B(d,!1)));se=u}}),30),ue=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,o=t.activeSortable,r=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=i||o;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(u)&&(r("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function he(){}function de(){}he.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=U(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:ue},m(he,{pluginName:"revertOnSpill"}),de.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:ue},m(de,{pluginName:"removeOnSpill"});Vt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?M(document,"dragover",this._handleAutoScroll):this.options.supportPointer?M(document,"pointermove",this._handleFallbackAutoScroll):e.touches?M(document,"touchmove",this._handleFallbackAutoScroll):M(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?P(document,"dragover",this._handleAutoScroll):(P(document,"pointermove",this._handleFallbackAutoScroll),P(document,"touchmove",this._handleFallbackAutoScroll),P(document,"mousemove",this._handleFallbackAutoScroll)),le(),ae(),clearTimeout(I),I=void 0},nulling:function(){ne=te=$t=se=oe=ee=ie=null,re.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(n,o);if(ne=t,e||this.options.forceAutoScrollFallback||v||_||E){ce(t,this.options,r,e);var s=B(r,!0);!se||oe&&n===ee&&o===ie||(oe&&le(),oe=setInterval((function(){var r=B(document.elementFromPoint(n,o),!0);r!==s&&(s=r,ae()),ce(t,i.options,r,e)}),10),ee=n,ie=o)}else{if(!this.options.bubbleScroll||B(r,!0)===A())return void ae();ce(t,this.options,B(r,!1),!1)}}},m(t,{pluginName:"scroll",initializeByDefault:!0})}),Vt.mount(de,he);var pe,me=Vt,fe={_createDraggableElement:function(t,e){navigator.userAgent.match(/chrome|chromium|crios/i)?me.create(t,{handle:".GPlayerName",draggable:".draggable-layer",ghostClass:"GPghostLayer",animation:200,forceFallback:!0,onEnd:function(t){e._onDragAndDropLayerClick(t)}}):me.create(t,{handle:".GPlayerName",draggable:".draggable-layer",ghostClass:"GPghostLayer",animation:200,onEnd:function(t){e._onDragAndDropLayerClick(t)}})},_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPlayerSwitcher"),t.className="GPwidget",t},_createMainLayersShowElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowLayersList"),t.type="checkbox",t},_createMainLayersElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPlayersList"),t.className="GPpanel",t},_createMainPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowLayersListPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowLayersList"),e.title="Afficher/masquer le gestionnaire de couches";var i=document.createElement("span");i.id=this._addUID("GPshowLayersListOpen"),i.className="GPshowAdvancedToolOpen",i.addEventListener("click",(function(){if(document.getElementById(t._addUID("GPshowLayersList")).checked){for(var e=document.getElementsByClassName("GPlayerInfoOpened"),i=0;i<e.length;i++)e[i].className="GPlayerInfo";document.getElementById(t._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed"}})),e.appendChild(i);var n=document.createElement("span");return n.addEventListener("click",(function(){if(document.getElementById(t._addUID("GPshowLayersList")).checked){for(var e=document.getElementsByClassName("GPlayerInfoOpened"),i=0;i<e.length;i++)e[i].className="GPlayerInfo";document.getElementById(t._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed"}})),n.id=t._addUID("GPshowLayersListClose"),e.appendChild(n),e},_createMainInfoElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPlayerInfoPanel"),t.className="GPpanel GPlayerInfoPanelClosed",t},_createContainerLayerElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPlayerSwitcher_ID_"+t.id),e.className="GPlayerSwitcher_layer draggable-layer",e.appendChild(this._createBasicToolElement(t));for(var i=this._createAdvancedToolShowElement(t),n=0;n<i.length;n++)e.appendChild(i[n]);return e.appendChild(this._createAdvancedToolElement(t)),e},_createBasicToolElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPbasicTools_ID_"+t.id),e.className="GPlayerBasicTools",e.appendChild(this._createBasicToolNameElement(t));for(var i=this._createBasicToolVisibilityElement(t),n=0;n<i.length;n++)e.appendChild(i[n]);return e},_createBasicToolNameElement:function(t){var e=document.createElement("span");return e.id=this._addUID("GPname_ID_"+t.id),e.className="GPlayerName",e.title=t.description||t.title,e.innerHTML=t.title,e},_createBasicToolVisibilityElement:function(t){var e=[],i=void 0===t.visibility||t.visibility,n=this._addUID("GPvisibility_ID_"+t.id),o=document.createElement("input");o.id=n,o.type="checkbox",o.checked=i;var r=document.createElement("label");r.htmlFor=n,r.id=this._addUID("GPvisibilityPicto_ID_"+t.id),r.className="GPlayerVisibility",r.title="Afficher/masquer la couche";var s=this;return o.addEventListener?o.addEventListener("click",(function(t){s._onVisibilityLayerClick(t)})):o.attachEvent&&o.attachEvent("onclick",(function(t){s._onVisibilityLayerClick(t)})),e.push(o),e.push(r),e},_createAdvancedToolShowElement:function(t){var e=[],i=document.createElement("label");i.id=this._addUID("GPshowAdvancedToolsPicto_ID_"+t.id),i.htmlFor=this._addUID("GPshowAdvancedTools_ID_"+t.id),i.title="Plus d'outils",i.className="GPshowMoreOptions GPshowLayerAdvancedTools";var n=document.createElement("input");return n.type="checkbox",n.id=this._addUID("GPshowAdvancedTools_ID_"+t.id),e.push(n),e.push(i),e},_createAdvancedToolElement:function(t){var e=document.createElement("div");if(e.id=this._addUID("GPadvancedTools_ID_"+t.id),e.className="GPlayerAdvancedTools",e.appendChild(this._createAdvancedToolDeleteElement(t)),t.title&&t.description&&e.appendChild(this._createAdvancedToolInformationElement(t)),"feature"!==t.type)for(var i=this._createAdvancedToolOpacityElement(t),n=0;n<i.length;n++)e.appendChild(i[n]);return e},_createAdvancedToolDeleteElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPremove_ID_"+t.id),e.className="GPlayerRemove",e.title="Supprimer la couche",e.layerId=t.id;var i=this;return e.addEventListener?e.addEventListener("click",(function(t){i._onDropLayerClick(t)})):e.attachEvent&&e.attachEvent("onclick",(function(t){i._onDropLayerClick(t)})),e},_createAdvancedToolInformationElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPinfo_ID_"+t.id),e.className="GPlayerInfo",e.title="Informations/légende",e.layerId=t.id;var i=this;return e.addEventListener?e.addEventListener("click",(function(t){i._onOpenLayerInfoClick(t)})):e.attachEvent&&e.attachEvent("onclick",(function(t){i._onOpenLayerInfoClick(t)})),e},_createAdvancedToolOpacityElement:function(t){var e=[],i=document.createElement("div");i.id=this._addUID("GPopacity_ID_"+t.id),i.className="GPlayerOpacity",i.title="Opacité";var n=void 0!==t.opacity?t.opacity:1;n=Math.round(100*n);var o=document.createElement("input");o.id=this._addUID("GPopacityValueDiv_ID_"+t.id),o.type="range",o.value=n;var r=this;o.addEventListener?o.addEventListener("change",(function(t){r._onChangeLayerOpacity(t)})):o.attachEvent&&o.attachEvent("onchange",(function(t){r._onChangeLayerOpacity(t)})),o.addEventListener?o.addEventListener("input",(function(t){r._onChangeLayerOpacity(t)})):o.attachEvent&&o.attachEvent("oninput",(function(t){r._onChangeLayerOpacity(t)})),i.appendChild(o);var s=document.createElement("div");s.id=this._addUID("GPopacityValueDiv_ID_"+t.id),s.className="GPlayerOpacityValue";var a=document.createElement("span");return a.id=this._addUID("GPopacityValue_ID_"+t.id),a.innerHTML=n+"%",s.appendChild(a),e.push(i),e.push(s),e},_createContainerLayerInfoElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPlayerInfoContent");var i=document.createElement("div");if(i.id=this._addUID("GPlayerInfoTitle"),i.innerHTML=t.title,e.appendChild(i),t.quicklookUrl){var n=document.createElement("div");n.id=this._addUID("GPlayerInfoQuicklook"),n.title="Afficher un aperçu de la couche";var o=document.createElement("a");o.href=t.quicklookUrl,o.appendChild(n),e.appendChild(o)}var r=document.createElement("div");r.id=this._addUID("GPlayerInfoClose"),r.title="Fermer la fenêtre";var s=this,a=function(){document.getElementById(s._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed";for(var t=document.getElementsByClassName("GPlayerInfoOpened"),e=0;e<t.length;e++)t[e].className="GPlayerInfo"};r.addEventListener?r.addEventListener("click",a):r.attachEvent&&r.attachEvent("onclick",a),e.appendChild(r);var l=document.createElement("div");if(l.id=this._addUID("GPlayerInfoDescription"),l.innerHTML=t.description,e.appendChild(l),t.metadata){var c=document.createElement("div");c.id=this._addUID("GPlayerInfoMetadata");var u=document.createElement("div");u.className="GPlayerInfoSubtitle",u.innerHTML="Métadonnées",c.appendChild(u);for(var h=0;h<t.metadata.length;h++){var d=t.metadata[h].url,p=document.createElement("div");p.className="GPlayerInfoLink";var m=document.createElement("a");m.href=d,m.innerHTML=d,p.appendChild(m),c.appendChild(p)}0!==t.metadata.length&&e.appendChild(c)}if(t.legends){var f=document.createElement("div");f.id=this._addUID("GPlayerInfoLegend");var g=document.createElement("div");g.className="GPlayerInfoSubtitle",g.innerHTML="Légende",f.appendChild(g);for(var _={},v=t.maxScaleDenominator||56e7,y=0;y<t.legends.length;y++){var E=t.legends[y].minScaleDenominator;if(E){var w=E.toString();E=Math.round(parseInt(w.substring(0,3),10)/10)*Math.pow(10,w.length-2)}else E=270;_[E]=t.legends[y]}for(var b in _)if(_.hasOwnProperty(b)){var C=_[b].url;if("string"==typeof C&&-1===C.toLowerCase().indexOf("nolegend.jpg")){var M=document.createElement("div");M.className="GPlayerInfoLink",v=_[b].maxScaleDenominator||v;var P=document.createElement("a");P.href=C,P.innerHTML="Du 1/"+b+" au 1/"+v,M.appendChild(P),f.appendChild(M)}else delete _[b]}0!==Object.keys(_).length&&e.appendChild(f)}return e}},ge=l.getLogger("layerswitcher"),_e=r.a.Control.Layers.extend({includes:fe,options:{collapsed:!0,position:"topright",autoZIndex:!0,layers:[]},initialize:function(t){if(r.a.Util.setOptions(this,t),this._uid=c.generate(),this._hasLayersConfig=!(!this.options.layers||0===Object.keys(this.options.layers).length),this._layersConfig=this._hasLayersConfig?this.options.layers:[],this._layers={},this._lastZIndex=0,this._hasLayersConfig)for(var e=0;e<this._layersConfig.length;e++){var i=this._layersConfig[e];this._addLayer(i.layer,null,!0)}},onAdd:function(t){var e=t._layers;if(0!==Object.keys(e).length){var i=Object.keys(e);this._lastZIndex=0;for(var n=0;n<i.length;n++){var o=i[n];this.options.autoZIndex&&e[o].setZIndex&&(this._lastZIndex++,e[o].setZIndex(this._lastZIndex)),this._hasLayersConfig&&this._layers[o]||this.addOverlay(e[o])}}if(0===Object.keys(e).length){var r=this._layersConfig;this._lastZIndex=0;for(var s=0;s<r.length;s++){var a=r[s].layer;t.hasLayer(a)||(t.addLayer(a),this.addOverlay(a,null),this.options.autoZIndex&&a.setZIndex&&(this._lastZIndex++,a.setZIndex(this._lastZIndex)))}}for(var l in this._layers)if(this._layers.hasOwnProperty(l)){var c=this._layers[l],u=c.layer;c.visibility||this._updateVisibilityLayer(u)}return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this),t.on("layerremove",this._onLayerChange,this),t.eachLayer((function(t){t.on("visibilitychange",(function(){ge.trace("visibilitychange",t)}),this),t.on("attributionchange",(function(){ge.trace("attributionchange",t)}),this)})),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this),t.off("layerremove",this._onLayerChange,this)},_addLayer:function(t,e,i){var n=t._geoportal_id?t._geoportal_id:t._leaflet_id;if(void 0!==n){var o={};for(var s in this._layersConfig)if(this._layersConfig.hasOwnProperty(s)&&n===r.a.stamp(this._layersConfig[s].layer)){if(o=this._layersConfig[s].config,!(void 0===this._layersConfig[s].display||this._layersConfig[s].display))return;break}this._layers[n]={layer:t,id:n,overlay:i,title:t._geoportal_id&&t._title?t._title:e||n,description:t._geoportal_id&&t._description?t._description:e||n,visibility:!0,legends:t._geoportal_id?t._legends:null,metadata:t._geoportal_id?t._metadata:null,quicklookUrl:t._geoportal_id?t._quicklookUrl:null},o&&Object.keys(o).length&&r.a.Util.extend(this._layers[n],o);var a=this._layers[n].visibility;t._geoportal_id&&t.setVisible(a),a||this._updateVisibilityLayer(t)}},addTo:function(t){return r.a.Control.prototype.addTo.call(this,t),this},_initLayout:function(){var t=this._container=this._createMainContainerElement(),e=this._createMainLayersShowElement();t.appendChild(e),this.options.collapsed||(e.checked=!0);var i=this._overlaysList=this._createMainLayersElement();t.appendChild(i);var n=this._createMainPictoElement();t.appendChild(n);var o=this._createMainInfoElement();switch(t.appendChild(o),this._createDraggableElement(this._overlaysList,this),r.a.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),this._map.on("moveend",this._onOutOfRangeLayerZoom,this),this.getPosition()){case"topright":t.style.position="relative",t.style.top="0",t.style.right="0";break;case"topleft":case"bottomleft":t.style.position="relative",t.style.top="0",t.style.right="initial",n.style.float="left",i.style.borderBottomRightRadius="5px",i.style.borderBottomLeftRadius="0",o.style.right="initial",o.style.left="190px";break;case"bottomright":t.style.position="relative",t.style.top="0",t.style.right="0";break;default:t.style.position="relative",t.style.top="0",t.style.right="0"}},_update:function(){if(this._container){this._overlaysList.innerHTML="";var t=[];for(var e in this._layers)this._layers.hasOwnProperty(e)&&t.push(e);for(var i=t.sort((function(t,e){return parseInt(t,10)-parseInt(e,10)})).reverse(),n=0;n<i.length;n++){var o=i[n],r=this._layers[o];this._addItem(r)}}},_addItem:function(t){ge.log("_addItem",t),t.opacity=t.layer.options.opacity;var e=this._createContainerLayerElement(t);return t.layer.options.minZoom>this._map.getZoom()||t.layer.options.maxZoom<this._map.getZoom()?r.a.DomUtil.addClass(e,"outOfRange"):r.a.DomUtil.removeClass(e,"outOfRange"),this._overlaysList.appendChild(e),e},_onLayerChange:function(t){var e=this._layers[r.a.stamp(t.layer)];e&&(this._handlingClick||this._update(),this._map.fire("layeradd"===t.type?"overlayadd":"overlayremove",e))},removeLayer:function(t){var e=r.a.stamp(t);delete this._layers[e],this._update();var i=this._map;return i&&i.hasLayer(t)&&i.removeLayer(t),this},_updateVisibilityLayer:function(t){if(this._map){this._handlingClick=!0;var e=this._layers[r.a.stamp(t)].visibility;e&&!this._map.hasLayer(t)?this._map.addLayer(t):!e&&this._map.hasLayer(t)?this._map.removeLayer(t):ge.log("Status unknown layer !?"),this._handlingClick=!1,this._refocusOnMap()}},_updateVisibilityDOMLayer:function(t){var e=r.a.stamp(t),i=r.a.DomUtil.get(this._addUID("GPvisibility_ID_"+e)),n=this._layers[e].visibility;i.checked=n},_updateOpacityDOMLayer:function(t){var e=r.a.stamp(t),i=t.options.opacity,n=r.a.DomUtil.get(this._addUID("GPopacityValue_ID_"+e));n.innerHTML=parseInt(100*i,10)+"%",n.value=parseInt(100*i,10)},_onOutOfRangeLayerZoom:function(){var t=this._map,e=this._layers;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i].layer,o=e[i].id,s=r.a.DomUtil.get(this._addUID("GPlayerSwitcher_ID_"+o));n.options.minZoom>t.getZoom()||n.options.maxZoom<t.getZoom()?r.a.DomUtil.addClass(s,"outOfRange"):r.a.DomUtil.removeClass(s,"outOfRange")}},_onVisibilityLayerClick:function(t){var e=t.target.id,i=c.index(e);this._layers[i].visibility=r.a.DomUtil.get(e).checked;var n=this._layers[i].layer;this._updateVisibilityLayer(n)},_onDropLayerClick:function(t){var e=t.target.id,i=c.index(e),n=this._layers[i].layer;this.removeLayer(n)},_onChangeLayerOpacity:function(t){var e=t.target.id,i=c.index(e),n=this._layers[i].layer,o=t.target.value;r.a.DomUtil.get(this._addUID("GPopacityValue_ID_"+i)).innerHTML=o+"%",this._map.hasLayer(n)&&(void 0!==n.setOpacity?n.setOpacity(o/100):n.setStyle({fillOpacity:o/100,opacity:o/100}))},_onOpenLayerInfoClick:function(t){var e=t.target.id,i=c.index(e),n=this._layers[i],o=r.a.DomUtil.get(t.target.id),s=null,a=null;if("GPlayerInfoOpened"===o.className)return r.a.DomUtil.removeClass(o,"GPlayerInfoOpened"),r.a.DomUtil.addClass(o,"GPlayerInfo"),s=r.a.DomUtil.get(this._addUID("GPlayerInfoPanel")),r.a.DomUtil.removeClass(s,"GPpanel"),r.a.DomUtil.removeClass(s,"GPlayerInfoPanelOpened"),r.a.DomUtil.addClass(s,"GPlayerInfoPanelClosed"),a=r.a.DomUtil.get(this._addUID("GPlayerInfoContent")),void s.removeChild(a);for(var l=document.getElementsByClassName("GPlayerInfoOpened"),u=0;u<l.length;u++)l[u].className="GPlayerInfo";r.a.DomUtil.removeClass(o,"GPlayerInfo"),r.a.DomUtil.addClass(o,"GPlayerInfoOpened"),s=r.a.DomUtil.get(this._addUID("GPlayerInfoPanel")),r.a.DomUtil.addClass(s,"GPpanel"),r.a.DomUtil.removeClass(s,"GPlayerInfoPanelClosed"),r.a.DomUtil.addClass(s,"GPlayerInfoPanelOpened"),(a=r.a.DomUtil.get(this._addUID("GPlayerInfoContent")))&&s.removeChild(a);var h=this._createContainerLayerInfoElement(n);s.appendChild(h)},_onDragAndDropLayerClick:function(t){var e=t.target.id,i=c.index(e),n=this._layers[i];ge.log(n);var o=document.querySelectorAll("div.GPlayerSwitcher_layer");this._lastZIndex=o.length;for(var r=0;r<o.length;r++){var s=o[r].id,a=c.index(s),l=this._layers[a].layer;this.options.autoZIndex&&l.setZIndex&&(this._lastZIndex--,l.setZIndex(this._lastZIndex))}},addLayer:function(t,e){var i=this._map,n=this._layersConfig;if(t){i.hasLayer(t)||(ge.log("[WARN] LayerSwitcher:addLayer - layer has not been added on map !"),i.addLayer(t));var o=r.a.stamp(t);for(var s in n)if(n.hasOwnProperty(s)&&o===r.a.stamp(n[s].layer)){delete n[s];break}var a=e||{};r.a.Util.extend(a,{layer:t}),n.push(a),this._layers[o]||t.setZIndex(this._lastZIndex++),this.addOverlay(t),this._update()}else ge.log("[ERROR] LayerSwitcher:addLayer - missing layer parameter !")},setOpacity:function(t,e){ge.trace(t,e),e>1||e<0||this._map.hasLayer(t)&&(void 0!==t.setOpacity?t.setOpacity(e):(t.options.opacity=e,t.setStyle({fillOpacity:e,opacity:e})),this._updateOpacityDOMLayer(t))},setVisibility:function(t,e){ge.trace(t,e),this._layers[r.a.stamp(t)].visibility=e,this._updateVisibilityDOMLayer(t),this._updateVisibilityLayer(t)}}),ve={getLogger:function(t){if(void 0===e)var e={env:{VERBOSE:!1}};e.env.VERBOSE?a.enableAll():a.disableAll();var i=t||"default";return a.getLogger(i)}},ye={PARAM_MISSING:"Parameter(s) '%var%' missing",PARAM_EMPTY:"Parameter(s) '%var%' empty",PARAM_TYPE:"Wrong type(s) for parameter(s) '%var%'",PARAM_FORMAT:"Parameter(s) '%var%' not correctly formatted",PARAM_NOT_SUPPORT:"Value(s) for parameter(s) '%var%' not supported",PARAM_NOT_SUPPORT_NODEJS:"Value(s) for parameter(s) '%var%' not supported to NodeJS",PARAM_UNKNOWN:"Value(s) for parameter(s) '%var%' unknown",SERVICE_REQUEST_BUILD:"An error occurred during the request building of the service",SERVICE_REQUEST_EMPTY:"The request sent to the service is empty",SERVICE_RESPONSE_EXCEPTION:"The service returned an exception : '%var%'",SERVICE_RESPONSE_EXCEPTION_2:"The service returned an exception",SERVICE_RESPONSE_ANALYSE:"An error occurred while parsing the response '%var%' of the service",SERVICE_RESPONSE_ANALYSE_2:"An unknown error occurred while parsing the response",SERVICE_RESPONSE_EMPTY:"The response of the service is empty",SERVICE_RESPONSE_EMPTY_2:"The response from the service could not be analyzed or is empty",SERVICE_RESPONSE_FORMAT:"The format of the service response is not supported (handled format(s) : '%var%')",SERVICE_RESPONSE_FORMAT_2:"The format of the service response is not supported",SERVICE_RESPONSE_FORMAT_3:"No suggestion matching the search",CLASS_CONSTRUCTOR:"'%var%' constructor cannot be called as a function.",getMessage:function(t,e){if(0===Object.keys(arguments).length)return"Message indefined !";var i=Array.prototype.slice.call(arguments),n=i.shift(),o=i,r=this[n];try{r=Array.isArray(o)&&o.length>0?r.replace("%var%",o.join(" - ")):r.replace("%var%","%var% (not specified)")}catch(t){}return r}},Ee={normalyzeParameters:function(t){var e=null;if(t){var i=[];for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];o||(o=""),i.push(n+"="+o)}e=i.join("&")}return e},normalyzeUrl:function(t,e,i){var n=t;if(t){if(t.split("?").length-1>=2){var o=t.search(/\?/)+1;n=t.substring(0,o)+t.slice(o).replace(/\?/g,"&")}var r=t.indexOf("?");-1===r&&(n+="?"),-1!==r&&r!==t.length-1&&(n+="&")}return e&&(n+="string"==typeof e?e=e.replace("?",""):this.normalyzeParameters(e)),i&&(n=encodeURIComponent(n)),n},indent:function(t,e){return new Array((t||0)+1).join("\t")+e}},we=i(14),be=i.n(we),Ce={call:function(t){var e=ve.getLogger("XHR");if(e.trace("[XHR::call()]"),be.a.polyfill(),!t.url)throw new Error("missing parameter : url is not defined !");if(!t.method)throw new Error("missing parameter : method is not defined !");t.format||(t.format="text");var i={};switch(i.url=t.url,i.data=t.data?t.data:null,i.method=t.method,i.timeOut=t.timeOut||0,i.scope=t.scope||this,i.proxy=t.proxy||null,i.content=t.content||null,i.headers=t.headers||{referer:"http://localhost"},t.method){case"DELETE":case"GET":break;case"PUT":case"POST":i.content=t.content?t.content:"application/x-www-form-urlencoded",i.headers=t.headers?t.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(t.format){case"text":this.__call(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"json":this.__callJSON(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;case"xml":this.__callXML(i).then((function(i){e.trace(i),t.onResponse.call(this,i)})).catch((function(e){t.onFailure.call(this,e)}));break;default:throw new Error("This output Format is not yet supported !")}},__call:function(t){var e=ve.getLogger("XHR");return e.trace("[XHR::__call()]"),new Promise((function(n,o){var r="POST"===t.method||"PUT"===t.method?1:0;t.data&&("object"==typeof t.data&&Object.keys(t.data).length||"string"==typeof t.data&&t.data.length)&&!r&&(t.url=Ee.normalyzeUrl(t.url,t.data)),e.trace("URL = ",t.url);var s=null;if("undefined"==typeof window){var a=i(9),l={headers:{Referer:"https://localhost"}};return t.data&&"string"==typeof t.data&&r&&(l={method:t.method,body:t.data,headers:{"Content-Type":t.content,Referer:"https://localhost"}}),a(t.url,l).then((function(t){if(t.ok)n(t.text());else{var e="Errors Occured on Http Request (status : '"+t.statusText+"' | url : '"+t.url+"')",i=t.status;o({message:e,status:i})}})).catch((function(t){o({message:t,status:-1})}))}if(window.XMLHttpRequest){e.trace("XMLHttpRequest"),(s=new XMLHttpRequest).open(t.method,t.url,!0),s.overrideMimeType=t.content;var c=null;t.timeOut>0&&(e.trace("XHR - TimeOut actif !"),c=window.setTimeout((function(){o({message:"TimeOut Occured on Http Request with XMLHttpRequest !",status:-1})}),t.timeOut)),r&&(e.trace("data = ",t.data),s.setRequestHeader("Content-type",t.content)),s.onerror=function(t){console.log(t),o(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},s.ontimeout=function(t){console.log(t),o(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},s.onreadystatechange=function(t){if(4===s.readyState)if(200===s.status)window.clearTimeout(c),n(s.response);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"' | response : '"+t.target.response+"')",i=t.target.status;o({message:e,status:i})}};var u=t.data&&r?t.data:null;s.send(u)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");e.trace("XDomainRequest"),(s=new XDomainRequest).open(t.method,t.url),s.overrideMimeType=t.content,t.timeOut>0&&(s.timeout=t.timeout,e.trace("XHR - TimeOut actif !")),r&&s.setRequestHeader("Content-type",t.content),s.onerror=function(){o(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},s.ontimeout=function(){o(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},s.onload=function(t){if(200===s.status)n(s.responseText);else{var e="Errors Occured on Http Request (status : '"+t.target.statusText+"' | url : '"+t.target.responseURL+"')",i=t.target.status;o({message:e,status:i})}};var h=t.data&&r?t.data:null;s.send(h)}}))},__callJSON:function(t){return this.__call(t).then(JSON.parse).catch((function(e){console.log("_callJSON failed on : ",t.url,e)}))},__callXML:function(t){return this.__call(t).then((function(t){var e;"undefined"==typeof window?e=(new(0,i(10).DOMParser)).parseFromString(t,"text/xml"):window.DOMParser?e=(new window.DOMParser).parseFromString(t,"text/xml"):((e=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t));return e})).catch((function(e){console.log("__callXML failed on : ",t.url,e)}))}},Me={uuid:(pe=Math.floor(Date.now()),function(){return pe++}),call:function(t){var e=ve.getLogger("JSONP");if(e.trace("[JSONP::call ()]"),!t)throw e.error("missing parameter : options !"),new Error("missing parameter : options !");if(!t.url)throw e.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(t.timeOut||(e.info("setting 'options.timeOut' default value"),t.timeOut=0),!t.onResponse)throw e.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var i="string"==typeof t.callbackSuffix?t.callbackSuffix:this.uuid(),n=!1,o=!1,r=t.url.indexOf("callback=");if(-1!==r){n=!0;var s=t.url.indexOf("&",r);-1===s&&(s=t.url.length);var a=t.url.substring(r+9,s);a&&(o=!0,t.callbackName=a,e.info("setting 'options.callbackName' value ("+t.callbackName+") from 'options.url' parameter"))}if(!n){var l=t.url.indexOf("?");-1===l?t.url=t.url+"?callback=":l===t.url.length?t.url=t.url+"callback=":t.url=t.url+"&callback=",e.info("setting callback default key in 'options.url' : "+t.url)}var c=!!t.callbackName||o;if(o||(t.callbackName||(e.info("setting 'options.callbackName' default value"),t.callbackName="callback",(i||""===i)&&(t.callbackName+=i)),t.url=t.url.replace("callback=","callback="+t.callbackName),e.info("setting callback function name in 'options.url' : "+t.url)),t.onTimeOut||(e.info("setting 'options.onTimeOut' default value"),t.onTimeOut=function(){console.log("TimeOut while invoking url : "+t.url)}),!c){var u=this,h=null;t.timeOut>0&&(h=window.setTimeout((function(){window[t.callbackName]=function(){},t.onTimeOut(),u._deleteScript(i)}),t.timeOut)),window[t.callbackName]=function(e){window.clearTimeout(h),t.onResponse(e),u._deleteScript(i)}}this._createScript(i,t.url)},_createScript:function(t,e){var i,n=document.getElementById("results"+t);(i=document.createElement("script")).setAttribute("type","text/javascript"),i.setAttribute("src",e),i.setAttribute("charset","UTF-8"),i.setAttribute("id","results"+t),i.setAttribute("async","true");var o=document.documentElement||document.getElementsByTagName("head")[0];null===n?o.appendChild(i):o.replaceChild(i,n)},_deleteScript:function(t){var e=document.getElementById("results"+t);if(e){var i=e.parentNode||document.documentElement;if(!i)return;i.removeChild(e)}}},Pe={send:function(t){var e=t||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("undefined"!=typeof window||"JSONP"!==t.protocol){if("XHR"===t.protocol||"json"===t.format?e.wrap=!1:"JSONP"===t.protocol&&"xml"===t.format&&(e.wrap=!0),e.callback=null,e.output=e.wrap?"json":null,e.wrap){var i={};i.output=e.output,i.callback=e.callback,delete i.callback,e.url=Ee.normalyzeUrl(t.url,i)}switch(e.protocol){case"XHR":"GET"===t.method&&t.nocache&&(e.url=Ee.normalyzeUrl(e.url,{t:(new Date).getTime()})),Ce.call(e);break;case"JSONP":e.data&&(e.url=Ee.normalyzeUrl(e.url,e.data)),Me.call(e);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}else console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS")}};function Le(t){if(!(this instanceof Le))throw new TypeError("ErrorService constructor cannot be called as a function.");var e=t;"string"==typeof t||t instanceof String?(this.message=t,this.status=-1,this.type=Le.TYPE_UNKERR):(this.message=e.message||"undefined!?",this.type=e.type,this.status=e.status||-1),this.name="ErrorService",this.stack=(new Error).stack}Le.TYPE_SRVERR="SERVICE_ERROR",Le.TYPE_USEERR="USAGE_ERROR",Le.TYPE_UNKERR="UNKNOWN_ERROR",Le.prototype=Object.create(Error.prototype,{constructor:{value:Le,writable:!0,configurable:!0}});var Se=Le,xe=i(5);function Ie(t){if(!(this instanceof Ie))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR"));for(var e in this.logger=ve.getLogger("CommonService"),this.logger.trace("[Constructeur CommonService (options)]"),this.options={protocol:"XHR",ssl:!0,proxyURL:"",callbackSuffix:null,httpMethod:"GET",timeOut:0,rawResponse:!1,scope:this,onSuccess:function(t){console.log("onSuccess - la reponse est la suivante : ",t)},onFailure:function(t){200!==t.status&&t.status?console.log("onFailure - Erreur (",t.status,") : ",t.message):console.log("onFailure : ",t.message)}},t)t.hasOwnProperty(e)&&(this.options[e]=t[e]);if(this.options.rawResponse&&!this.options.onSuccess&&(this.options.onSuccess=function(t){console.log("onSuccess - la réponse brute du service est la suivante : ",t)}),!!(null===this.options.onSuccess||"function"!=typeof this.options.onSuccess))throw new Error(ye.getMessage("PARAM_MISSING","onSuccess()"));switch(this.options.httpMethod="string"==typeof t.httpMethod?t.httpMethod.toUpperCase():"GET",this.options.httpMethod){case"POST":case"GET":break;case"PUT":case"DELETE":case"HEAD":case"OPTIONS":throw new Error(ye.getMessage("PARAM_NOT_SUPPORT","httpMethod"));default:throw new Error(ye.getMessage("PARAM_UNKNOWN","httpMethod"))}switch(this.options.protocol="string"==typeof t.protocol?t.protocol.toUpperCase():"XHR",this.options.protocol){case"JSONP":case"XHR":break;default:throw new Error(ye.getMessage("PARAM_UNKNOWN","protocol"))}if("undefined"==typeof window&&"JSONP"===this.options.protocol)throw new Error(ye.getMessage("PARAM_NOT_SUPPORT_NODEJS","protocol=JSONP (instead use XHR)"));"JSONP"===this.options.protocol&&(this.options.httpMethod="GET"),this.options.nocache=t.nocache||!1,this.options.outputFormat=null,this.request=null,this.response=null}Ie.prototype={constructor:Ie,call:function(){this.logger.trace("CommonService::call ()");var t=this;function e(e){this.logger.trace("CommonService::onBuildRequest : ",e),this.callService.call(t,o,i)}function i(e){this.logger.trace("CommonService::onCallService : ",e),this.analyzeResponse.call(t,o,n)}function n(t){if(this.logger.trace("CommonService::onAnalyzeResponse : ",t),!t)return o.call(this,new Se("Analyse de la reponse en échec !?"));this.options.onSuccess.call(this,t)}function o(t){this.logger.trace("CommonService::onError()");var e=t;e instanceof Se||(e=new Se(t.message)),this.options.onFailure.call(this,e)}(function(){this.logger.trace("CommonService::run ()"),this.buildRequest.call(t,o,e)}).call(t)},buildRequest:function(t,e){this.logger.error("overwritten method !"),t&&t.call(this,"This method must be overwritten !"),e.call(this,"This method must be overwritten !")},callService:function(t,e){var i=null,n=this.request,o=!(!this.options.proxyURL||"XHR"!==this.options.protocol),r={"gp-access-lib":xe.version};this.options.apiKey&&(r.apiKey=this.options.apiKey),this.options.serverUrl=Ee.normalyzeUrl(this.options.serverUrl,r,!1),o&&("GET"===this.options.httpMethod&&(i=this.options.proxyURL+Ee.normalyzeUrl(this.options.serverUrl,this.request,!0),n=null),"POST"===this.options.httpMethod&&(i=this.options.proxyURL+Ee.normalyzeUrl(this.options.serverUrl,null,!0),n=this.request));var s=this,a={url:i||this.options.serverUrl,method:this.options.httpMethod,protocol:this.options.protocol,timeOut:this.options.timeOut||0,format:this.options.outputFormat,nocache:this.options.nocache||!1,wrap:"XHR"!==this.options.protocol,callbackSuffix:this.options.callbackSuffix,data:n,headers:null,content:this.options.contentType||"application/xml",scope:this.options.scope||this,onResponse:function(i){s.logger.trace("callService::onResponse()");var n=null;if("XHR"===s.options.protocol&&(s.logger.trace("Response XHR",i),n=i),"JSONP"===s.options.protocol){if(s.logger.trace("Response JSON",i),!i)return void t.call(s,new Se("Le contenu de la reponse est vide !?"));if(i.http){if(200!==i.http.status)return void t.call(s,new Se({status:i.http.status,message:i.http.error,type:Se.TYPE_SRVERR}));n=i.xml,s.options.rawResponse&&(n=i)}else n=i}if("function"==typeof s.options.onBeforeParse){var o=s.options.onBeforeParse(n);"string"==typeof o&&(n=o)}s.response=n,e.call(s,n)},onFailure:function(e){s.logger.trace("callService::onFailure()"),e.type=Se.TYPE_SRVERR,t.call(s,new Se(e))},onTimeOut:function(){s.logger.trace("callService::onTimeOut()"),t.call(s,new Se("TimeOut!"))}};Pe.send(a)},analyzeResponse:function(t,e){this.logger.error("overwritten method !"),t&&t.call(this,"This method must be overwritten !"),e.call(this,"This method must be overwritten !")}};var Te=Ie,Ge={ssl:!0,newUrl:function(t){return(!1===Ge.ssl?"http://":"https://")+"data.geopf.fr"+t},Alti:{new_key:{"elevation-json":"/altimetrie/1.0/calcul/alti/rest/elevation.json","elevation-xml":"/altimetrie/1.0/calcul/alti/rest/elevation.xml","profil-json":"/altimetrie/1.0/calcul/alti/rest/elevationLine.json","profil-xml":"/altimetrie/1.0/calcul/alti/rest/elevationLine.xml"},newUrl:function(){return{"elevation-json":Ge.newUrl(this.new_key["elevation-json"]),"elevation-xml":Ge.newUrl(this.new_key["elevation-xml"]),"profil-json":Ge.newUrl(this.new_key["profil-json"]),"profil-xml":Ge.newUrl(this.new_key["profil-xml"])}}},ProcessIsoCurve:{new_key:"/navigation/isochrone",newUrl:function(){return Ge.newUrl(this.new_key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/",url:function(t){Array.isArray(t)||(t=t.split(","));for(var e=[],i=0;i<t.length;i++)e[i]=this._key+t[i]+"Config.json";return e}},AutoComplete:{new_key:"/geocodage/completion",newUrl:function(){return Ge.newUrl(this.new_key)}},ReverseGeocode:{new_key:"/geocodage/reverse",newUrl:function(){return Ge.newUrl(this.new_key)}},Geocode:{new_key:"/geocodage/search",newUrl:function(){return Ge.newUrl(this.new_key)}},Route:{new_key:"/navigation/itineraire",newUrl:function(){return Ge.newUrl(this.new_key)}}},Re=Ge;function De(){if(!(this instanceof De))throw new TypeError("ConfigInterface constructor cannot be called as a function.");this.generalOptions={apiKeys:{},title:null,defaultGMLGFIStyle:null,theme:null,wgs84Resolutions:[]},this.layers={},this.tileMatrixSets={}}De.prototype={constructor:De,isKeyConfLoaded:function(t){if(t)return!!this.generalOptions.apiKeys[t]},getLayersId:function(t){return this.generalOptions.apiKeys[t]},getLayerId:function(t,e){if(t&&e){var i=null;if(this.layers){var n=this.layers;for(var o in n)if(n.hasOwnProperty(o)){var r=o.split("$");if(t===r[0]&&r[1]){var s=r[1].split(":");if(r[1].split(";")[1]===e.toUpperCase()){i=o;break}if(s[2]===e.toUpperCase()){i=o;break}}}}if(i)return i}},getLayersConf:function(t){var e={},i=this.getLayersId(t);if(i)for(var n=0;n<i.length;n++){var o=i[n];e[o]=this.layers[o]}return e},getLayerConf:function(t){if(this.layers)return this.layers[t]},getLayerParams:function(t,e){var i={};if(("WMS"===e||0!==Object.keys(this.tileMatrixSets).length)&&0!==Object.keys(this.layers).length){var n=this.getLayerId(t,e);if(n){var o=this.getLayerConf(n),r=this.getLayerKey(n);if(0===r.length)return;for(var s=0;s<r.length;s++)o.serviceParams.serverUrl[r[s]]&&(i.url=o.serviceParams.serverUrl[r[s]]);if("WFS"!==e){/\/v\//.test(i.url)?i.styles=" ":i.styles=o.styles[0].name}if(i.version=o.serviceParams.version,i.format=o.formats&&o.formats.length?o.formats[0].name:"",i.projection=o.defaultProjection,i.minScale=o.globalConstraint.minScaleDenominator,i.maxScale=o.globalConstraint.maxScaleDenominator,i.extent=o.globalConstraint.bbox,i.legends=o.legends,i.title=o.title,i.description=o.description,"WMS"===e&&(i.metadata=o.metadata),o.wmtsOptions){i.tileMatrixSetLimits=o.wmtsOptions.tileMatrixSetLimits;var a=o.wmtsOptions.tileMatrixSetLink;if(a){i.TMSLink=a;var l=this.getTMSConf(a);i.matrixIds=Object.keys(l.tileMatrices),i.tileMatrices=l.tileMatrices,i.nativeResolutions=l.nativeResolutions||this.getTMSConf("PM").nativeResolutions}}}}return i},getLayerKey:function(t){var e=[];if(this.generalOptions&&this.generalOptions.apiKeys&&0!==Object.keys(this.generalOptions.apiKeys).length){var i=this.generalOptions.apiKeys;for(var n in i){i[n].forEach((function(i){i===t&&e.push(n)}))}}return e},getTileMatrixSets:function(){return this.tileMatrixSets},getTMSConf:function(t){if(this.tileMatrixSets)return this.tileMatrixSets[t]},getGlobalConstraints:function(t){var e={};if(t){var i=this.getLayerConf(t);e.projection=i.defaultProjection,e.minScale=i.globalConstraint.minScaleDenominator,e.maxScale=i.globalConstraint.maxScaleDenominator,e.extent=i.globalConstraint.bbox}return e}};var ke=De;function Ae(t){if(!(this instanceof Ae))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","Config"));if(this.CLASSNAME="Config",this.logger=ve.getLogger("Gp.Config"),this.logger.trace("[Constructeur Config (options)]"),!!(null===t.onSuccess||"function"!=typeof t.onSuccess))throw new Error(ye.getMessage("PARAM_MISSING","onSuccess()"));t.apiKey||t.customConfigFile||(t.apiKey="full"),this.options={},this.options.onSuccess=t.onSuccess,this.options.onFailure=t.onFailure,this.options.sync=t.sync||!1,this.options.listConfigUrls=t.customConfigFile?[t.customConfigFile]:Array.isArray(t.apiKey)?Re.Config.url(t.apiKey):Re.Config.url(t.apiKey.split(","))}Ae.prototype=Object.create(Te.prototype,{}),Ae.prototype.constructor=Ae,Ae.prototype.buildRequest=function(t,e){this.listConfigUrls=this.options.listConfigUrls,this.listConfigUrls?e.call(this,this.listConfigUrls):t.call(this,new Error("url by default not found !"))},Ae.prototype.callService=function(t,e){this.options.sync?Oe.call(this,t,e):Ne.call(this,t,e)};var Ne=function(t,e){this.listConfigResults=[];let n=null;if("undefined"==typeof window){var o=i(9);n=o}else n=window.fetch;var r=t=>n(t,{credentials:"same-origin"}).then(t=>{if(t.ok)return t.json().then(t=>t).catch(t=>{throw new Error("Exception Json : "+t)});throw new Error("Exception HTTP : "+t.status+" (status code) !")}).catch(t=>new Promise((e,i)=>{i(t)})),s=[];for(let t=0;t<this.listConfigUrls.length;t++){const e=this.listConfigUrls[t];s.push(r(e))}Promise.all(s).then(t=>{if(!t)throw new Error("results config empty !?");t.forEach(t=>{this.listConfigResults.push(t)})}).then(()=>{e.call(this,this.listConfigResults)}).catch(e=>{t.call(this,e)})},Oe=function(t,e){this.listConfigResults=[];for(var i=0;i<this.listConfigUrls.length;i++){const t=this.listConfigUrls[i],e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(null),200===e.status){var n=JSON.parse(e.responseText);this.listConfigResults.push(n)}}0!==this.listConfigResults.length?e.call(this,this.listConfigResults):t.call(this,new Error("..."))};Ae.prototype.analyzeResponse=function(t,e){var i=function(t){for(var e={},i={},n={},o=0;o<t.length;o++){if(!t[o].generalOptions||!t[o].layers)return;i={...i,...t[o].generalOptions.apiKeys},e={...e,...t[o].layers},n={...n,...t[o].tileMatrixSets}}return{generalOptions:{apiKeys:i},layers:e,tileMatrixSets:n}}(this.listConfigResults);if(i){var n=new ke;Object.assign(n,i);var o="undefined"!=typeof window?window:{};if(o.Gp||(o.Gp={}),o.Gp.Config)for(var r in Object.assign(o.Gp.Config,n),n)o.Gp.Config[r]=n[r];else o.Gp.Config=n;e.call(this,o.Gp.Config)}else t.call(this,new Error("configuration structure not conforme !"))};var Ue=Ae;function je(t){if(!(this instanceof je))throw new TypeError("AltiRequest constructor cannot be called as a function.");this.logger=ve.getLogger(),this.logger.trace("[Constructeur AltiRequest ()]"),this.options=t||{},this.positions=this.options.positions||[],this.delimiter=this.options.delimiter||"|",this.indent=this.options.indent||!1,this.crs=this.options.crs||"CRS:84",this.format=this.options.format||"json",this.resource=this.options.resource,this.measures=this.options.measures||!1}je.CLASSNAME="AltiRequest",je.prototype={constructor:je,setPositions:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];n.lon&&n.lat&&e.push(n)}this.positions=e},getPositions:function(t){if(!t)return this.positions;var e=this.positions.length-1;return t>e||t<e?(this.logger.warn("index out of range !"),this.positions):this.positions[t]},addPositions:function(t){for(var e=0;e<t.length;e++){var i=t[e];i.lon&&i.lat&&this.positions.push(t[e])}},getLon:function(){for(var t=[],e=0;e<this.positions.length;e++)t.push(this.positions[e].lon);return this.logger.trace(t),t.join(this.delimiter)},getLat:function(){for(var t=[],e=0;e<this.positions.length;e++)t.push(this.positions[e].lat);return this.logger.trace(t),t.join(this.delimiter)}},je.prototype.getData=function(){var t=[];return t.push({k:"lon",v:this.getLon()}),t.push({k:"lat",v:this.getLat()}),t.push({k:"delimiter",v:this.delimiter}),t.push({k:"indent",v:this.indent}),t.push({k:"crs",v:this.crs}),t.push({k:"format",v:this.format}),t};var Fe=je;function qe(t){if(!(this instanceof qe))throw new TypeError("AltiElevationRequest constructor cannot be called as a function.");this.CLASSNAME="AltiElevationRequest",Fe.apply(this,arguments),this.logger=ve.getLogger(),this.logger.trace("[Constructeur AltiElevationRequest ()]"),this.zonly=this.options.zonly||!1}qe.prototype=Object.create(Fe.prototype,{zonly:{get:function(){return this._zonly},set:function(t){this._zonly=t}}}),qe.prototype.constructor=qe,qe.prototype.getData=function(){var t=[];return t.push({k:"lon",v:this.getLon()}),t.push({k:"lat",v:this.getLat()}),t.push({k:"indent",v:this.indent}),t.push({k:"crs",v:this.crs}),t.push({k:"zonly",v:this.zonly}),t.push({k:"format",v:this.format}),t.push({k:"resource",v:this.resource}),t};var Be=qe;function ze(t){if(!(this instanceof ze))throw new TypeError("AltiProfilRequest constructor cannot be called as a function.");this.CLASSNAME="AltiProfilRequest",Fe.apply(this,arguments),this.logger=ve.getLogger(),this.logger.trace("[Constructeur AltiProfilRequest ()]"),this.sampling=this.options.sampling||3}ze.prototype=Object.create(Fe.prototype,{sampling:{get:function(){return this._sampling},set:function(t){this._sampling=t}}}),ze.prototype.constructor=ze,ze.prototype.getData=function(){var t=[];return t.push({k:"lon",v:this.getLon()}),t.push({k:"lat",v:this.getLat()}),t.push({k:"indent",v:this.indent}),t.push({k:"crs",v:this.crs}),t.push({k:"sampling",v:this.sampling}),t.push({k:"format",v:this.format}),t.push({k:"resource",v:this.resource}),t};var He=ze;function We(t){if(this.logger=ve.getLogger("AltiRequestREST"),this.logger.trace("[Constructeur AltiRequestREST ()]"),!(this instanceof We))throw new TypeError("AltiRequestREST constructor cannot be called as a function.");if(this.options=t||{},!this.options)throw new Error(ye.getMessage("PARAM_EMPTY","options"));if(!this.options.type)throw new Error(ye.getMessage("PARAM_EMPTY","type (Elevation or Profil)"));switch(this.DataObject=null,this.options.type){case"Elevation":this.DataObject=new Be(this.options.param);break;case"Profil":this.DataObject=new He(this.options.param);break;default:throw new Error(ye.getMessage("PARAM_TYPE","type (Elevation or Profil)"))}this.method=this.options.method||"GET"}We.prototype={requestString:null,constructor:We,template:{get:{value:"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'&resource=__RESOURCE__&measures=__MEASURES__",input:{point:"&zonly=__ZONLY__",profil:"&sampling=__SAMPLING__"}},post:{value:"lon=__LON__\nlat=__LAT__\nindent=__INDENT__\ncrs='__CRS__'\nresource='__RESOURCE__'\nmeasures='__MEASURES__'\n",input:{point:"zonly=__ZONLY__\n",profil:"sampling=__SAMPLING__"}}},processRequestString:function(){this.logger.trace("AltiRequestREST::processRequestString ()");var t="";return"POST"===this.method?t=this.template.post.value:"GET"===this.method&&(t=this.template.get.value),t=(t=(t=(t=(t=(t=t.replace(/__LON__/g,this.DataObject.getLon())).replace(/__LAT__/g,this.DataObject.getLat())).replace(/__INDENT__/g,this.DataObject.indent)).replace(/__CRS__/g,this.DataObject.crs)).replace(/__RESOURCE__/g,this.DataObject.resource)).replace(/__MEASURES__/g,this.DataObject.measures),t+=this.__addDataInputs(),this.logger.trace("traduction tmpl",t),this.requestString=t,this.requestString},__addDataInputs:function(){var t;if(this.logger.trace("AltiRequestREST::addDataInput ()"),"POST"===this.method)t=this.template.post;else{if("GET"!==this.method)throw new Error("No other HTTP method supported by the service !");t=this.template.get}if("AltiElevationRequest"===this.DataObject.CLASSNAME)return t.input.point.replace(/__ZONLY__/g,this.DataObject.zonly.toString());if("AltiProfilRequest"===this.DataObject.CLASSNAME)return t.input.profil.replace(/__SAMPLING__/g,this.DataObject.sampling);throw new Error("No other object supported than elevation or profil !?")}};var Ve=We;function Ye(t){if(this.logger=ve.getLogger(),this.logger.trace("[Constructeur WPS()]"),!(this instanceof Ye))throw new TypeError("WPS constructor cannot be called as a function.");if(this.options=t||{},this.DataObject=this.options.data,!this.DataObject)throw new TypeError("This data object is not defined !");this.paramservice=this.options.param.service||"WPS",this.paramversion=this.options.param.version||"1.0.0",this.paramidentifier=this.options.param.identifier||"gs:WPS",this.paramrawdataoutput=this.options.param.rawdataoutput||"result",this.paramrequest=this.options.param.request||"Execute",this.method=this.options.method||"GET"}Ye.prototype={requestString:null,constructor:Ye,template:{get:{value:"service=__SERVICE__&version=__VERSION__&rawdataoutput=__RAWDATAOUTPUT__&identifier=__IDENTIFIER__&request=__REQUEST__&datainputs=\x3c!-- __DATAINPUTS__ --\x3e",input:"__KEY__=__DATA__"},post:{value:'<?xml version="1.0" encoding="UTF-8"?><wps:__REQUEST__ version="__VERSION__" service="__SERVICE__" __NAMESPACE__ __SCHEMALOCATION__><ows:Identifier>__IDENTIFIER__</ows:Identifier><wps:DataInputs>\x3c!-- __DATAINPUTS__ --\x3e</wps:DataInputs><wps:ResponseForm><wps:RawDataOutput><ows:Identifier>__RAWDATAOUTPUT__</ows:Identifier></wps:RawDataOutput></wps:ResponseForm></wps:__REQUEST__>',input:"<wps:Input><ows:Identifier>__KEY__</ows:Identifier><wps:Data><wps:LiteralData>__DATA__</wps:LiteralData></wps:Data></wps:Input>"}},namespaceByDefault:function(){return['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'].join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var t="";if("POST"===this.method)t=this.template.post.value;else{if("GET"!==this.method)return this.logger.error("No other method supported by the service !"),!1;t=this.template.get.value}return t=(t=(t=(t=(t=t.replace(/__SERVICE__/g,this.paramservice)).replace(/__VERSION__/g,this.paramversion)).replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput)).replace(/__IDENTIFIER__/g,this.paramidentifier)).replace(/__REQUEST__/g,this.paramrequest),"POST"===this.method&&(t=(t=t.replace(/__NAMESPACE__/g,this.namespaceByDefault)).replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),(t=t.replace(/<!-- __DATAINPUTS__ -->/g,this.__addDataInputs()))?(this.requestString=t,this.logger.trace("traduction tmpl",t),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var t,e="GET"===this.method?this.template.get.input:this.template.post.input,i="GET"===this.method?";":"",n="",o=this,r=this.DataObject.getData(),s=0;s<r.length;s++)t=s,i&&(i=t===r.length-1?"":";"),n=n.concat(o.__addDataInput(e,r[t].k,r[t].v),i);return n},__addDataInput:function(t,e,i){var n=t;return n=(n=n.replace(/__KEY__/g,e)).replace(/__DATA__/g,i)},setMethod:function(t){"GET"===t||"POST"===t?this.method=t:this.logger.warn("support only GET and POST method !")},getMethod:function(){return this.method}};var Xe=Ye,Ze={build:function(t){if(ve.getLogger("AltiRequestWPS").trace(["AltiRequestWPS::build()"]),!t)throw new Error(ye.getMessage("PARAM_EMPTY","options"));if(!t.type)throw new Error(ye.getMessage("PARAM_EMPTY","type (Elevation or Profil)"));var e=null;switch(t.type){case"Elevation":t.wps.identifier="gs:WPSElevation",e=new Be(t.param);break;case"Profil":t.wps.identifier="gs:WPSLineElevation",e=new He(t.param);break;default:throw new Error(ye.getMessage("PARAM_TYPE","type (Elevation or Profil)"))}var i={data:e,method:t.method,param:t.wps},n=new Xe(i);if(!n.processRequestString())throw new Error("Enable to process request !");return n.requestString}},Ke={build:function(t){ve.getLogger("AltiRequestFactory").trace(["AltiRequestFactory::build()"]);var e=null,i={type:t.sampling?"Profil":"Elevation",method:t.httpMethod,param:{positions:null,delimiter:null,indent:null,crs:null,format:null,sampling:null,zonly:null,measures:null}};i.param.positions=t.positions,i.param.format=t.outputFormat,i.param.sampling=t.sampling,i.param.zonly=t.zonly,i.param.measures=t.measures,i.param.resource=t.resource;var n=!(null===t.onError||"function"!=typeof t.onError),o=!(null===t.onSuccess||"function"!=typeof t.onSuccess),r=null;switch(t.api){case"REST":var s=new Ve(i);if(!s.processRequestString()){if(r="Error in process request (rest) !",n)return void t.onError.call(t.scope,new Se(r));throw new Error(r)}e=s.requestString;break;case"WPS":if(i.wps={service:null,version:null,identifier:null,rawdataoutput:null,request:null},!(e=Ze.build(i))){if(r="Error in process request (wps) !",n)return void t.onError.call(t.scope,new Se(r));throw new Error(r)}break;default:if(r="Type of API is not supported by service (REST or WPS) !",n)return void t.onError.call(t.scope,new Se(r));throw new Error(r)}return o&&t.onSuccess.call(t.scope,e),e}};function Qe(t){if(!(this instanceof Qe))throw new TypeError("XML constructor cannot be called as a function.");this.logger=ve.getLogger(),this.logger.trace("[Constructeur XML ()]"),this.xmlString=null,this.xmlDoc=null,this.reader=null,t&&(t.xmlString&&"string"==typeof t.xmlString&&(this.xmlString=t.xmlString,this.xmlDoc=Je(t.xmlString)),t.reader&&this.setReader(t.reader))}function Je(t){if("undefined"==typeof window)return(new(0,i(10).DOMParser)).parseFromString(t,"text/xml");var e,n,o="Erreur lors du parsing de la réponse du service : XML non conforme";if(window.ActiveXObject){(n=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,n.loadXML(t);var r=n.parseError;if(r.errorCode)throw r.line&&r.linepos&&(o+="( ligne "+r.line+", colonne "+r.linepos),r.reason&&(o+=": "+r.reason+")"),new Error(o);return n}if(window.DOMParser){e=new window.DOMParser;try{n=e.parseFromString(t,"text/xml")}catch(t){throw"SyntaxError"===t.message?new Error(o):new Error("Erreur lors du parsing de la réponse du service : "+t.message)}if(n.getElementsByTagName("parsererror").length>0)for(var s=n.getElementsByTagName("parsererror"),a=0;a<s.length;a++){var l=s[a].innerHTML;if(-1===l.indexOf("Huge input lookup"))throw o+="("+l+")",new Error(o)}else if(!n.documentElement)throw new Error(o);return n}throw new Error("Incompatible DOM Parser pour ce navigateur !")}Qe.prototype={constructor:Qe,getXMLString:function(){return this.xmlString},setXMLString:function(t){t&&"string"==typeof t&&(this.xmlString=t,this.xmlDoc=Je(t))},getReader:function(){return this.reader},setReader:function(t){t&&t.read&&"function"==typeof t.read&&(this.reader=t)},getXMLDoc:function(){return this.xmlDoc},setXMLDoc:function(t){this.xmlDoc=t},parse:function(){if(!this.xmlDoc&&this.xmlString&&(this.xmlDoc=Je(this.xmlString)),this.xmlDoc){var t,e=function(t){var e;9===t.nodeType?e=t.documentElement:1===t.nodeType&&(e=t);return e}(this.xmlDoc);return e?(this.reader&&this.reader.read?t=this.reader.read(e):(t={})[e.nodeName]=function t(e){var i={};if(e.attributes.length>0){var n=function(t){if(t.attributes.length>0){for(var e={},i=t.attributes,n=0;n<i.length;n++){var o=i[n];e[o.nodeName]=o.nodeValue}return e}}(e);i.attributes=n}if(e.hasChildNodes())for(var o,r={},s=e.childNodes,a=0;a<s.length;a++)if(3===(o=s[a]).nodeType)i.textContent=o.nodeValue;else if(1===o.nodeType)if(r=t(o),i[o.nodeName]){if(!Array.isArray(i[o.nodeName])){var l=i[o.nodeName];i[o.nodeName]=[],i[o.nodeName].push(l)}i[o.nodeName].push(r)}else i[o.nodeName]=r;return i}(e),t):{}}}};var $e=Qe;function ti(){if(!(this instanceof ti))throw new TypeError("AltiResponse constructor cannot be called as a function.");this.elevations=[]}ti.prototype={constructor:ti};var ei=ti;function ii(){if(!(this instanceof ii))throw new TypeError("Elevation constructor cannot be called as a function.");this.z=null}ii.prototype={constructor:ii};var ni=ii;function oi(){if(!(this instanceof oi))throw new TypeError("Measure constructor cannot be called as a function.");this.source_name=null,this.source_measure=null,this.z=null,this.acc=null}oi.prototype={constructor:oi};var ri=oi,si={};si.READERS={elevations:function(t){var e=new ei;if(t.hasChildNodes())for(var i,n,o=t.childNodes,r=0;r<o.length;r++)i=o[r],si.READERS[i.nodeName]&&(n=si.READERS[i.nodeName](i),e.elevations.push(n));return e},elevation:function(t){var e=new ni;if(t.hasChildNodes())for(var i,n=t.childNodes,o=0;o<n.length;o++)i=n[o],si.READERS[i.nodeName]&&si.READERS[i.nodeName](i,e);return e},lat:function(t,e){var i=t.firstChild;if(!i||3!==i.nodeType)throw new Error("Erreur dans la lecture de la réponse du service : latitude attendue mais absente");e.lat=parseFloat(i.nodeValue)},lon:function(t,e){var i=t.firstChild;if(!i||3!==i.nodeType)throw new Error("Erreur dans la lecture de la réponse du service : longitude attendue mais absente");e.lon=parseFloat(i.nodeValue)},z:function(t,e){var i=t.firstChild;if(!i||3!==i.nodeType)throw new Error("Erreur dans la lecture de la réponse du service : altitude attendue mais absente");if(!e)return(e=new ni).z=parseFloat(i.nodeValue),e;e.z=parseFloat(i.nodeValue)},acc:function(t,e){var i=t.firstChild;if(!i||3!==i.nodeType)throw new Error("Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente");e.acc=parseFloat(i.nodeValue)},source_name:function(t,e){var i=t.firstChild;if(!i||3!==i.nodeType)throw new Error("Erreur dans la lecture de la réponse du service : source_name attendue mais absente");e.source_name=i.nodeValue},source_measure:function(t,e){var i=t.firstChild;if(!i||3!==i.nodeType)throw new Error("Erreur dans la lecture de la réponse du service : source_measure attendue mais absente");e.source_measure=i.nodeValue},measures:function(t,e){var i;if(e.measures=[],t.hasChildNodes())for(var n,o=t.childNodes,r=0;r<o.length;r++){i=new ri,n=o[r].childNodes;for(var s=0;s<n.length;s++){if(!si.READERS[n[s].nodeName])throw new Error("Erreur dans la lecture de la réponse du service : measures attendues mais absentes");si.READERS[n[s].nodeName](n[s],i)}e.measures.push(i)}},exceptionreport:function(t){var e={};if(t.hasChildNodes())for(var i,n=t.childNodes,o=0;o<n.length;o++)"Exception"===(i=n[o]).nodeName&&(e.exceptionReport=si.READERS.exception(i));return e},exception:function(t){var e={},i=t.getAttribute("exceptionCode");i&&(e.exceptionCode=i);var n=t.firstChild;return n&&3===n.nodeType&&(e.exception=n.nodeValue),e},error:function(t){var e={error:{}};if(t.hasChildNodes())for(var i,n=t.childNodes,o=0;o<n.length;o++){var r;1===(i=n[o]).nodeType&&"code"===i.nodeName&&(r=i.firstChild)&&3===r.nodeType&&(e.error.code=r.nodeValue),1===i.nodeType&&"description"===i.nodeName&&(r=i.firstChild)&&3===r.nodeType&&(e.error.description=r.nodeValue)}return e}},si.read=function(t){if("elevations"===t.nodeName)return si.READERS.elevations(t);if("ExceptionReport"===t.nodeName)return si.READERS.exceptionreport(t);if("error"===t.nodeName)return si.READERS.error(t);throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.")};var ai=si,li={build:function(t){var e=ve.getLogger("AltiResponseFactory");e.trace(["AltiResponseFactory::build()"]);var i=null;if(t.response){if(t.rawResponse)e.trace("analyze response : raw"),i=t.response;else{switch(t.outputFormat){case"xml":e.trace("analyze response : xml");try{var n=new $e({reader:ai});if("string"==typeof t.response?n.setXMLString(t.response):n.setXMLDoc(t.response),!(i=n.parse()))throw new Error(ye.getMessage("SERVICE_RESPONSE_EXCEPTION_2"))}catch(e){var o=e.message;return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",o),status:200,type:Se.TYPE_SRVERR}))}break;case"json":e.trace("analyze response : json"),e.trace("analyze response : ",typeof t.response);var r=null;if((r="string"==typeof t.response?JSON.parse(t.response):t.response)&&r.error)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",r.error.description),status:200,type:Se.TYPE_SRVERR}));if(r){var s,a=r.elevations,l=new ei;if(Array.isArray(a)&&a.length)for(var c=0;c<a.length;c++)s=new ni,"object"==typeof a[c]?(a[c].lon&&(s.lon=a[c].lon),a[c].lat&&(s.lat=a[c].lat),a[c].z&&(s.z=a[c].z),a[c].acc&&(s.acc=a[c].acc),a[c].measures&&(s.measures=a[c].measures)):"number"==typeof a[c]&&(s.z=a[c]),Array.isArray(l.elevations)&&l.elevations.push(s);i=l}if(!i)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_ANALYSE_2"),type:Se.TYPE_UNKERR,status:-1}));break;default:return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_FORMAT_2"),type:Se.TYPE_UNKERR,status:-1}))}if(i.exceptionReport)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",i.exceptionReport),type:Se.TYPE_SRVERR,status:200}));if(i.error){var u=i.error.description;return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",u),type:Se.TYPE_SRVERR,status:200}))}}t.onSuccess.call(t.scope,i)}else t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))}};function ci(t){if(!(this instanceof ci))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","Alti"));if(this.CLASSNAME="Alti",Te.apply(this,arguments),this.logger=ve.getLogger("Gp.Services.Alti"),this.logger.trace("[Constructeur Alti (options)]"),!t.positions)throw new Error(ye.getMessage("PARAM_MISSING","positions"));if(0===t.positions.length)throw new Error(ye.getMessage("PARAM_EMPTY","positions"));if(this.options.positions=t.positions,this.options.outputFormat="string"==typeof t.outputFormat?t.outputFormat.toLowerCase():"xml",this.options.resource=t.resource||"ign_rge_alti_wld",this.options.sampling=t.sampling||null,this.options.api="string"==typeof t.api?t.api.toUpperCase():"REST","REST"===this.options.api&&(this.options.httpMethod="GET"),this.options.zonly=t.zonly||!1,this.options.measures=t.measures||!1,!this.options.serverUrl){var e=Re.Alti.newUrl(),i=null;switch(this.options.api){case"WPS":i=e.wps;break;case"REST":var n=(t.sampling?"profil":"elevation")+"-"+this.options.outputFormat;i=e[n];break;default:throw new Error(ye.getMessage("PARAM_UNKNOWN","api"))}if(!i)throw new Error("Url by default not found !");this.options.serverUrl=i,this.logger.trace("Server URL by default : "+this.options.serverUrl)}var o=this.options.serverUrl.lastIndexOf(".");if(-1!==o){var r=this.options.serverUrl.substring(o+1);if(r&&r.length<5)switch(this.logger.trace("Server Extension URL : "+r),r.toLowerCase()){case"json":case"xml":this.options.outputFormat=r.toLowerCase();break;default:throw new Error("type of service : unknown or unsupported (json or xml) !")}}}ci.prototype=Object.create(Te.prototype,{}),ci.prototype.constructor=ci,ci.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,onSuccess:function(t){this.request=t,e.call(this,this.request)},onError:t,scope:this,resource:this.options.resource,positions:this.options.positions,outputFormat:this.options.outputFormat,sampling:this.options.sampling,api:this.options.api,zonly:this.options.zonly,measures:this.options.measures};Ke.build(i)},ci.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};li.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var ui=ci;function hi(t){if(!(this instanceof hi))throw new TypeError("GeocodeParamREST constructor cannot be called as a function.");if(this.logger=ve.getLogger(),this.logger.trace("[Constructeur GeocodeParamREST ()]"),this.options=t||{},!this.options.geocodeMethod||"search"!==this.options.geocodeMethod&&"reverse"!==this.options.geocodeMethod)throw new Error("Error geocodeMethod not valid");this.geocodeMethod=this.options.geocodeMethod,this.query=void 0!==this.options?this.options.query:null,this.searchGeometry=this.options.searchGeometry||null,this.index=this.options.index||null,this.lon=this.options.position&&this.options.position.lon?this.options.position.lon:null,this.lat=this.options.position&&this.options.position.lat?this.options.position.lat:null,this.maxResp=this.options.maxResp||null,this.returnTrueGeometry=this.options.returnTrueGeometry||null,this.filters=this.options.filters||{}}hi.CLASSNAME="GeocodeParamREST",hi.prototype={constructor:hi,getFilters:function(){var t={};for(var e in this.filters)this.filters.hasOwnProperty(e)&&(t[e]=this.filters[e]);return t},getIndex:function(){return void 0===this.index?null:"StreetAddress"===this.index?"address":"CadastralParcel"===this.index?"parcel":"PositionOfInterest"===this.index?"poi":"location"===this.index?"location":this.index},getSearchGeometry:function(){return JSON.stringify(this.searchGeometry)}},hi.prototype.getParams=function(){var t=[];"search"===this.geocodeMethod&&t.push({k:"q",v:this.query}),this.index&&t.push({k:"index",v:this.getIndex()}),"reverse"===this.geocodeMethod&&this.searchGeometry&&t.push({k:"searchgeom",v:this.getSearchGeometry()}),this.lon&&this.lat&&(t.push({k:"lon",v:this.lon}),t.push({k:"lat",v:this.lat})),this.maxResp&&t.push({k:"limit",v:this.maxResp}),this.returnTrueGeometry&&t.push({k:"returntruegeometry",v:this.returnTrueGeometry});const e=this.getFilters();for(var i in e)t.push({k:i,v:e[i]});return t};var di=hi;function pi(t){if(this.logger=ve.getLogger("GeocodeRequestREST"),this.logger.trace("[Constructeur GeocodeRequestREST ()]"),!(this instanceof pi))throw new TypeError("GeocodeRequestREST constructor cannot be called as a function.");if(!t)throw new Error(ye.getMessage("PARAM_EMPTY","options"));this.settings=t}pi.prototype={requestString:null,constructor:pi,processRequestString:function(){var t="";const e=new di(this.settings).getParams();for(var i=0;i<e.length;i++){var n=e[i];t&&(t+="&"),t+=n.k+"="+n.v}if(!this.settings.geocodeMethod||"search"!==this.settings.geocodeMethod&&"reverse"!==this.settings.geocodeMethod)throw new Error("Error geocodeMethod not valid");return this.requestString="?"+t,this.logger.trace(this.requestString),this.requestString}};var mi=pi,fi={build:function(t){var e=ve.getLogger("GeocodeRequestFactory");e.trace(["GeocodeRequestFactory::build()"]);var i=new mi(t||{});if(!i.processRequestString())throw new Error("Error process request (rest) !");var n=i.requestString;return e.trace(n),n}};function gi(){if(!(this instanceof gi))throw new TypeError("GeocodeResponse constructor cannot be called as a function.");this.locations=[]}gi.prototype={constructor:gi};var _i=gi;function vi(){if(!(this instanceof vi))throw new TypeError("GeocodedLocation constructor cannot be called as a function.");this.position=null,this.matchType=null,this.placeAttributes={},this.type=null,this.accuracy=null,this.CLASSNAME="GeocodedLocation"}vi.prototype={constructor:vi};var yi=vi;function Ei(){if(!(this instanceof Ei))throw new TypeError("GeocodeResponseParser constructor cannot be called as a function.")}function wi(t,e){var i=new yi;if(t.geometry&&"Point"===t.geometry.type&&(i.position={lon:t.geometry.coordinates[0],lat:t.geometry.coordinates[1]}),t.properties){for(var n in t.properties)"score"===n?i.accuracy=t.properties[n]:"_type"===n?"address"===t.properties[n]?i.type="StreetAddress":"poi"===t.properties[n]?i.type="PositionOfInterest":"parcel"!==t.properties[n]&&"cadastral"!==t.properties[n]||(i.type="CadastralParcel"):i.placeAttributes[n]=t.properties[n];"address"===t.properties._type&&(i.matchType=void 0!==t.properties.number&&null!==t.properties.number?"street number":"street")}e.locations.push(i)}Ei.prototype={constructor:Ei,parse:function(t){var e=new _i;const i=JSON.parse(t);if("FeatureCollection"===i.type)for(var n=0;n<i.features.length;++n)wi(i.features[n],e);else{if("Feature"!==i.type){if("SERVICE_ERROR"===i.type)return{exceptionReport:i};var o=ye.getMessage("SERVICE_RESPONSE_ANALYSE",i.type);throw new Se({message:o,type:Se.TYPE_UNKERR,status:200})}wi(i,e)}return e}};var bi=Ei,Ci={build:function(t){var e=null;if(t.response){if(t.rawResponse)e=t.response;else{try{if(!(e=(new bi).parse(t.response)))throw new Error("L'analyse de la réponse du service !?")}catch(e){var i=e.message;return"string"==typeof t.response?i+="('"+t.response+"')":i+="('"+t.response.documentElement.innerHTML+"')",void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_ANALYSE",i),type:Se.TYPE_UNKERR,status:-1}))}if(e.exceptionReport)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",e.exceptionReport),type:Se.TYPE_SRVERR,status:200}))}t.onSuccess.call(t.scope,e)}else t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EMPTY"),type:Se.TYPE_SRVERR,status:-1}))}};function Mi(t){if(!(this instanceof Mi))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","Geocode"));this.CLASSNAME="Geocode",this.logger=ve.getLogger("Gp.Services.Geocode"),this.logger.trace("[Constructeur Geocode (options)]");var e=this.patchOptionConvertor(t);if(e.serverUrl||(e.serverUrl=Re.Geocode.newUrl()),Te.apply(this,[e]),!e.hasOwnProperty("query"))throw new Error(ye.getMessage("PARAM_MISSING","query"));if(this.options.query=e.query,e.index||(this.options.index=e.index="StreetAddress"),e.filters)for(var i=Object.keys(e.filters),n=0;n<i.length;n++){var o=i[n];(void 0===e.filters[o]||"object"==typeof e.filters[o]&&0===Object.keys(e.filters[o]).length||"string"==typeof e.filters[o]&&0===e.filters[o].length||Array.isArray(e.filters[o])&&0===e.filters[o].length)&&delete this.options.filters[o]}this.options.index=e.index||"StreetAddress",this.options.maximumResponses=e.maximumResponses||20}Mi.prototype=Object.create(Te.prototype,{}),Mi.prototype.constructor=Mi,Mi.prototype.patchOptionConvertor=function(t){const e=t;return e.hasOwnProperty("location")&&(this.logger.warn("The parameter 'location' is deprecated"),e.query||(e.query=e.location),delete e.location),e.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),e.filters||(e.filters=e.filterOptions,e.filters.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),e.index||(Array.isArray(e.filters.type)&&e.filters.type.length>0?e.index=e.filters.type[0]:e.index=e.filters.type),delete e.filters.type),e.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete e.filters.bbox)),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete e.returnFreeForm),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Mi.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=fi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Mi.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};Ci.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var Pi=Mi;function Li(t){if(!(this instanceof Li))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=ve.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var e=this.patchOptionConvertor(t);if(e.serverUrl||(e.serverUrl=Re.ReverseGeocode.newUrl()),Te.apply(this,[e]),e.searchGeometry)this.options.searchGeometry=e.searchGeometry;else if(!e.position)throw new Error(ye.getMessage("PARAM_MISSING","searchGeometry"));if(e.index||(this.options.index=e.index="StreetAddress"),e.filters)for(var i=Object.keys(e.filters),n=0;n<i.length;n++){var o=i[n];(void 0===e.filters[o]||"object"==typeof e.filters[o]&&0===Object.keys(e.filters[o]).length||"string"==typeof e.filters[o]&&0===e.filters[o].length||Array.isArray(e.filters[o])&&0===e.filters[o].length)&&delete this.options.filters[o]}this.options.position=e.position,this.options.index=e.index||"StreetAddress",this.options.maximumResponses=e.maximumResponses||20}Li.prototype=Object.create(Te.prototype,{}),Li.prototype.constructor=Li,Li.prototype.patchOptionConvertor=function(t){var e=t;return e.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),e.filterOptions.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),e.index||(Array.isArray(e.filterOptions.type)&&e.filterOptions.type.length>0?e.index=e.filterOptions.type[0]:e.index=e.filterOptions.type),delete e.filterOptions.type),e.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),e.searchGeometry||(e.searchGeometry=this.bbox2Json(e.filterOptions.bbox)),delete e.filterOptions.bbox),e.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),e.searchGeometry||(e.searchGeometry=this.circle2Json(e.filterOptions.circle)),delete e.filterOptions.circle),e.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),e.searchGeometry||(e.searchGeometry=this.polygon2Json(e.filterOptions.polygon)),delete e.filterOptions.polygon),!e.filters&&Object.keys(e.filterOptions).length>0&&(e.filters=e.filterOptions),delete e.filterOptions),e.position&&(e.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),e.position.lon||(e.position.lon=e.position.x),delete e.position.x),e.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),e.position.lat||(e.position.lat=e.position.y),delete e.position.y)),e.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete e.srs),e},Li.prototype.buildRequest=function(t,e){var i={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=fi.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Li.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this};Ci.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))},Li.prototype.bbox2Json=function(t){return{type:"Polygon",coordinates:[[[t.left,t.top],[t.right,t.top],[t.right,t.bottom],[t.left,t.bottom],[t.left,t.top]]]}},Li.prototype.circle2Json=function(t){return{type:"Circle",radius:t.radius,coordinates:[t.x,t.y]}},Li.prototype.polygon2Json=function(t){for(var e={type:"Polygon",coordinates:[[]]},i=0;i<t.length;++i)e.coordinates[0].push([t[i].x,t[i].y]);return e},Li.geoEPSG=["EPSG:4326"];var Si=Li;function xi(){if(!(this instanceof xi))throw new TypeError("AutoCompleteResponse constructor cannot be called as a function.");this.suggestedLocations=[]}xi.prototype={constructor:xi};var Ii=xi;function Ti(){if(!(this instanceof Ti))throw new TypeError("SuggestedLocation constructor cannot be called as a function.");this.type=null,this.position={x:null,y:null},this.commune=null,this.fullText=null,this.postalCode=null,this.classification=null,this.street=null,this.poi=null,this.kind=null}Ti.prototype={constructor:Ti};var Gi=Ti,Ri={build:function(t){var e=ve.getLogger("AutoCompleteResponseFactory");e.trace(["AutoCompleteResponseFactory::build()"]);var i=null;if(t.response){if(t.rawResponse)e.trace("analyze response : raw"),i=t.response;else{var n=null;if(n="string"==typeof t.response?JSON.parse(t.response):t.response){if(n.error)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",n.error.description),status:n.error.code,type:Se.TYPE_SRVERR}));if(i=new Ii,!n.results||!Array.isArray(n.results))return void t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_FORMAT_3")));for(var o=null,r=0;r<n.results.length;r++){var s=n.results[r];o=new Gi,s&&("StreetAddress"===s.country?(o.street=s.street,o.type="StreetAddress"):"PositionOfInterest"===s.country&&(o.poi=s.street,o.type="PositionOfInterest",o.poiType=s.poiType),o.position&&(o.position.x=s.x,o.position.y=s.y),o.kind=s.kind,o.commune=s.city,o.fullText=s.fulltext,o.postalCode=s.zipcode,o.classification=s.classification),i.suggestedLocations.push(o)}if(!i.suggestedLocations.length)return void t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_FORMAT_3")))}if(!i)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_ANALYSE_2"),type:Se.TYPE_UNKERR,status:-1}));if(i.exceptionReport)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",i.exceptionReport),type:Se.TYPE_SRVERR,status:200}))}t.onSuccess.call(t.scope,i)}else t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))}};function Di(t){if(!(this instanceof Di))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","AutoComplete"));this.CLASSNAME="AutoComplete",this.logger=ve.getLogger("Gp.Services.AutoComplete"),this.logger.trace("[Constructeur AutoComplete (options)]");var e=this.patchOptionConvertor(t);if(e.serverUrl||(e.serverUrl=Re.AutoComplete.newUrl()),Te.apply(this,arguments),!e.text)throw new Error(ye.getMessage("PARAM_MISSING","text"));this.options.text=e.text,e.type||(e.type=["StreetAddress,PositionOfInterest"]),this.options.type=e.type,this.options.territory=e.terr||"",this.options.maximumResponses=e.maximumResponses||10,"XHR"===this.options.protocol&&"POST"===this.options.httpMethod&&(this.logger.warn("Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !"),this.options.httpMethod="GET"),this.options.outputFormat=this.options.rawResponse?"":"json"}Di.prototype=Object.create(Te.prototype,{}),Di.prototype.constructor=Di,Di.prototype.patchOptionConvertor=function(t){const e=t;return e.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),e.filterOptions.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),e.type||(e.type=e.filterOptions.type)),e.filterOptions.territory&&(this.logger.warn("The parameter 'filterOptions.territory' is deprecated"),e.terr||(e.terr=e.filterOptions.territory)),delete e.filterOptions),e},Di.prototype.buildRequest=function(t,e){var i="";this.options.territory&&(i=this.options.territory);var n="";this.options.type&&(n=this.options.type.join(",")),this.request=Ee.normalyzeParameters({text:encodeURIComponent(this.options.text),type:n,terr:i,maximumResponses:this.options.maximumResponses}),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Di.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,rawResponse:this.options.rawResponse,onSuccess:e,onError:t,scope:this};Ri.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var ki=Di;function Ai(t){if(!(this instanceof Ai))throw new TypeError("RouteParamREST constructor cannot be called as a function.");this.logger=ve.getLogger(),this.logger.trace("[Constructeur RouteParamREST ()]"),this.options=t||{},this.resource=this.options.resource,this.start=this.options.startPoint.x+","+this.options.startPoint.y,this.end=this.options.endPoint.x+","+this.options.endPoint.y,this.intermediates=this.options.viaPoints,this.profile=this.options.graph,this.crs=this.options.srs,this.constraints=this.options.constraints,this.optimization=this.options.routePreference,this.getSteps=this.options.geometryInInstructions?"true":"false",this.distanceUnit=this.options.distanceUnit,this.timeUnit=this.options.timeUnit,this.waysAttributes=this.options.waysAttributes}Ai.CLASSNAME="RouteParamREST",Ai.prototype={constructor:Ai,getIntermediates:function(){var t=[];if(0!==this.intermediates.length)for(var e=0;e<this.intermediates.length;e++){var i=this.intermediates[e];t.push(i.x+","+i.y)}return t.join("|")},getWaysAttributes:function(){return this.waysAttributes.join("|")},getProfile:function(){return this.profile},getDistanceUnit:function(){return"m"===this.distanceUnit?"meter":"km"===this.distanceUnit?"kilometer":""},getOptimization:function(){return this.optimization?this.optimization:""},getConstraints:function(){var t=[];if(0!==this.constraints.length)for(var e=0;e<this.constraints.length;e++)t.push(JSON.stringify(this.constraints[e]));return t.join("|")}},Ai.prototype.getParams=function(){var t=[];return t.push({k:"resource",v:this.resource}),t.push({k:"start",v:this.start}),t.push({k:"end",v:this.end}),t.push({k:"geometryFormat",v:"geojson"}),this.optimization&&t.push({k:"optimization",v:this.getOptimization()}),this.intermediates&&t.push({k:"intermediates",v:this.getIntermediates()}),this.profile&&t.push({k:"profile",v:this.getProfile()}),this.constraints&&t.push({k:"constraints",v:this.getConstraints()}),this.crs&&t.push({k:"crs",v:this.crs}),this.distanceUnit&&t.push({k:"distanceUnit",v:this.getDistanceUnit()}),this.timeUnit&&t.push({k:"timeUnit",v:this.timeUnit}),this.waysAttributes&&t.push({k:"waysAttributes",v:this.getWaysAttributes()}),t};var Ni=Ai;function Oi(t){if(this.logger=ve.getLogger("RouteRequestREST"),this.logger.trace("[Constructeur RouteRequestREST ()]"),!(this instanceof Oi))throw new TypeError("RouteRequestREST constructor cannot be called as a function.");if(!t)throw new Error(ye.getMessage("PARAM_EMPTY","options"));this.settings=t}Oi.prototype={requestString:null,constructor:Oi,processRequestString:function(){this.logger.warn(" PROTOTYPE !");for(var t=new Ni(this.settings).getParams(),e="",i=0;i<t.length;i++){var n=t[i];e&&(e+="&"),e+=n.k+"="+n.v}return this.logger.trace(e),this.requestString=e,this.requestString}};var Ui=Oi,ji={build:function(t){ve.getLogger("RouteRequestFactory").trace(["RouteRequestFactory::build()"]);var e=t||{},i=!(null===t.onError||"function"!=typeof t.onError),n=null,o=new Ui(e);if(!o.processRequestString()){if(n="Error process request (rest) !",i)return void t.onError.call(t.scope,new Se(n));throw new Error(n)}return o.requestString}};function Fi(){if(!(this instanceof Fi))throw new TypeError("RouteResponse constructor cannot be called as a function.");this.totalTime=null,this.totalDistance=null,this.bbox={left:null,right:null,top:null,bottom:null},this.routeGeometry=null,this.routeInstructions=[]}Fi.prototype={constructor:Fi};var qi=Fi;function Bi(){if(!(this instanceof Bi))throw new TypeError("RouteInstruction constructor cannot be called as a function.");this.duration=null,this.distance=null,this.code=null,this.instruction=null,this.geometry=null}Bi.prototype={constructor:Bi};var zi=Bi,Hi={build:function(t){var e=ve.getLogger("RouteResponseFactory");e.trace("RouteResponseFactory::build()");var i=null;if(t.response){if(t.rawResponse)e.trace("analyze response : raw"),i=t.response;else{var n;if(e.trace("analyze response : json"),n="string"==typeof t.response?JSON.parse(t.response):t.response){if(n.message)return void t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_EXCEPTION",n.message)));var o=[],r=[],s=[];if((i=new qi).hasOwnProperty("totalTime")&&(i.totalTime=parseFloat(n.duration)),i.hasOwnProperty("totalDistance")&&(i.totalDistance=parseFloat(n.distance)),i.hasOwnProperty("bbox")&&(i.bbox.left=parseFloat(n.bbox[0]),i.bbox.bottom=parseFloat(n.bbox[1]),i.bbox.right=parseFloat(n.bbox[2]),i.bbox.top=parseFloat(n.bbox[3])),i.hasOwnProperty("routeGeometry")&&!t.geometryInInstructions&&(i.routeGeometry=n.geometry),i.hasOwnProperty("routeInstructions")&&t.geometryInInstructions){var a,l=n.portions;if(Array.isArray(l)&&l.length)for(a=0;a<l.length;a++)o.push(l[a]);if(o.length)for(a=0;a<o.length;a++)r.push(o[a].steps);if(r.length)for(a=0;a<r.length;a++)s=s.concat(r[a]);s.forEach((function(t){switch(i.routeInstructions.push(new zi),i.routeInstructions[i.routeInstructions.length-1].duration=t.duration,i.routeInstructions[i.routeInstructions.length-1].distance=t.distance,i.routeInstructions[i.routeInstructions.length-1].code="",i.routeInstructions[i.routeInstructions.length-1].instruction="",i.routeInstructions[i.routeInstructions.length-1].geometry=t.geometry,"Valeur non renseignée"===t.name&&(t.name=""),t.instruction.type){case"turn":i.routeInstructions[i.routeInstructions.length-1].instruction+="Tourner";break;case"new name":i.routeInstructions[i.routeInstructions.length-1].instruction+="Continuer tout droit";break;case"depart":i.routeInstructions[i.routeInstructions.length-1].instruction+="Départ";break;case"arrive":i.routeInstructions[i.routeInstructions.length-1].instruction+="Arrivée";break;case"merge":i.routeInstructions[i.routeInstructions.length-1].instruction+="Rejoindre";break;case"ramp":case"on ramp":i.routeInstructions[i.routeInstructions.length-1].instruction+="Prendre la bretelle";break;case"off ramp":i.routeInstructions[i.routeInstructions.length-1].instruction+="Prendre la sortie";break;case"fork":i.routeInstructions[i.routeInstructions.length-1].instruction+="Sur la bifurcation, prendre";break;case"end of road":i.routeInstructions[i.routeInstructions.length-1].instruction+="À la fin de la route, prendre";break;case"use lane":i.routeInstructions[i.routeInstructions.length-1].instruction+="Utiliser la file";break;case"continue":i.routeInstructions[i.routeInstructions.length-1].instruction+="Continuer";break;case"roundabout":case"rotary":i.routeInstructions[i.routeInstructions.length-1].instruction+="Au rond-point";break;case"roundabout turn":i.routeInstructions[i.routeInstructions.length-1].instruction+="Au rond point, tourner";break;case"notification":i.routeInstructions[i.routeInstructions.length-1].instruction+="";break;default:i.routeInstructions[i.routeInstructions.length-1].instruction+="?"+t.instruction.type+"?"}if(t.instruction.modifier)switch(t.instruction.modifier){case"uturn":i.routeInstructions[i.routeInstructions.length-1].instruction="Faire demi-tour";break;case"sharp right":i.routeInstructions[i.routeInstructions.length-1].instruction+=" complètement à droite";break;case"right":i.routeInstructions[i.routeInstructions.length-1].instruction+=" à droite";break;case"slight right":i.routeInstructions[i.routeInstructions.length-1].instruction+=" légèrement à droite";break;case"straight":i.routeInstructions[i.routeInstructions.length-1].instruction="Continuer tout droit";break;case"slight left":i.routeInstructions[i.routeInstructions.length-1].instruction+=" lègèrement à gauche";break;case"left":i.routeInstructions[i.routeInstructions.length-1].instruction+=" à gauche";break;case"sharp left":i.routeInstructions[i.routeInstructions.length-1].instruction+=" complètement à gauche";break;default:i.routeInstructions[i.routeInstructions.length-1].instruction+=" ?"+t.instruction.modifier+"?"}t.instruction.exit&&(i.routeInstructions[i.routeInstructions.length-1].instruction+=t.instruction.exit+"e sortie"),t.attributes.name&&((t.attributes.name.nom_1_droite||t.attributes.name.toponyme)&&(i.routeInstructions[i.routeInstructions.length-1].instruction+=" sur"),t.attributes.name.nom_1_droite&&(i.routeInstructions[i.routeInstructions.length-1].instruction+=" "+t.attributes.name.nom_1_droite),t.attributes.name.toponyme&&(i.routeInstructions[i.routeInstructions.length-1].instruction+=" "+t.attributes.name.toponyme))}))}}if(!i)return void t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_ANALYSE","json")));if(i.exceptionReport)return void t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_EXCEPTION_2")))}t.onSuccess.call(t.scope,i)}else t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))}};function Wi(t){if(!(this instanceof Wi))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","Route"));if(this.CLASSNAME="Route",Te.apply(this,arguments),this.logger=ve.getLogger("Gp.Services.Route"),this.logger.trace("[Constructeur Route (options)]"),!t.startPoint)throw new Error(ye.getMessage("PARAM_MISSING","startPoint"));if(null===t.startPoint.x)throw new Error(ye.getMessage("PARAM_MISSING","startPoint.x"));if(null===t.startPoint.y)throw new Error(ye.getMessage("PARAM_MISSING","startPoint.y"));if(!t.endPoint)throw new Error(ye.getMessage("PARAM_MISSING","endPoint"));if(null===t.endPoint.x)throw new Error(ye.getMessage("PARAM_MISSING","endPoint.x"));if(null===t.endPoint.y)throw new Error(ye.getMessage("PARAM_MISSING","endPoint.y"));if(t.outputFormat&&"json"!==t.outputFormat&&this.logger.warn("options.outputFormat could only be json"),this.options.outputFormat="json",this.options.resource=t.resource||"bdtopo-osrm",this.options.startPoint=t.startPoint,this.options.endPoint=t.endPoint,this.options.viaPoints=t.viaPoints||[],this.options.routePreference=t.routePreference||"fastest",t.graph?("Voiture"===t.graph&&(this.options.graph="car"),"Pieton"===t.graph&&(this.options.graph="pedestrian")):this.options.graph="car",this.options.constraints=[],t.constraints){if(!Array.isArray(t.constraints))throw new Error(ye.getMessage("PARAM_TYPE","constraints"));for(var e=0;e<t.constraints.length;e++)this.options.constraints.push(t.constraints[e])}var i={},n={},o={};if(t.exclusions&&0!==t.exclusions.length){this.logger.warn("options.exclusions is DEPRECATED !!");for(var r=0;r<t.exclusions.length;r++)"string"==typeof t.exclusions[r]&&(t.exclusions[r]=t.exclusions[r].toLowerCase(),"toll"===t.exclusions[r]&&(o.constraintType="banned",o.key="wayType",o.operator="=",o.value="autoroute",this.options.constraints.push(o)),"tunnel"===t.exclusions[r]&&(i.constraintType="banned",i.key="wayType",i.operator="=",i.value="tunnel",this.options.constraints.push(i)),"bridge"===t.exclusions[r]&&(n.constraintType="banned",n.key="wayType",n.operator="=",n.value="pont",this.options.constraints.push(n)))}if(this.options.geometryInInstructions=t.geometryInInstructions||!1,this.options.provideBbox=t.provideBbox||!0,this.options.distanceUnit=t.distanceUnit||"m",this.options.timeUnit=t.timeUnit||"second",this.options.expectedStartTime=null,this.options.srs=t.srs||"EPSG:4326",this.options.waysAttributes=t.waysAttributes||[],!this.options.serverUrl){var s=Re.Route.newUrl();if(!s)throw new Error("Url by default not found !");this.options.serverUrl=s,this.logger.trace("Serveur URL par defaut : "+this.options.serverUrl)}}Wi.prototype=Object.create(Te.prototype,{}),Wi.prototype.constructor=Wi,Wi.prototype.buildRequest=function(t,e){var i={resource:this.options.resource,startPoint:this.options.startPoint,endPoint:this.options.endPoint,viaPoints:this.options.viaPoints,provideBbox:this.options.provideBbox,constraints:this.options.constraints,distanceUnit:this.options.distanceUnit,timeUnit:this.options.timeUnit,graph:this.options.graph,geometryInInstructions:this.options.geometryInInstructions,routePreference:this.options.routePreference,srs:this.options.srs,waysAttributes:this.options.waysAttributes};this.request=ji.build(i),this.request?e.call(this,this.request):t.call(this,new Se(ye.getMessage("SERVICE_REQUEST_BUILD")))},Wi.prototype.analyzeResponse=function(t,e){if(this.response){var i={distanceUnit:this.options.distanceUnit,timeUnit:this.options.timeUnit,response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onError:t,onSuccess:e,scope:this,geometryInInstructions:this.options.geometryInInstructions};Hi.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var Vi=Wi;function Yi(t){if(!(this instanceof Yi))throw new TypeError("ProcessIsoCurveParam constructor cannot be called as a function.");this.logger=ve.getLogger(),this.logger.trace("[Constructeur ProcessIsoCurveParam ()]"),this.options=t||{},this.id=this.options.id,this.resource=this.options.resource,this.point=this.options.position,this.crs=this.options.srs,this.profile=this.options.graph,this.constraints=this.options.constraints,this.reverse=this.options.reverse,this.timeUnit=this.options.timeUnit,this.distanceUnit=this.options.distanceUnit,"distance"===this.options.method?(this.costType="distance",this.costValue=this.options.distance,"m"===this.distanceUnit&&this.costValue>=5e4&&(this.distanceUnit="km",this.costValue/=1e3)):(this.costType="time",this.costValue=this.options.time)}Yi.CLASSNAME="ProcessIsoCurveParam",Yi.prototype={constructor:Yi,getLocation:function(){return this.point.x+","+this.point.y},getDistanceUnit:function(){return"m"===this.distanceUnit?"meter":"km"===this.distanceUnit?"kilometer":""},getConstraints:function(){var t=[];if(0!==this.constraints.length)for(var e=0;e<this.constraints.length;e++)t.push(JSON.stringify(this.constraints[e]));return t.join("|")},getDirection:function(){return this.reverse?"arrival":"departure"}},Yi.prototype.getParams=function(){var t=[];return t.push({k:"resource",v:this.resource}),t.push({k:"point",v:this.getLocation()}),t.push({k:"direction",v:this.getDirection()}),t.push({k:"costType",v:this.costType}),t.push({k:"costValue",v:this.costValue}),t.push({k:"profile",v:this.profile}),t.push({k:"timeUnit",v:this.timeUnit}),t.push({k:"distanceUnit",v:this.getDistanceUnit()}),this.crs&&t.push({k:"crs",v:this.crs}),this.constraints&&t.push({k:"constraints",v:this.getConstraints()}),t};var Xi=Yi;function Zi(t){if(this.logger=ve.getLogger("ProcessIsoCurveRequest"),this.logger.trace("[Constructeur ProcessIsoCurveRequest ()]"),!(this instanceof Zi))throw new TypeError("ProcessIsoCurveRequest constructor cannot be called as a function.");if(!t)throw new Error(ye.getMessage("PARAM_EMPTY","options"));this.settings=t,this.mode=this.settings.httpMethod||"GET"}Zi.prototype={requestString:null,constructor:Zi,processRequestString:function(){var t="",e=0;switch(this.mode){case"GET":this.logger.trace("Process GET Request");var i=new Xi(this.settings).getParams();for(e=0;e<i.length;e++){var n=i[e];t&&(t+="&"),t+=n.k+"="+n.v}break;case"POST":this.logger.trace("Process POST Request");var o={};o.resource=this.settings.resource,o.point=this.settings.position.x+","+this.settings.position.y,"distance"===this.settings.method?(o.costType="distance",o.costValue=this.settings.distance):(o.costType="time",o.costValue=this.settings.time),o.profile=this.settings.graph,this.settings.reverse?o.direction="arrival":o.direction="departure",o.constraints=this.settings.constraints,o.distanceUnit=this.settings.distanceUnit,o.timeUnit=this.settings.timeUnit,o.crs=this.settings.srs,t=JSON.stringify(o);break;default:this.logger.error("No other HTTP method supported by the service !")}return this.logger.trace(t),this.requestString=t,this.requestString}};var Ki=Zi;function Qi(){if(!(this instanceof Qi))throw new TypeError("ProcessIsoCurveResponse constructor cannot be called as a function.");this.message=null,this.id=null,this.location={},this.location.x=null,this.location.y=null,this.srs=null,this.geometry=null,this.time=null,this.distance=null}Qi.prototype={constructor:Qi};var Ji=Qi,$i={build:function(t){var e=ve.getLogger("ProcessIsoCurveResponseFactory");e.trace(["ProcessIsoCurveResponseFactory::build()"]);var i=null;if(t.response){if(t.rawResponse)e.trace("analyze response : raw"),i=t.response;else{var n;if(e.trace("analyze response : json"),n="string"==typeof t.response?JSON.parse(t.response):t.response,i=new Ji,!n)return void t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_ANALYSE",t.response)));"distance"===n.costType?(i.time="",i.distance=n.costValue):(i.time=n.costValue,i.distance=""),i.message="",i.id="",i.srs=n.crs,i.geometry=n.geometry;var o=n.point.split(",");if(i.location&&(i.location.x=o[0],i.location.y=o[1]),i.exceptionReport)return void t.onError.call(t.scope,new Se({message:ye.getMessage("SERVICE_RESPONSE_EXCEPTION",i.exceptionReport),type:Se.TYPE_SRVERR,status:200}))}t.onSuccess.call(t.scope,i)}else t.onError.call(t.scope,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))}};function tn(t){if(!(this instanceof tn))throw new TypeError(ye.getMessage("CLASS_CONSTRUCTOR","ProcessIsoCurve"));if(this.CLASSNAME="ProcessIsoCurve",Te.apply(this,arguments),this.logger=ve.getLogger("Gp.Services.ProcessIsoCurve"),this.logger.trace("[Constructeur ProcessIsoCurve (options)]"),!t.position)throw new Error(ye.getMessage("PARAM_MISSING","position"));if(null===t.position.x)throw new Error(ye.getMessage("PARAM_MISSING","position.x"));if(null===t.position.y)throw new Error(ye.getMessage("PARAM_MISSING","position.y"));if(!t.time&&!t.distance)throw new Error("Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance");if(!t.time&&t.distance&&(this.options.method="distance",this.options.time&&delete this.options.time),t.time&&!t.distance&&(this.options.method="time",this.options.distance&&delete this.options.distance),this.options.method=this.options.method||"time",this.options.resource=t.resource||"bdtopo-valhalla",this.options.exclusions=t.exclusions||[],this.options.reverse=t.reverse||!1,this.options.srs=t.srs||"EPSG:4326",this.options.distanceUnit=t.distanceUnit||"m",this.options.timeUnit=t.timeUnit||"second",t.smoothing&&this.logger.warn("options.smoothing is DEPRECATED"),this.options.smoothing=!1,t.holes&&this.logger.warn("options.holes is DEPRECATED"),this.options.holes=!1,t.graph?("Voiture"===t.graph&&(this.options.graph="car"),"Pieton"===t.graph&&(this.options.graph="pedestrian")):this.options.graph="car",this.options.constraints=[],t.constraints){if(!Array.isArray(t.constraints))throw new Error(ye.getMessage("PARAM_TYPE","constraints"));for(var e=0;e<t.constraints.length;e++)this.options.constraints.push(t.constraints[e])}var i={},n={},o={};if(t.exclusions&&0!==t.exclusions.length){this.logger.warn("options.exclusions is DEPRECATED !!");for(var r=0;r<t.exclusions.length;r++)"string"==typeof t.exclusions[r]&&(t.exclusions[r]=t.exclusions[r].toLowerCase(),"toll"===t.exclusions[r]&&(o.constraintType="banned",o.key="wayType",o.operator="=",o.value="autoroute",this.options.constraints.push(o)),"tunnel"===t.exclusions[r]&&(i.constraintType="banned",i.key="wayType",i.operator="=",i.value="tunnel",this.options.constraints.push(i)),"bridge"===t.exclusions[r]&&(n.constraintType="banned",n.key="wayType",n.operator="=",n.value="pont",this.options.constraints.push(n)))}if(this.options.outputFormat="string"==typeof t.outputFormat?t.outputFormat.toLowerCase():"json",t.outputFormat&&"json"!==t.outputFormat)throw new Error(ye.getMessage("PARAM_NOT_SUPPORT","outputFormat"));if(this.options.outputFormat="json",!this.options.serverUrl){var s=Re.ProcessIsoCurve.newUrl();if(!s)throw new Error("Url by default not found !");this.options.serverUrl=s,this.logger.trace("Serveur URL par defaut : "+this.options.serverUrl)}}tn.prototype=Object.create(Te.prototype,{}),tn.prototype.constructor=tn,tn.prototype.buildRequest=function(t,e){try{var i=new Ki(this.options);if(!i.processRequestString())throw new Error(ye.getMessage("SERVICE_REQUEST_BUILD"));this.request=i.requestString}catch(e){return void t.call(this,new Se(e.message))}e.call(this,this.request)},tn.prototype.analyzeResponse=function(t,e){if(this.response){var i={response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onSuccess:e,onError:t,scope:this};$i.build(i)}else t.call(this,new Se(ye.getMessage("SERVICE_RESPONSE_EMPTY")))};var en=tn,nn={getConfig:function(t){new Ue(t).call()},getAltitude:function(t){new ui(t).call()},geocode:function(t){new Pi(t).call()},reverseGeocode:function(t){new Si(t).call()},autoComplete:function(t){new ki(t).call()},route:function(t){new Vi(t).call()},isoCurve:function(t){new en(t).call()}};const on=xe.version,rn=xe.date;var sn={};sn.servicesVersion=on,sn.servicesDate=rn,sn.Protocols={},sn.Protocols.XHR=Ce,sn.Services=nn,sn.Services.DefaultUrl=Re,sn.Services.AltiResponse=ei,sn.Services.Alti={},sn.Services.Alti.Elevation=ni,sn.Services.AutoCompleteResponse=Ii,sn.Services.AutoComplete={},sn.Services.AutoComplete.SuggestedLocation=Gi,sn.Services.Config=Ue,sn.Services.IsoCurveResponse=Ji,sn.Services.RouteResponse=qi,sn.Services.Route={},sn.Services.Route.RouteInstruction=zi,sn.Error=Se,sn.Helper=Ee;var an=sn,ln={getGeocodedLocationFreeform:function(t){var e=t.placeAttributes;if(e.label)return e.label;if("PositionOfInterest"===t.type){var i=e.toponym;return e.category&&Array.isArray(e.category)&&e.category.length>=2&&"administratif"===e.category[0]?i=i+", "+e.category[1]:e.postcode&&(i=i+", "+e.postcode[0],e.city&&(i=i+" "+e.city[0])),i}return"StreetAddress"===t.type?(e.housenumber?e.housenumber+" ":"")+e.street+" "+(e.postcode?e.postcode+", ":"")+e.city:"CadastralParcel"===t.type?e.id:"..."},getSuggestedLocationFreeform:function(t){if(t.fullText)return t.fullText;var e=[];return e.push(t.street||""),e.push(t.postalCode||""),e.push(t.commune||""),"PositionOfInterest"===t.type&&(e.push(t.poi||""),e.push(t.kind||"")),e.join(" - ")}},cn=l.getLogger("LocationSelectorDOM"),un={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.className=this._addUID("GPlocationPoint"),t.className+=" GPwidget",t},_createLocationPointElement:function(t,e){var i=document.createElement("div");return i.id=this._addUID("GPlocationPoint_"+t),i.className=e?"GPflexInput GPlocationStageFlexInput":"GPflexInput GPlocationStageFlexInputHidden",i.style.cssText="",i},_createLocationPointLabelElement:function(t,e){var i=this,n=document.createElement("label");return n.id=this._addUID("GPlocationOriginLabel_"+t),n.htmlFor=this._addUID("GPlocationOrigin_"+t),n.innerHTML=e,n.addEventListener("click",(function(t){for(var e=c.index(this.id),n=document.getElementsByClassName(i._addUID("GPlocationPoint")),o=0;o<n.length;o++){var r=n[o].childNodes[0].id,s=c.index(r);document.getElementById(i._addUID("GPlocationPoint_"+s)).style.cssText=""}document.getElementById(i._addUID("GPlocationOriginCoords_"+e)).value="",document.getElementById(i._addUID("GPlocationOrigin_"+e)).value="",document.getElementById(i._addUID("GPlocationPoint_"+e)).style.cssText="",document.getElementById(i._addUID("GPlocationOriginPointer_"+e)).checked=!1,document.getElementById(i._addUID("GPlocationOrigin_"+e)).className="GPlocationOriginVisible",document.getElementById(i._addUID("GPlocationOriginCoords_"+e)).className="GPlocationOriginHidden",document.getElementById(i._addUID("GPlocationStageRemove_"+e))&&(document.getElementById(i._addUID("GPlocationStageRemove_"+e)).className="GPlocationStageRemove"),document.getElementById(i._addUID("GPlocationStageAdd"))&&(document.getElementById(i._addUID("GPlocationStageAdd")).className=""),i.onLocationClearPointClick(t)})),n},_createLocationAutoCompleteteInputElement:function(t){var e=this,i=document.createElement("input");return i.id=this._addUID("GPlocationOrigin_"+t),i.className="GPlocationOriginVisible",i.type="text",i.placeholder="Saisir une adresse",i.autocomplete="off",i.addEventListener("keyup",(function(t){var i=t.which||t.keyCode;if(13!==i&&10!==i&&38!==i&&40!==i){var n=c.index(this.id);document.getElementById(e._addUID("GPlocationOrigin_"+n)).value.length>2?document.getElementById(e._addUID("GPlocationAutoCompleteList_"+n)).style.display="block":document.getElementById(e._addUID("GPlocationAutoCompleteList_"+n)).style.display="none",e.onAutoCompleteSearchText(t)}})),i.addEventListener("keydown",(function(i){var n=i.which||i.keyCode,o=document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t));if(o){var r=o.getElementsByClassName("GPautoCompleteProposal current"),s=o.getElementsByClassName("GPautoCompleteProposal"),a=s.length;if(a){var l=null;if(!r.length)return(l=s[0]).className="GPautoCompleteProposal current",l.style.color="#000000",void(l.style["background-color"]="#CEDBEF");l=r[0];var u=parseInt(c.index(l.id),10),h=u===a-1?s[0]:s[u+1],d=0===u?s[a-1]:s[u-1];switch(l.style["background-color"]="",l.style.color="",d.style["background-color"]="",d.style.color="",h.style["background-color"]="",h.style.color="",n){case 38:cn.log("arrow up"),l.className="GPautoCompleteProposal",d.className="GPautoCompleteProposal current",d.style.color="#000000",d.style["background-color"]="#CEDBEF";break;case 40:cn.log("arrow down"),l.className="GPautoCompleteProposal",h.className="GPautoCompleteProposal current",h.style.color="#000000",h.style["background-color"]="#CEDBEF";break;case 13:cn.log("enter"),l.click(i)}l.focus()}}})),i},_createLocationCoordinateInputElement:function(t){var e=this,i=document.createElement("input");return i.id=this._addUID("GPlocationOriginCoords_"+t),i.className="GPlocationOriginHidden",i.type="text",i.disabled=!1,i.addEventListener("click",(function(){var t=c.index(this.id);document.getElementById(e._addUID("GPlocationOriginLabel_"+t)).click()})),i},_createLocationPointerShowInputElement:function(t){var e=document.createElement("input");return e.id=this._addUID("GPlocationOriginPointer_"+t),e.type="checkbox",e},_createLocationPointerInputElement:function(t){var e=this,i=document.createElement("label");return i.id=this._addUID("GPlocationOriginPointerImg_"+t),i.htmlFor=this._addUID("GPlocationOriginPointer_"+t),i.className="GPlocationOriginPointerImg",i.title="Pointer un lieu sur la carte",i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var i,n,o,r=c.index(this.id),s=document.getElementsByClassName(e._addUID("GPlocationPoint"));for(i=0;i<s.length;i++)n=s[i].childNodes[0].id,r!==(o=c.index(n))&&(document.getElementById(e._addUID("GPlocationOriginPointer_"+o)).checked=!1,"Pointer un lieu sur la carte"===document.getElementById(e._addUID("GPlocationOriginCoords_"+o)).value&&(document.getElementById(e._addUID("GPlocationOriginCoords_"+o)).value="",document.getElementById(e._addUID("GPlocationOrigin_"+o)).className="GPlocationOriginVisible",document.getElementById(e._addUID("GPlocationOriginCoords_"+o)).className="GPlocationOriginHidden"));if(document.getElementById(e._addUID("GPlocationOriginPointer_"+r)).checked){for(document.getElementById(e._addUID("GPlocationOriginCoords_"+r)).value="",i=0;i<s.length;i++)n=s[i].childNodes[0].id,o=c.index(n),document.getElementById(e._addUID("GPlocationPoint_"+o)).style.cssText="";document.getElementById(e._addUID("GPlocationStageRemove_"+r))&&(document.getElementById(e._addUID("GPlocationStageRemove_"+r)).className="GPlocationStageRemove"),document.getElementById(e._addUID("GPlocationStageAdd"))&&(document.getElementById(e._addUID("GPlocationStageAdd")).className=""),document.getElementById(e._addUID("GPlocationOriginPointer_"+r)).checked=!1,document.getElementById(e._addUID("GPlocationOrigin_"+r)).className="GPlocationOriginVisible",document.getElementById(e._addUID("GPlocationOriginCoords_"+r)).className="GPlocationOriginHidden"}else{for(document.getElementById(e._addUID("GPlocationOriginCoords_"+r)).value="Pointer un lieu sur la carte",i=0;i<s.length;i++)n=s[i].childNodes[0].id,r===(o=c.index(n))?document.getElementById(e._addUID("GPlocationPoint_"+o)).style.cssText="":document.getElementById(e._addUID("GPlocationPoint_"+o)).style.display="none";document.getElementById(e._addUID("GPlocationStageRemove_"+r))&&(document.getElementById(e._addUID("GPlocationStageRemove_"+r)).className="GPlocationOriginHidden"),document.getElementById(e._addUID("GPlocationStageAdd"))&&(document.getElementById(e._addUID("GPlocationStageAdd")).className="GPlocationOriginHidden"),document.getElementById(e._addUID("GPlocationOriginPointer_"+r)).checked=!0,document.getElementById(e._addUID("GPlocationOrigin_"+r)).className="GPlocationOriginHidden",document.getElementById(e._addUID("GPlocationOriginCoords_"+r)).className="GPlocationOriginVisible",document.getElementById(e._addUID("GPlocationOriginCoords_"+r)).disabled=!0}e.onActivateMapPointClick(t)})),i},_createLocationRemovePointElement:function(t){var e=this,i=document.createElement("div");return i.id=this._addUID("GPlocationStageRemove_"+t),i.className="GPlocationStageRemove",i.title="Supprimer l'étape",i.addEventListener("click",(function(i){var n=document.getElementsByClassName(e._addUID("GPlocationPoint")),o=n.length-1,r=n[0].childNodes[0].id,s=n[o].childNodes[0].id,a=c.index(r),l=c.index(s);if(t!==a&&t!==l){var u=c.index(this.id);document.getElementById(e._addUID("GPlocationPoint_"+u)).className="GPflexInput GPlocationStageFlexInputHidden",document.getElementById(e._addUID("GPlocationOrigin_"+u)).value="",document.getElementById(e._addUID("GPlocationOrigin_"+u)).className="GPlocationOriginVisible",document.getElementById(e._addUID("GPlocationOriginCoords_"+u)).value="",document.getElementById(e._addUID("GPlocationOriginCoords_"+u)).className="GPlocationOriginHidden",document.getElementById(e._addUID("GPlocationStageAdd")).style.display="",e.onLocationRemovePointClick(i)}})),i},_createLocationAddPointElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPlocationStageAdd"),e.title="Ajouter une étape",e.addEventListener("click",(function(e){for(var i=1,n=0,o=document.getElementsByClassName(t._addUID("GPlocationPoint")),r=1;r<o.length-1;r++){var s=o[r].childNodes[0].id,a=c.index(s);document.getElementById(t._addUID("GPlocationPoint_"+a))&&("GPflexInput GPlocationStageFlexInputHidden"===document.getElementById(t._addUID("GPlocationPoint_"+a)).className?1===i&&(i=a):n++)}i<o.length&&(document.getElementById(t._addUID("GPlocationPoint_"+i)).className="GPflexInput GPlocationStageFlexInput"),4===n&&(document.getElementById(t._addUID("GPlocationStageAdd")).style.display="none"),t.onLocationAddPointClick(e)})),e},_createLocationAutoCompleteResultElement:function(t){var e=this,i=document.createElement("div");return i.id=this._addUID("GPlocationAutoCompleteList_"+t),i.className="GPadvancedAutoCompleteList",i.addEventListener?i.addEventListener("click",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t)).style.display="none"}),!1):i.attachEvent&&i.attachEvent("onclick",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById(e._addUID("GPlocationAutoCompleteList_"+t)).style.display="none"})),i},_createLocationAutoCompletedLocationElement:function(t,e,i){var n=document.getElementById(this._addUID("GPlocationAutoCompleteList_"+t)),o=document.createElement("div");o.id=this._addUID("AutoCompletedLocation_"+i),o.className="GPautoCompleteProposal",o.innerHTML=ln.getSuggestedLocationFreeform(e),n.appendChild(o)},GPdisplayCoordinate:function(t){for(var e=document.getElementsByClassName(this._addUID("GPlocationPoint")),i=0;i<e.length;i++){var n=e[i].childNodes[0].id,o=c.index(n);if(document.getElementById(this._addUID("GPlocationOriginPointer_"+o)).checked){document.getElementById(this._addUID("GPlocationOriginCoords_"+o)).value=t,document.getElementById(this._addUID("GPlocationOriginCoords_"+o)).disabled=!1;for(var r=0;r<e.length;r++){n=e[r].childNodes[0].id;var s=c.index(n);document.getElementById(this._addUID("GPlocationPoint_"+s)).style.cssText="",document.getElementById(this._addUID("GPlocationStageRemove_"+s))&&(document.getElementById(this._addUID("GPlocationStageRemove_"+s)).className="GPlocationStageRemove")}return document.getElementById(this._addUID("GPlocationOriginPointer_"+o)).checked=!1,void(document.getElementById(this._addUID("GPlocationStageAdd"))&&(document.getElementById(this._addUID("GPlocationStageAdd")).className=""))}}}},hn={NORTH:"N",SOUTH:"S",EAST:"E",WEST:"O",digitSecond:2,digitDecimal:5,digitRadian:8,roundToDecimal:function(t,e){var i=Math.pow(10,e);return Math.round(t*i)/i},decimalToRadian:function(t){return this.roundToDecimal(.017453292519943295*t,this.digitRadian)},decimalToGrade:function(t){return this.roundToDecimal(1.1111111111111112*t,this.digitRadian)},decimalToDMS:function(t,e,i){t<0&&(t*=-1);var n=Math.floor(t),o=60*(t-n),r=Math.floor(o),s=60*(o-r),a=this.roundToDecimal(s,this.digitSecond),l=n+"° "+r+"' "+a+'" ';return e&&(l+=e),i?{d:n,m:r,s:a,direction:e}:l},decimalLatToDMS:function(t,e){var i=t<0?this.SOUTH:this.NORTH;return this.decimalToDMS(t,i,e)},decimalLonToDMS:function(t,e){var i=t<0?this.WEST:this.EAST;return this.decimalToDMS(t,i,e)},DMSToDecimal:function(t,e,i,n){var o=t+e/60+i/3600;return o=n===this.SOUTH||n===this.WEST?-1*o:o,this.roundToDecimal(o,this.digitDecimal)}},dn=l.getLogger("icondefault"),pn=r.a.Icon.Default.extend({images:{retina:{shadow:"data:image/png;base64,...",color:{blue:"data:image/png;base64,...",orange:"data:image/png;base64,...",red:"data:image/png;base64,...",green:"data:image/png;base64,..."}},shadow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAYAAACoYAD2AAAC5ElEQVRYw+2YW4/TMBCF45S0S1luXZCABy5CgLQgwf//S4BYBLTdJLax0fFqmB07nnQfEGqkIydpVH85M+NLjPe++dcPc4Q8Qh4hj5D/AaQJx6H/4TMwB0PeBNwU7EGQAmAtsNfAzoZkgIa0ZgLMa4Aj6CxIAsjhjOCoL5z7Glg1JAOkaicgvQBXuncwJAWjksLtBTWZe04CnYRktUGdilALppZBOgHGZcBzL6OClABvMSVIzyBjazOgrvACf1ydC5mguqAVg6RhdkSWQFj2uxfaq/BrIZOLEWgZdALIDvcMcZLD8ZbLC9de4yR1sYMi4G20S4Q/PWeJYxTOZn5zJXANZHIxAd4JWhPIloTJZhzMQduM89WQ3MUVAE/RnhAXpTycqys3NZALOBbB7kFrgLesQl2h45Fcj8L1tTSohUwuxhy8H/Qg6K7gIs+3kkaigQCOcyEXCHN07wyQazhrmIulvKMQAwMcmLNqyCVyMAI+BuxSMeTk3OPikLY2J1uE+VHQk6ANrhds+tNARqBeaGc72cK550FP4WhXmFmcMGhTwAR1ifOe3EvPqIegFmF+C8gVy0OfAaWQPMR7gF1OQKqGoBjq90HPMP01BUjPOqGFksC4emE48tWQAH0YmvOgF3DST6xieJgHAWxPAHMuNhrImIdvoNOKNWIOcE+UXE0pYAnkX6uhWsgVXDxHdTfCmrEEmMB2zMFimLVOtiiajxiGWrbU52EeCdyOwPEQD8LqyPH9Ti2kgYMf4OhSKB7qYILbBv3CuVTJ11Y80oaseiMWOONc/Y7kJYe0xL2f0BaiFTxknHO5HaMGMublKwxFGzYdWsBF174H/QDknhTHmHHN39iWFnkZx8lPyM8WHfYELmlLKtgWNmFNzQcC1b47gJ4hL19i7o65dhH0Negbca8vONZoP7doIeOC9zXm8RjuL0Gf4d4OYaU5ljo3GYiqzrWQHfJxA6ALhDpVKv9qYeZA8eM3EhfPSCmpuD0AAAAASUVORK5CYII=",color:{blue:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAGmklEQVRYw7VXeUyTZxjvNnfELFuyIzOabermMZEeQC/OclkO49CpOHXOLJl/CAURuYbQi3KLgEhbrhZ1aDwmaoGqKII6odATmH/scDFbdC7LvFqOCc+e95s2VG50X/LLm/f4/Z7neY/ne18aANCmAr5E/xZf1uDOkTcGcWR6hl9247tT5U7Y6SNvWsKT63P58qbfeLJG8M5qcgTknrvvrdDbsT7Ml+tv82X6vVxJE33aRmgSyYtcWVMqX97Yv2JvW39UhRE2HuyBL+t+gK1116ly06EeWFNlAmHxlQE0OMiV6mQCScusKRlhS3QLeVJdl1+23h5dY4FNB3thrbYboqptEFlphTC1hSpJnbRvxP4NWgsE5Jyz86QNNi/5qSUTGuFk1gu54tN9wuK2wc3o+Wc13RCmsoBwEqzGcZsxsvCSy/9wJKf7UWf1mEY8JWfewc67UUoDbDjQC+FqK4QqLVMGGR9d2wurKzqBk3nqIT/9zLxRRjgZ9bqQgub+DdoeCC03Q8j+0QhFhBHR/eP3U/zCln7Uu+hihJ1+bBNffLIvmkyP0gpBZWYXhKussK6mBz5HT6M1Nqpcp+mBCPXosYQfrekGvrjewd59/GvKCE7TbK/04/ZV5QZYVWmDwH1mF3xa2Q3ra3DBC5vBT1oP7PTj4C0+CcL8c7C2CtejqhuCnuIQHaKHzvcRfZpnylFfXsYJx3pNLwhKzRAwAhEqG0SpusBHfAKkxw3w4627MPhoCH798z7s0ZnBJ/MEJbZSbXPhER2ih7p2ok/zSj2cEJDd4CAe+5WYnBCgR2uruyEw6zRoW6/DWJ/OeAP8pd/BGtzOZKpG8oke0SX6GMmRk6GFlyAc59K32OTEinILRJRchah8HQwND8N435Z9Z0FY1EqtxUg+0SO6RJ/mmXz4VuS+DpxXC3gXmZwIL7dBSH4zKE50wESf8qwVgrP1EIlTO5JP9Igu0aexdh28F1lmAEGJGfh7jE6ElyM5Rw/FDcYJjWhbeiBYoYNIpc2FT/SILivp0F1ipDWk4BIEo2VuodEJUifhbiltnNBIXPUFCMpthtAyqws/BPlEF/VbaIxErdxPphsU7rcCp8DohC+GvBIPJS/tW2jtvTmmAeuNO8BNOYQeG8G/2OzCJ3q+soYB5i6NhMaKr17FSal7GIHheuV3uSCY8qYVuEm1cOzqdWr7ku/R0BDoTT+DT+ohCM6/CCvKLKO4RI+dXPeAuaMqksaKrZ7L3FE5FIFbkIceeOZ2OcHO6wIhTkNo0ffgjRGxEqogXHYUPHfWAC/lADpwGcLRY3aeK4/oRGCKYcZXPVoeX/kelVYY8dUGf8V5EBRbgJXT5QIPhP9ePJi428JKOiEYhYXFBqou2Guh+p/mEB1/RfMw6rY7cxcjTrneI1FrDyuzUSRm9miwEJx8E/gUmqlyvHGkneiwErR21F3tNOK5Tf0yXaT+O7DgCvALTUBXdM4YhC/IawPU+2PduqMvuaR6eoxSwUk75ggqsYJ7VicsnwGIkZBSXKOUww73WGXyqP+J2/b9c+gi1YAg/xpwck3gJuucNrh5JvDPvQr0WFXf0piyt8f8/WI0hV4pRxxkQZdJDfDJNOAmM0Ag8jyT6hz0WGXWuP94Yh2jcfjmXAGvHCMslRimDHYuHuDsy2QtHuIavznhbYURq5R57KpzBBRZKPJi8eQg48h4j8SDdowifdIrEVdU+gbO6QNvRRt4ZBthUaZhUnjlYObNagV3keoeru3rU7rcuceqU1mJBxy+BWZYlNEBH+0eH4vRiB+OYybU2hnblYlTvkHinM4m54YnxSyaZYSF6R3jwgP7udKLGIX6r/lbNa9N6y5MFynjWDtrHd75ZvTYAPO/6RgF0k76mQla3FGq7dO+cH8sKn0Vo7nDllwAhqwLPkxrHwWmHJOo+AKJ4rab5OgrM7rVu8eWb2Pu0Dh4eDgXoOfvp7Y7QeqknRmvcTBEyq9m/HQQSCSz6LHq3z0yzsNySRfMS253wl2KyRDbcZPcfJKjZmSEOjcxyi+Y8dUOtsIEH6R2wNykdqrkYJ0RV92H0W58pkfQk7cKevsLK10Py8SdMGfXNXATY+pPbyJR/ET6n9nIfztNtZYRV9XniQu9IA2vOVgy4ir7GCLVmmd+zjkH0eAF9Po6K61pmCXHxU5rHMYd1ftc3owjwRSVRzLjKvqZEty6cRUD7jGqiOdu5HG6MdHjNcNYGqfDm5YRzLBBCCDl/2bk8a8gdbqcfwECu62Fg/HrggAAAABJRU5ErkJggg==",orange:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAABghJREFUWMOdl1uInGcdxn/feWa+mflmJmZbqVqKigewKK5goHgRSEm8EC88F6tBFLfgZbzJnVdRYWExrVBoXazWlAYL0dVisLBYzEUUSbeNjZQmxGZ3NjO7c57v/P69mNnD7MzuzvrCA8PM+/+e93n+h/cb7c9PzXKE9RHAG36+BXRPP3390CDtT3MHklSA7wKngVOWbaOhA5AkEUqpKnAFePHMM9eX9yeZrMQAzgHni14ln826ZLLu2KY0TfD7XXq9NoHffxX48Zmnr6+MkSyNK6kAl4ql8qlisYxpWagoJA16gIxs1E0bI1cAoNNuslFb94Env/jM9csj+0SEXaiIyN+9cuVU5dhxdEmI23XSoAOoIckOVBISt+vE7Q0KRY8H3v+BbM7Nv7w0Nzs3QrLHopdL5crHyqUKSbdB6ndA1BRIiVs1Mo5NySsD/GJpbvbkjpKds50rFL2T5VKZpNdAkmjiAzXDHOye8FvS2cC2LWZmHjAELv1xbrYyIFGCKKmIkvMlr4iK+0gaDe0ZQHcyWIUyVqGMmDZWvoRVKGO63sg+UMSdGq6bo+R5x0XJuYFdGqDxLa9UzJumQRp0R3y3ChU002Zjc5Pbd+6wGem8e/sO6+vrBGGIVagMTdmJScMepZIHGj/4ww8/a5jDevl63s2h4nAgfbhM1yOMQt67V+WjZ87y+VNPYmXzANz7x19YufQzilFIySsTt+vbcSrsYTlZnEymEgTBCV2U5EXJiUzGJg1aI9I1w6DZbPHoE+f5+Jee2iYAeGj2cR479zyNjo+SFN12xqzLZRxEyWld4EOWbRmIApVuJ1E3LaIwRLkzPPzYl8caUURwZz7Iw1/4Cq1WG8POjBSBCvvYtonAJ3URqeiaNlYpuuXg+wHlRz41kQBAKUX5w5+m1/PHKk7SBF0DEfFMgUjJMGnaro7WFGig0nhfAhEhjQI0TRuL1wwNFSkEfF2Ee3GSjp0kDXq4WZv7b19HJeNEWySrN/5G3nUQlezpJ4MkTRHhni4i1ThOuipNByfakhsHmIZGRnV565WLYyoA1t68RuONq3j5DKnfHiXRdKIoRkTuGl/9zIMCfC7rGJ/I5vOocGsQCoiQz7vc/8+/WH37BrnKgzjFY7RWb/Pu8mVWLv2UmUoOxzYGJFtxmobhZFmrd0hS9SPtpbOPApx0s/ZfH3moRNyujU5aO4eRcWl2AjZbPn6YYFsGXt6h4mUxDX0sxioep9kJeG+9ffVrz994fKsZX+v60bVuPzzhFo6RdHY1VtRDEp9S4RilgjPyMBX2iXu90dIbFsFm20fgJwCm7BTEzzda/u/zrjVspl2JVoq4vc40yyrO0OqGdPvxa9/41Y3XYfQ+udLshO8EQYyZK0454idAKTYafUTkwrblu0Z9KjBfb/pouvl/EZhuma4f0e7H//zm4htXt0n23HaL9VZQS5IU3c4emUTTNOoNH9hRsVcJAr7As7VWgJHJDTp4SpiFMv0oodGLbwm8MkoyescjIgtrm4GvlEI37SOo0Kk1AkTkwhOLK+keEtiDmggv1FshRrYwFYGRLRJEKfV2fFeEF/dW3F67tjB/txamIoKm65N37IJu2dRaEQLz3/71m9E4ybhdiMgtEVna7EQY+Qoial/oTo4oTqk2opqIPDepd/QDzjh/vxmDOtgq3cqy3ogQuPidF97qTiaZrAQRWW776bVOkGIW3jfZJidHqoTVRtwVkYX9psCkxO/GwnojRhvMlvGE2zmqzRgRfnn2Nzdb+5McnNbL9a56x48FI+vtSbaDaPDfjSQSmD9onh1kFyKSishCtZmgW/ZY2a5txojI4vd+e7N6CMmBdiHC4lojrcWpoDsuIGimhYhwp5amIlzgkKUf1gMgXZBnq40Ew8kNBmGuxHozAeSl7//u37cPJTmUYoCLdzdVJMNcgLDWFoTDVUxrFyJURVisNhVGzqPWVvQCWRJhZSqS4Qv3NFhYaw10rbUENC4MansaJYO/DtPgZi+QK7W20OrLsih5XZRMSTJdTrZHzWpzkIut76az62hrueXzHPDqUYL+B8XVKUzuUimfAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDEyLTA4LTE4VDE0OjUwOjU2KzAxOjAwFlCkXwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxMi0wOC0xOFQxNDo1MDo1NiswMTowMGcNHOMAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAAElFTkSuQmCC",red:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAABe5JREFUWMOdlWuIXGcZx3/nPbe5ZWbO2c0a8VIEpSq0io2QBT8FUlIFEbzfokUUKfgxIuSbn+JtYTEQqFQCQmkxVIiNFhcLwZoVtrFNt40ESrPEJju7s/eZM+f+Pn6Y2XVnZ3Zn0/fwcA7veZ/ze5//87zPMf56fJIHGB8Far3n20D79Nz1kU7GXw6G+MD3gdPAKdtxMJQFQJZEaK0bwBXg2Sfmrl87AHJi2LwJnAXOVf3xSrFcoVAuDyzKs4yw3SLY2iTqBC8BP31ibnZ+AHJ1MBIfeK7qeaeqno9l2+g4IQ86ILpvoXIczCMVAFob66wuLYXAmc/PXb/cB3nxsRN7AdfrY2MPe+Pj6Cjufnyk6Aa2XyfshLQ21glarae+8OrsxZ3N7JHoj3Xff9jzx8jWN8hbbdB6tOU5aXOVguNQ98YAfnv1+OTJHYgAPTt7pFY76Xk+2fo6kiSg8wEzLLMr25B32eoqjm0x8b5jpsBzLx6f9LsQARF8Ec7Vq1V0J0CSuM9ZFVxsr47t1RHHxq7XsL06Vq06AEqby5RLReq12lERzvbkEkC+VatWKpapyNtt6JERwfY9DMdmdW2NOwsLrCmDdxYWWFpaIopjbN/rarLLJw8C6rUqID/682MnTEsQgK9XSiV0nHQ17g2rViWOI95tLPOxJ89w4sx3sCvdarr3txnmf/kbqnFE3auTrqzu+OkgwC4WcAuuH0XRpBKhIsJkwbHJN9f79TcVG5tbPHruZ3z8qR/vAAA+8PgpPvf737Eehug8Rbn2gHQl10WE00rgw7ZtmdtVspMH2yKJY/TEBA996YsDVSsilD/0QR76ypfZ3GphFgp9AN3p4FgmAp9UIuIrQw2UpXJdwijGe+SRoQAArTXepz9FEEbdfOzylyxHddfWLEESLbpblrtPtM4AQafJvgARIY8iDMMY8DcM6a5BQiUY99I8H9hJHgSUHZvluVfRaToA2obc/8c/qbg2kqV9/oapyPIcwbinRKSRZnlb53l3R9vhRjGWAYV2i7cuXByIAmBx9l+sz8xQK7jkW1v9EKVI0hQRuWt+9dj7Bfhs0VSfKFZK6CDoq/lKucTya69x/+Y8pWPHcMd8Nu8s8M7lF5j/xa+ZKBVwTdWFbPsZBmaxwGIrINP6J8bzj34G4GTZcf7+kXqFtNns77SlMma5xEaUsBbGhFmGY5rUXBu/6GIpNeBjHz3KRpTw7lZ75ms3bzxudQXg5XaSzLbjZLI8Nka2srLrYLWRqEPdH6Pu2n0f050OaRD0l54yQIS1MELg5wDbEIBfrYbRCxW3MvDfkEyTLi+NavjdKMYn2Ixi2mn28jdu3nil1yCFnl3ZiNO3ozjtNb5DtPihbV+z2okRkfPDWn0uMLUSxhim9Z4AlufRThK20uzGN9/498wOhN0HUfSllShuZnmOKhXZ826kGYbBSicG0ed3S7g7EgRCgaebYYxZLvW/GWGW79HJM9bT7LbAn/oh/8/Jtk0vRkmotUY5zqGlMpSi2cvFt+dfz/dEYrDHmoLxh5Uwxjxy5FAAs1olynJWUn1XMJ7dW3FKGHpN3Y2yXEQwTDVSKuU6NKMEQaa+++brySBkUC5E5LaIXF2LE0zfR7Te11SpRJLlNJK8KSLPDDs76oA9Ti3H+UipVLHIUpggcOF7b73RHg4ZHgkicm0r17OtLMc6Oj5cpnKJXAv3U90Wken9uoAaUZzTS1GGIQxPeLFEI04RuPjkrfnN9wq5vKJ5OxTBrNb2JNtFFPw3lURg6qB+dpBciEguItONOEO5zkDZLoYpInLpB7fmGwdDRp/nS4sZzVQEVS6DCIZjIyIspOQC5xkx1O6/4D7WRuTpRpRhlkrdRlirsxRnIPL8D//z5p2RkH0O497rwt2cRBBUwQWExVwQZGQUPchAWxlmDcG41Eg0Zq1GM9EEoq4KxvyhIA/QaacXs+5z736+O3+YSEamZMduBaKuNFNhU9Q1EV6RwzEOnZOdxnk/7eZie+aQcj3QuLaJegZ46UGc/gcUeTtzDg/o4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxMi0wOC0xOFQxNDo1MDo1NiswMTowMBZQpF8AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTItMDgtMThUMTQ6NTA6NTYrMDE6MDBnDRzjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==",green:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wJCgoDDgqHD/MAAAZVSURBVFjDpZZtiFxXGcd/c+69M7PzurvdTTZNGvxQTCJqFSok+MmFQPSDUlsQhBaxWNhorQlWPxSKTYqsFLYGA8VCISDESIpCILYQW4xJNtHGGBooZtl16UrKNrMvM7N3Xu6555zHD7OZ7OzsW/Be/nBnznnO/zzP83/OcxKPv/IOW32KXzj2KFBc/nm7cuvl8IOXD21ql3j8lT9vsOjxfuB7wCHgoAoUCV8BYJsWRGaBc8DpvzwxfnF9kl90kxQ+f9wDXgReyg9kc8VkH4Wg2DUvdpqyXqRcKxOH5l3gZ+89OX5rDZLzqwhe7QfOZAcyB4fSO0h6KbSNqNt6F0lSJcn4WQA+bcyycHehATzz3pPjb6+cp0SEe8jvOdYvsRvPDmQOPpLZjRXLYjRPzYSIuC5EtsliNE9ZL7ItvY2dD+/sSRaDs8Nn9o90kLQ92HvcA87mduT27Mw8QiWuUDMhVuymMC5mPpoj42UYyu0A+M3wmf3D90lEQATgxfT29PDDPTup6jKx08gar6+CNf8XhEW9QEqlGNw16AFnhs/s72+FC6Gw79V+4KXtPUPUbZ3IRR07DVSSQlCkEBRRCdX+zvn5Lq/mohKFoEh2KDO4LB4ULUe+mxpI5RSKMA5xIm0Ug16SKsknjTtMfTxFGIdMfTzFzOIMoVmiGPQCdNjUTY3B9HZEeO5rv9/v+YggwncK6QKxxB3qyQU5aibk7iclvv3YUzz91WfJ+wUALsy+w+sf/opGusFgahuLerFt17BN0l4PQc7v10vmgJ/f98sccCDjZ5mP5jpIvITHYljm+QNH+NaupzrGDg59nc/m9/KDC08TD8UEyqdhG+1xh8PP+eglc0jhZLeXUp4V2yFPPxFQNzWymWwXAYAg7M5+hm/s+yZzzRIpL91hXzc1kioAJ59TQH9C3WOXNlJeitCEfLH3S2sSAFgxPNb7ZXQl7rJ3IiRaCxd9caLFgXUGcdJeyDiDiKBdtC6BE6FhGygv0WUvnsOKRZw0FHDHRg6HdCzWtHXyQZ4bn17HrBKEFdNaAMel0l/xcz5WbOd5hcI4A3BHiWPWaReKuNYOjEOMw2hDggQudpyceL3DC9cqXsZLl7g+9Q8KQYEls9S2FePwEgrbsIhjxuvb+2tJDYx/RXJuXzbI0dRR+xBwypDtyXLrvx9yLbzC9vR2HkoO8J9wkrMzp/nt+Bv0DKbwVUCj0VxxeEAQJKneDRErz/siAk5ONueiJzI7MrAirroe4zJC70NFphem+PnkUWzkUH6CZG9A364iXsKjulTprK98nqV6Fde0F/72/Q8+8hGh8u+fvl/Y89rVWn/tQDaXI6wu3e8ZYYzxLflsjlymU2UN2yAO4zUbVXNeIyLHAHzuJ/w1XY7/mN7mWKUBJHZUy9UttehsMUtYD7EN8/6lZ69fBmiFCxDLuWhBT0b90aN+zm9r/0EfEdfywjLaddRXJ45aYCxa0PjKp53FB0CqN0mzGWFC88/Lz12/sKIzrpjn5FRzLioZZ/B6fMTxQFAkiBY04mS0szOuYKlOHG0g8mazFOGlFGJly0jmfXQ9Rpf1bUT+tG6PX87PiWg+aiDgpbyWpLeARKCIyjHA6JWRG3ZVjxdWojJxpAT8rjkX4We9LSU7KATYhiWu6Bng9OpxtVYCxTHWLEX2XmE6tzGUnyAqx4hj7MrIDd1FsjpcIkJl4oXbYuW8rhqSfUkkduvCSymsdkRzUUmsvLWWp2o9OYqTsWhRb6pcP+ujyzHi5OTVH/8rXJNkLU9EhOrUCxdNzVw1NUN6ILlmsv2MhxhHcy4KgRPr5awr8Z3ghC7r5Uru3oif8YgWNMAb135ys7I+yYbx4O24aiZt5Ej2JjsvGSkPBKJ5rRHGNlLfuuESESqTP7IiLW+UrxBLG0E+aFW3cOrakZuzG5JsHC4BOKUrpuRM64ojTlB+AhGhOa8tMLpZHanN1FOZ/GEIvBlXYvweBSIk+wJ0q7r/8PejN6c3JdnSCevkZLSgtdhWLsSBLmtYdRD+H+ESKlOHZ8XJqbgaExQC4iWD0+58Zerwra2RbM7B8qX8hK7EiBN0WSPC6OoOun5O2NpbnT78kdXunKlbbOQuVqcPX5YtsqgH636M6bIGYbTj/rN5Trb+VKdHLtqme6s6PfLug9j9D/FCc1g2qf7VAAAAAElFTkSuQmCC"}},initialize:function(t,e){r.a.Util.extend(this.options,e);var i=null,n=this.images;switch(t){case"red":i=n.color.red;break;case"green":i=n.color.green;break;case"orange":i=n.color.orange;break;case"blue":i=n.color.blue;break;default:i=n.color.blue}this.options.iconUrl=i,this.options.shadowUrl=n.shadow,r.a.Browser.retina&&(this.options.iconRetinaUrl=i,this.options.shadowRetinaUrl=n.shadow)},_getIconUrl:function(t){return dn.trace("OVERWRITTEN L.Icon.Default._getIconUrl("+t+")"),r.a.Icon.prototype._getIconUrl.call(this,t)}}),mn=l.getLogger("locationselector"),fn=r.a.Control.extend({includes:un,options:{position:"topleft",tag:{id:0,unique:null,label:">",color:"blue",display:!0,addOption:!1,removeOption:!1},disableReverse:!1,displayInfo:!0,autocompleteOptions:{},reverseGeocodeOptions:{}},initialize:function(t){r.a.Util.setOptions(this,t),this._uid=this.options.tag.unique||null,this._activeDragAndDrop=!1,this._pressedKeyOnDragAndDrop=!1,this._map=null,this._inputsContainer=null,this._inputLabelContainer=null,this._inputAutoCompleteContainer=null,this._inputShowPointerContainer=null,this._inputCoordinateContainer=null,this._coordinate=null,this._suggestedContainer=null,this._suggestedLocations=[],this._currentLocation=null,this._marker=null,this._resources={},this._container=this._uid?this._initLayout():null},onAdd:function(){this._uid=c.generate();var t=this._initLayout();return r.a.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),t},onRemove:function(){},getCoordinate:function(){return this._coordinate},setCoordinate:function(t){this._displayResultOfCoordinate(t)},setMap:function(t){this._map||(this._map=t)},clear:function(){this._setCursor(),this._setMarker(),this._clearResults(),this._inputLabelContainer.click()},dragging:function(t){this._marker&&(t?this._marker.dragging.enable():this._marker.dragging.disable())},_initLayout:function(){var t=this.options.tag.id,e=this._createMainContainerElement(),i=this._inputsContainer=this._createLocationPointElement(t,this.options.tag.display);e.appendChild(i);var n=this._inputLabelContainer=this._createLocationPointLabelElement(t,this.options.tag.label);i.appendChild(n);var o=this._inputAutoCompleteContainer=this._createLocationAutoCompleteteInputElement(t);i.appendChild(o);var r=this._inputCoordinateContainer=this._createLocationCoordinateInputElement(t);i.appendChild(r);var s=this._inputShowPointerContainer=this._createLocationPointerShowInputElement(t);i.appendChild(s);var a=this._createLocationPointerInputElement(t);if(i.appendChild(a),this.options.tag.addOption){var l=this._createLocationAddPointElement();i.appendChild(l)}if(this.options.tag.removeOption){var c=this._createLocationRemovePointElement(t);i.appendChild(c)}var u=this._suggestedContainer=this._createLocationAutoCompleteResultElement(t);return e.appendChild(u),e},_setLabel:function(t){this._inputAutoCompleteContainer.value=t||""},_setCoordinate:function(t){this._coordinate=t;var e;e=hn.roundToDecimal(t.lat,4);var i=hn.roundToDecimal(t.lng,4)+" , "+e;this.GPdisplayCoordinate(i)},_setPosition:function(t){mn.log("_setPosition()",t),this._map.panTo(r.a.latLng(t))},_setMarker:function(t,e,i){if(mn.log("_setMarker()",t,e,i),!this._activeDragAndDrop){var n=this._map;if(null!=this._marker&&(this._marker.off("mousedown",this.onMouseDownMarker,this),this._marker.off("dragstart",this.onStartDragMarker,this),this._marker.off("drag",this.onDragMarker,this),this._marker.off("dragend",this.onEndDragMarker,this),n.removeLayer(this._marker),this._marker=null),t){var o={icon:new pn(this.options.tag.color),draggable:!0,clickable:!0,zIndexOffset:1e3};if(this._marker=r.a.marker(r.a.latLng(t),o),this._marker.on("mousedown",this.onMouseDownMarker,this),this._marker.on("dragstart",this.onStartDragMarker,this),this._marker.on("drag",this.onDragMarker,this),this._marker.on("dragend",this.onEndDragMarker,this),this._marker.addTo(n),i){var s=null;s="string"!=typeof e?"GeocodedLocation"===e.service?ln.getGeocodedLocationFreeform(e.location):"SuggestedLocation"===e.service?ln.getSuggestedLocationFreeform(e.location):"sans informations.":e,this._marker.bindPopup(s)}}}},_setCursor:function(t){var e=this._map.getContainer();e.style.cursor=t||null},_clearResults:function(){this._currentLocation=null,this._coordinate=null,this._clearSuggestedLocation()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_requestAutoComplete:function(t){if(mn.log("_requestAutoComplete()",t),t&&0!==Object.keys(t).length&&t.text){mn.log(t);var e={};r.a.Util.extend(e,this.options.autocompleteOptions),r.a.Util.extend(e,t),r.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),mn.log(e),an.Services.autoComplete(e)}},_fillAutoCompletedLocationListContainer:function(t){if(mn.log("_fillAutoCompletedLocationListContainer()",t),t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var i=0;i<t.length;i++)this._createLocationAutoCompletedLocationElement(this.options.tag.id,t[i],i);this._suggestedLocations=t}},_requestReverseGeocode:function(t){if(mn.log("_requestReverseGeocode()",t),t&&0!==Object.keys(t).length&&t.searchGeometry&&0!==Object.keys(t.searchGeometry).length){var e={};r.a.Util.extend(e,this.options.reverseGeocodeOptions),r.a.Util.extend(e,t),r.a.Util.extend(e,{returnFreeForm:!0,index:"StreetAddress"}),r.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),mn.log(e),an.Services.reverseGeocode(e)}},_displayResultOfCoordinate:function(t){this._setCoordinate(t),this._setMarker(t,null,!1),mn.log(this.getCoordinate()),this.onActivateMapPointClick()},_displayResultOfLabel:function(t){var e=ln.getGeocodedLocationFreeform(t);this._setCoordinate({lat:t.position.lat,lng:t.position.lon}),this._setLabel(e);var i={service:"GeocodedLocation",location:t};this._setMarker(t.position,i,!0),this._inputShowPointerContainer.checked=!1,this._inputAutoCompleteContainer.className="GPlocationOriginVisible",this._inputCoordinateContainer.className="GPlocationOriginHidden",this.onActivateMapPointClick()},onAutoCompleteSearchText:function(t){mn.log("onAutoCompleteSearchText()",t);var e=t.target.value;if(e&&(this._currentLocation=e,!(e.length<3))){var i=this;this._requestAutoComplete({text:e,maximumResponses:5,onSuccess:function(t){if(mn.log(t),t){var e=t.suggestedLocations;i._fillAutoCompletedLocationListContainer(e)}},onFailure:function(t){i._clearSuggestedLocation(),mn.log(t.message)}})}},onAutoCompletedResultsItemClick:function(t){mn.log("onAutoCompletedResultsItemClick()",t);var e=c.index(t.target.id);if(mn.log(e),mn.log(this._suggestedLocations[e]),e){var i={lon:this._suggestedLocations[e].position.x,lat:this._suggestedLocations[e].position.y},n={service:"SuggestedLocation",location:this._suggestedLocations[e]},o=ln.getSuggestedLocationFreeform(this._suggestedLocations[e]);this._setLabel(o),this._setPosition(i),this._setMarker(i,n,this.options.displayInfo),this._coordinate=i}},onActivateMapPointClick:function(t){mn.trace("onActivateMapPointClick()",t);var e=this._map;this._inputShowPointerContainer.checked?this._activeDragAndDrop||(e.on("click",this.onMouseMapClick,this),this._setCursor("crosshair"),this._setMarker(),this._clearResults()):this._activeDragAndDrop||(e.off("click",this.onMouseMapClick,this),this._setCursor())},onLocationClearPointClick:function(t){mn.log("onLocationClearPointClick",t),this._setCursor(),this._setMarker(),this._clearResults(),this._inputAutoCompleteContainer.focus()},onLocationRemovePointClick:function(t){mn.log("onLocationRemovePointClick",t),this._setCursor(),this._setMarker(),this._clearResults()},onLocationAddPointClick:function(t){mn.log("onLocationAddPointClick",t)},onMouseMapClick:function(t){mn.log("onMouseMapClick",t);var e=t.latlng;if(this.options.disableReverse)this._displayResultOfCoordinate(e);else{var i=this;this._requestReverseGeocode({searchGeometry:{type:"Circle",coordinates:[e.lng,e.lat],radius:50},maximumResponses:1,onSuccess:function(t){if(mn.log(t),0!==t.locations.length){var n=t.locations[0];i._displayResultOfLabel(n)}else i._displayResultOfCoordinate(e)},onFailure:function(t){mn.log(t.message),i._displayResultOfCoordinate(e)}})}},onStartDragMarker:function(){this._marker&&(this._activeDragAndDrop=!0,this._inputShowPointerContainer.checked=!0,this._inputAutoCompleteContainer.className="GPlocationOriginHidden",this._inputCoordinateContainer.className="GPlocationOriginVisible",this._marker.unbindPopup(),this._setLabel(),this._clearResults())},onDragMarker:function(){if(this._marker){this._activeDragAndDrop=!1,this._inputShowPointerContainer.checked=!0;var t=this._marker.getLatLng();this._setCoordinate(t)}},onEndDragMarker:function(){if(this._marker){this._inputShowPointerContainer.checked=!0;var t=this._marker.getLatLng();this._pressedKeyOnDragAndDrop?this._setCoordinate(t):(mn.log("No key pressed, so autocomplete solution !"),this.onMouseMapClick({latlng:t})),this._activeDragAndDrop=!1,this._pressedKeyOnDragAndDrop=!1}},onMouseDownMarker:function(t){this._marker&&(this._pressedKeyOnDragAndDrop=t.originalEvent.ctrlKey)}}),gn={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochron"),t.className="GPwidget",t},_createShowIsoElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowIsochron"),t.type="checkbox",t},_createShowIsoPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowIsochronPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowIsochron"),e.title="Calculer une isochrone",e.addEventListener?e.addEventListener("click",(function(e){t.onShowIsoPanelClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowIsoPanelClick(e)}));var i=document.createElement("span");return i.id=this._addUID("GPshowIsochronOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createIsoPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochronPanel"),t.className="GPpanel",t},_createIsoPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Calcul d'isochrone",e.appendChild(i);var n=document.createElement("div");return n.id=this._addUID("GPisochronPanelClose"),n.className="GPpanelClose",n.title="Fermer le panneau",n.addEventListener?n.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowIsochronPicto")).click()}),!1):n.attachEvent&&n.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowIsochronPicto")).click()})),e.appendChild(n),e},_createIsoPanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GPisochronForm"),e.addEventListener("submit",(function(e){return e.preventDefault(),t.onIsoComputationSubmit(e),!1})),e},_createIsoWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPisochronCalcWaitingContainer"),t.className="GPisochronCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GPisochronCalcWaiting",e.innerHTML="Calcul en cours...",t.appendChild(e),t},_createIsoPanelFormTypeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochronChoice"),t},_createIsoPanelFormTypeChoiceChronElement:function(t){var e=this,i=document.createElement("div");i.className="GPisochronChoiceAlt";var n=document.createElement("input");n.id=this._addUID("GPisochronChoiceAltChron"),n.name="GPisochronChoiceMode",n.type="radio",n.checked=!!t,n.addEventListener?n.addEventListener("change",(function(t){document.getElementById(e._addUID("GPisochronValueChron")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueDist")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange(t)}),!1):n.attachEvent&&n.attachEvent("onchange",(function(){document.getElementById(e._addUID("GPisochronValueChron")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueDist")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange()})),n.value="isochron",i.appendChild(n);var o=document.createElement("label");o.className="GPisochronChoiceAltImg",o.htmlFor=this._addUID("GPisochronChoiceAltChron"),i.appendChild(o);var r=document.createElement("span");return r.id=this._addUID("GPisochronChoiceAltChronTxt"),r.innerHTML="isochrone",r.addEventListener?r.addEventListener("click",(function(){document.getElementById(e._addUID("GPisochronChoiceAltChron")).click()}),!1):r.attachEvent&&r.attachEvent("onclick",(function(){document.getElementById(e._addUID("GPisochronChoiceAltChron")).click()})),i.appendChild(r),i},_createIsoPanelFormTypeChoiceDistElement:function(t){var e=this,i=document.createElement("div");i.className="GPisochronChoiceAlt";var n=document.createElement("input");n.id=this._addUID("GPisochronChoiceAltDist"),n.name="GPisochronChoiceMode",n.type="radio",n.checked=!!t,n.addEventListener?n.addEventListener("change",(function(t){document.getElementById(e._addUID("GPisochronValueDist")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueChron")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange(t)}),!1):n.attachEvent&&n.attachEvent("onchange",(function(){document.getElementById(e._addUID("GPisochronValueDist")).className="GPflexInput",document.getElementById(e._addUID("GPisochronValueChron")).className="GPisochronValueHidden",e.onIsoTypeChoiceChange()})),n.value="isodistance",i.appendChild(n);var o=document.createElement("label");o.className="GPisochronChoiceAltImg",o.htmlFor=this._addUID("GPisochronChoiceAltDist"),i.appendChild(o);var r=document.createElement("span");return r.id=this._addUID("GPisochronChoiceAltDistTxt"),r.innerHTML="isodistance",r.addEventListener?r.addEventListener("click",(function(){document.getElementById(e._addUID("GPisochronChoiceAltDist")).click()}),!1):r.attachEvent&&r.attachEvent("onclick",(function(){document.getElementById(e._addUID("GPisochronChoiceAltDist")).click()})),i.appendChild(r),i},_createIsoPanelFormValueIsochronElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GPisochronValueChron"),i.className=t?"GPflexInput":"GPisochronValueHidden";var n=document.createElement("label");n.id=this._addUID("GPisochronValueChronLabel"),n.htmlFor=this._addUID("GPisochronValueChronInput"),n.innerHTML="Temps",i.appendChild(n);var o=document.createElement("input");o.id=this._addUID("GPisochronValueChronInput1"),o.min="0",o.step="1",o.value="0",o.type="number",o.addEventListener?o.addEventListener("change",(function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeHourChange(t)})):o.attachEvent&&o.attachEvent("onchange",(function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeHourChange(t)})),i.appendChild(o);var r=document.createElement("label");r.innerHTML="h",i.appendChild(r);var s=document.createElement("input");s.id=this._addUID("GPisochronValueChronInput2"),s.min="0",s.max="59",s.step="1",s.value="0",s.type="number",s.addEventListener?s.addEventListener("change",(function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeMinuteChange(t)})):s.attachEvent&&s.attachEvent("onchange",(function(t){"function"==typeof e.onIsoValueChronTimeMinuteChange&&e.onIsoValueChronTimeMinuteChange(t)})),i.appendChild(s);var a=document.createElement("label");return a.innerHTML="min",i.appendChild(a),i},_createIsoPanelFormValueIsodistanceElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GPisochronValueDist"),i.className=t?"GPflexInput":"GPisochronValueHidden";var n=document.createElement("label");n.id=this._addUID("GPisochronValueDistLabel"),n.htmlFor=this._addUID("GPisochronValueDistInput"),n.innerHTML="Distance",i.appendChild(n);var o=document.createElement("input");o.id=this._addUID("GPisochronValueDistInput"),o.min="0",o.step="any",o.value="0",o.type="number",o.addEventListener?o.addEventListener("change",(function(t){"function"==typeof e.onIsoValueDistChange&&e.onIsoValueDistChange(t)})):o.attachEvent&&o.attachEvent("onchange",(function(t){"function"==typeof e.onIsoValueDistChange&&e.onIsoValueDistChange(t)})),i.appendChild(o);var r=document.createElement("label");return r.innerHTML="km",i.appendChild(r),i},_createIsoPanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPisochronModeChoice"),t},_createIsoPanelFormModeChoiceTransportElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GPisochronTransportChoice");var n=document.createElement("span");n.className="GPisochronModeLabel",n.innerHTML="Mode de transport",i.appendChild(n);for(var o=0;o<t.length;o++){var r=t[o];if("Voiture"===r){var s=document.createElement("input");s.id=this._addUID("GPisochronTransportCar"),s.type="radio",s.name="GPisochronTransport",0===o&&(s.checked=!0),s.addEventListener?s.addEventListener("change",(function(t){e.onIsoModeTransportChange(t)})):s.attachEvent&&s.attachEvent("onchange",(function(t){e.onIsoModeTransportChange(t)})),s.value="Voiture",i.appendChild(s);var a=document.createElement("label");a.className="GPisochronTransportImg",a.htmlFor=this._addUID("GPisochronTransportCar"),a.title="Voiture",i.appendChild(a)}if("Pieton"===r){var l=document.createElement("input");l.id=this._addUID("GPisochronTransportPedestrian"),l.type="radio",l.name="GPisochronTransport",0===o&&(l.checked=!0),l.addEventListener?l.addEventListener("change",(function(t){e.onIsoModeTransportChange(t)})):l.attachEvent&&l.attachEvent("onchange",(function(t){e.onIsoModeTransportChange(t)})),l.value="Pieton",i.appendChild(l);var c=document.createElement("label");c.className="GPisochronTransportImg",c.htmlFor=this._addUID("GPisochronTransportPedestrian"),c.title="Piéton",i.appendChild(c)}}return i},_createIsoPanelFormModeChoiceDirectionElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GPisochronDirectionChoice");var n=document.createElement("span");n.className="GPisochronModeLabel",n.innerHTML="Sens de parcours",i.appendChild(n);var o=document.createElement("select");o.id=this._addUID("GPisochronDirectionSelect"),o.className="GPinputSelect",o.addEventListener("change",(function(t){e.onIsoModeDirectionChange(t)}));for(var r=0;r<t.length;r++){var s=t[r];if("departure"===s.toLowerCase()){var a=document.createElement("option");0===r&&(a.selected="selected"),a.value="departure",a.text="Départ",o.appendChild(a)}if("arrival"===s.toLowerCase()){var l=document.createElement("option");0===r&&(l.selected="selected"),l.value="arrival",l.text="Arrivée",o.appendChild(l)}}return i.appendChild(o),i},_createShowIsoExclusionsElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowIsoExclusions"),t.type="checkbox",t},_createShowIsoExclusionsPictoElement:function(){var t=document.createElement("label");return t.id=this._addUID("GPshowIsoExclusionsPicto"),t.className="GPshowMoreOptionsImage GPshowMoreOptions GPshowIsoExclusionsPicto",t.htmlFor=this._addUID("GPshowIsoExclusions"),t.title="Exclusions",t.style.top="240px",t},_createIsoPanelFormExclusionsElement:function(){var t=document.createElement("div");t.id=this._addUID("GPisoExclusions");var e=document.createElement("span");return e.className="GPisoExclusionsLabel",e.innerHTML="Passages autorisés",t.appendChild(e),t},_createIsoPanelFormExclusionOptionsElement:function(t){var e=this,i=document.createElement("div");for(var n in i.className="GPisoExclusionsOptions",t)if(t.hasOwnProperty(n)){var o=t[n];switch(n){case"toll":var r=document.createElement("input");r.id=this._addUID("GPisoExclusionsToll"),r.type="checkbox",r.checked=!o,r.addEventListener?r.addEventListener("change",(function(t){e.onIsoExclusionsChange(t)})):r.attachEvent&&r.attachEvent("onchange",(function(t){e.onIsoExclusionsChange(t)})),r.value="Toll",i.appendChild(r);var s=document.createElement("label");s.className="GPisoExclusionsOption",s.htmlFor=this._addUID("GPisoExclusionsToll"),s.innerHTML="Péages",i.appendChild(s);break;case"tunnel":var a=document.createElement("input");a.id=this._addUID("GPisoExclusionsTunnel"),a.type="checkbox",a.checked=!o,a.addEventListener?a.addEventListener("change",(function(t){e.onIsoExclusionsChange(t)})):a.attachEvent&&a.attachEvent("onchange",(function(t){e.onIsoExclusionsChange(t)})),a.value="Tunnel",i.appendChild(a);var l=document.createElement("label");l.className="GPisoExclusionsOption",l.htmlFor=this._addUID("GPisoExclusionsTunnel"),l.innerHTML="Tunnels",i.appendChild(l);break;case"bridge":var c=document.createElement("input");c.id=this._addUID("GPisoExclusionsBridge"),c.type="checkbox",c.checked=!o,c.addEventListener?c.addEventListener("change",(function(t){e.onIsoExclusionsChange(t)})):c.attachEvent&&c.attachEvent("onchange",(function(t){e.onIsoExclusionsChange(t)})),c.value="Bridge",i.appendChild(c);var u=document.createElement("label");u.className="GPisoExclusionsOption",u.htmlFor=this._addUID("GPisoExclusionsBridge"),u.innerHTML="Ponts",i.appendChild(u)}}return i},_createIsoSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPisochronSubmit"),t.className="GPinputSubmit",t.type="submit",t.value="Calculer",t},_createIsoFormResetElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPisochronReset"),e.title="Réinitialiser les paramètres",e.addEventListener("click",(function(e){t.onIsoResetClick(e)})),e}};function _n(t){return(_n="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)}var vn=l.getLogger("Isocurve"),yn=r.a.Control.extend({includes:gn,options:{position:"topleft",collapsed:!0,methods:["time","distance"],graphs:["Voiture","Pieton"],exclusions:{toll:!1,tunnel:!1,bridge:!1},directions:["departure","arrival"],disableReverse:!1,isocurveOptions:{},autocompleteOptions:{}},initialize:function(t){r.a.Util.setOptions(this,t),this._uid=c.generate(),this._isDesktop=this._detectSupport(),this._waitingContainer=null,this._showContainer=null,this._pictoContainer=null,this._formContainer=null,this._submitContainer=null,this._currentTransport=null,this._currentDirection=null,this._currentComputation=null,this._currentTimeHour=0,this._currentTimeMinute=0,this._currentDistance=0,this._currentExclusions=[],this._initTransport(),this._initComputation(),this._initDirection(),this._initExclusions(),this._currentPoint=null,this._geojsonIso=null,this._waiting=!1,this._timer=null,this._currentIsoResults=null,this._resources={}},onAdd:function(t){var e=this._container=this._initLayout(t);return r.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),e},onRemove:function(){},_initTransport:function(){this._currentTransport="Voiture";var t=this.options.graphs;t&&0!==t.length||(this.options.graphs=["Voiture","Pieton"]),r.a.Util.isArray(t)&&t.length&&("Voiture"!==t[0]&&"Pieton"!==t[0]||(this._currentTransport=t[0]));var e=this.options.isocurveOptions;e.graph&&(this._currentTransport=e.graph)},_initDirection:function(){this._currentDirection="departure";var t=this.options.directions;t&&0!==t.length||(this.options.directions=["departure","arrival"]),r.a.Util.isArray(t)&&t.length&&("departure"!==t[0]&&"arrival"!==t[0]||(this._currentDirection=t[0]));var e=this.options.isocurveOptions;e.reverse||(this._currentDirection="departure"),!0===e.reverse&&(this._currentDirection="arrival",this.options.directions=["arrival","departure"])},_initComputation:function(){this._currentComputation="time";var t=this.options.methods;t&&0!==t.length||(this.options.methods=["time","distance"]),r.a.Util.isArray(t)&&t.length&&("time"!==t[0]&&"distance"!==t[0]||(this._currentComputation=t[0]));var e=this.options.isocurveOptions;e.method&&(this._currentComputation=e.method),e.time&&(this._currentComputation="time"),e.distance&&(this._currentComputation="distance")},_initExclusions:function(){this._currentExclusions=[];var t=this.options.exclusions;if((!t||"object"===_n(t)&&0===Object.keys(t).length)&&(this.options.exclusions={toll:!1,tunnel:!1,bridge:!1}),t&&"object"===_n(t)&&Object.keys(t).length)for(var e in t)t.hasOwnProperty(e)&&t.k&&this._currentExclusions.push(e);var i=this.options.isocurveOptions;Array.isArray(i.exclusions)&&(this._currentExclusions=i.exclusions)},_detectSupport:function(){var t=!0,e=window.navigator.userAgent.toLowerCase();return-1===e.indexOf("iphone")&&-1===e.indexOf("ipod")&&-1===e.indexOf("ipad")&&-1===e.indexOf("android")&&-1===e.indexOf("mobile")&&-1===e.indexOf("blackberry")&&-1===e.indexOf("tablet")&&-1===e.indexOf("phone")&&-1===e.indexOf("touch")||(t=!1),-1===e.indexOf("msie")&&-1===e.indexOf("trident")||(t=!0),t},_initLayout:function(t){var e=this._createMainContainerElement(),i=this._showContainer=this._createShowIsoElement();e.appendChild(i),this.options.collapsed||(i.checked=!0);var n=this._pictoContainer=this._createShowIsoPictoElement();e.appendChild(n);var o=this._createIsoPanelElement(),r=this._createIsoPanelHeaderElement();o.appendChild(r);var s=this._formContainer=this._createIsoPanelFormElement(),a=this._createIsoPanelFormPointElement(t);s.appendChild(a);for(var l=!1,c=!1,u=this._createIsoPanelFormTypeChoiceElement(),h=0;h<this.options.methods.length;h++)"time"===this.options.methods[h]&&(l=0===h,u.appendChild(this._createIsoPanelFormTypeChoiceChronElement(l))),"distance"===this.options.methods[h]&&(c=0===h,u.appendChild(this._createIsoPanelFormTypeChoiceDistElement(c)));s.appendChild(u),s.appendChild(this._createIsoPanelFormValueIsochronElement(l)),s.appendChild(this._createIsoPanelFormValueIsodistanceElement(c));var d=this._createIsoPanelFormModeChoiceElement();if(d.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs)),d.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions)),s.appendChild(d),this.options.exclusions&&"object"===_n(this.options.exclusions)&&0!==Object.keys(this.options.exclusions).length){s.appendChild(this._createShowIsoExclusionsElement()),s.appendChild(this._createShowIsoExclusionsPictoElement());var p=this._createIsoPanelFormExclusionsElement();p.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions)),s.appendChild(p)}var m=this._createIsoFormResetElement();s.appendChild(m);var f=this._submitContainer=this._createIsoSubmitFormElement();s.appendChild(f),o.appendChild(s);var g=this._waitingContainer=this._createIsoWaitingElement();return o.appendChild(g),e.appendChild(o),e},_createIsoPanelFormPointElement:function(t){return this._currentPoint=new fn({apiKey:this.options.apiKey||null,tag:{id:0,unique:this._uid,label:"Départ",color:"red",display:!0},displayInfo:!0,disableReverse:this.options.disableReverse,autocompleteOptions:this.options.autocompleteOptions||null}),this._currentPoint.setMap(t),this._currentPoint.getContainer()},onShowIsoPanelClick:function(t){vn.log("onShowIsoPanelClick",t)},onIsoResetClick:function(t){vn.log("onIsoResetClick",t),this._clear()},onIsoTypeChoiceChange:function(t){var e=t.target.value;e&&("isodistance"===e&&(this._currentComputation="distance"),"isochron"===e&&(this._currentComputation="time"))},onIsoModeTransportChange:function(t){var e=t.target.value;e&&(this._currentTransport=e)},onIsoModeDirectionChange:function(t){var e=t.target.value;e&&(this._currentDirection=e)},onIsoValueChronTimeHourChange:function(t){var e=t.target.value;this._timeHourContainer=t.target,e&&(this._currentTimeHour=e)},onIsoValueChronTimeMinuteChange:function(t){var e=t.target.value;this._timeMinuteContainer=t.target,e&&(this._currentTimeMinute=e)},onIsoValueDistChange:function(t){var e=t.target.value;this._distanceContainer=t.target,e&&(this._currentDistance=e)},onIsoExclusionsChange:function(t){var e=t.target.value,i=t.target.checked;if(e){for(var n=!1,o=null,r=0;r<this._currentExclusions.length;r++)En(this._currentExclusions[r],e.toLowerCase())&&(o=r,n=!0);n||i||this._currentExclusions.push(e.toLowerCase()),n&&i&&this._currentExclusions.splice(o,1)}},onIsoComputationSubmit:function(){var t,e;if(this._currentPoint&&this._currentPoint.getCoordinate&&this._currentPoint.getCoordinate())if("time"===this._currentComputation.toLowerCase()&&(t=3600*this._currentTimeHour+60*this._currentTimeMinute,vn.log("time : ",t)),"distance"===this._currentComputation.toLowerCase()&&(e=1e3*this._currentDistance,vn.log("distance : ",e)),t||e){this._displayWaitingContainer();var i=this,n=i._currentPoint.getCoordinate(),o={x:n.lon||n.lng,y:n.lat};this._requestIsoCurve({position:o,graph:i._currentTransport,exclusions:i._currentExclusions,method:i._currentComputation,reverse:"arrival"===i._currentDirection.toLowerCase(),time:t,distance:e,smoothing:!0,timeout:7e3,protocol:"XHR",onSuccess:function(t){vn.log(t),t&&i._drawIsoResults(t)},onFailure:function(t){i._hideWaitingContainer(),i._clearIsoResultsGeometry(),vn.log(t.message)}})}else vn.log("Missing time or distance parameter")},_requestIsoCurve:function(t){if(t&&("object"!==_n(t)||0!==Object.keys(t).length)&&t.position){var e={};r.a.Util.extend(e,t),r.a.Util.extend(e,this.options.isocurveOptions),e.apiKey=this.options.isocurveOptions.apiKey||this.options.apiKey,e.ssl=this.options.ssl,vn.log(e),an.Services.isoCurve(e)}},_drawIsoResults:function(t){if(this._clearIsoResultsGeometry(),this._currentIsoResults=t,t.geometry){var e=this._map,i=t.geometry;this._geojsonIso=r.a.geoJson(i,{style:{color:"#ff7800",weight:5,opacity:.65}}).addTo(e),this._hideWaitingContainer(),this._formContainer.className="GPisochroComponentHidden"}else this._hideWaitingContainer()},_clear:function(){this._initTransport(),this._initExclusions(),this._initComputation(),this._initDirection(),this._currentIsoResults=null,this._clearIsoResultsGeometry(),this._currentPoint.clear(),this._timeHourContainer&&(this._timeHourContainer.value=0),this._timeMinuteContainer&&(this._timeMinuteContainer.value=0),this._distanceContainer&&(this._distanceContainer.value=0)},_clearIsoResultsGeometry:function(){var t=this._map;null!=this._geojsonIso&&(t.removeLayer(this._geojsonIso),this._geojsonIso=null)},_displayWaitingContainer:function(){this._waitingContainer.className="GPisochronCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout((function(){!0===t._waiting?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)}),16e3)},_hideWaitingContainer:function(){this._waiting&&(this._waitingContainer.className="GPisochronCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)},compute:function(t,e,i){this._showContainer.checked||this._pictoContainer.click();var n=this._map;if(n){var o={direction:"departure",method:"time",transport:"Voiture",exclusions:[]};if(r.a.Util.extend(o,i),this._currentPoint.setCoordinate(t),r.a.DomUtil.get("GPlocationOrigin_0-"+this._uid).value=t.lng+" , "+t.lat,this._currentTransport=o.transport,"Voiture"===o.transport?r.a.DomUtil.get("GPisochronTransportCar-"+this._uid).checked=!0:r.a.DomUtil.get("GPisochronTransportPedestrian-"+this._uid).checked=!0,this._currentExclusions=o.exclusions,this._currentComputation=o.method,"time"===o.method){var s=e.split(".");this._currentTimeHour=s[0]||0,r.a.DomUtil.get("GPisochronValueChronInput1-"+this._uid).value=this._currentTimeHour,this._currentTimeMinute=s[1]||0,r.a.DomUtil.get("GPisochronValueChronInput2-"+this._uid).value=this._currentTimeMinute,r.a.DomUtil.get("GPisochronChoiceAltChron-"+this._uid).click()}else this._currentDistance=e,r.a.DomUtil.get("GPisochronValueDistInput-"+this._uid).value=this._currentDistance,r.a.DomUtil.get("GPisochronChoiceAltDist-"+this._uid).click();this._currentDirection=o.direction,r.a.DomUtil.get("GPisochronDirectionSelect-"+this._uid).selectedIndex="departure"===o.direction?0:1,this.onIsoComputationSubmit(),n.flyTo(t)}}}),En=function(t,e){if(t===e)return!0;if("object"===_n(t)&&null!=t&&"object"===_n(e)&&null!=e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var i in t){if(!e.hasOwnProperty(i))return!1;if(!En(t[i],e[i]))return!1}return!0}return!1},wn={modulo:function(t,e){var i=t%e;return i*e<0?i+e:i},decimalToDMS:function(t,e,i){var n=this.modulo(t+180,360)-180,o=Math.abs(3600*n),r=i||0,s=Math.pow(10,r),a=Math.floor(o/3600),l=Math.floor((o-3600*a)/60),c=o-3600*a-60*l;return(c=Math.ceil(c*s)/s)>=60&&(c=0,l+=1),l>=60&&(l=0,a+=1),{d:a,m:l,s:c,direction:e.charAt(n<0?1:0)}},toInteger:function(t,e){var i=parseInt(t,e||10);return!isNaN(i)&&isFinite(i)?i:null},isInteger:function(t){if(isNaN(t))return!1;var e=parseFloat(t);return(0|e)===e},toFloat:function(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}};function bn(t){return(bn="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)}var Cn={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePosition"),t.className="GPwidget",t},_createShowMousePositionElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowMousePosition"),t.type="checkbox",t},_createShowMousePositionPictoElement:function(t){var e=this,i=document.createElement("label");i.id=this._addUID("GPshowMousePositionPicto"),i.className="GPshowAdvancedToolPicto",i.htmlFor=this._addUID("GPshowMousePosition"),i.title="Afficher les coordonnées du curseur",i.addEventListener("click",(function(i){var n="";document.getElementById(e._addUID("GPshowMousePosition")).checked||t||(n="GPmapCenterVisible"),document.getElementById("GPmapCenter").className=n,e.onShowMousePositionClick(i)}));var n=document.createElement("span");return n.id=this._addUID("GPshowMousePositionOpen"),n.className="GPshowAdvancedToolOpen",i.appendChild(n),i},_createMousePositionPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPmousePositionPanel"),t.className="GPpanel",t},_createMapCenter:function(){var t=document.createElement("div");return t.id="GPmapCenter",t.className="",t},_createMousePositionPanelHeaderElement:function(){var t=document.createElement("div");t.className="GPpanelHeader";var e=document.createElement("div");e.className="GPpanelTitle",e.innerHTML="Coordonnées",t.appendChild(e);var i=document.createElement("div");i.id="GPmousePositionPanelClose",i.className="GPpanelClose",i.title="Fermer le panneau";var n=this;return i.addEventListener?i.addEventListener("click",(function(){document.getElementById(n._addUID("GPshowMousePositionPicto")).click()}),!1):i.attachEvent&&i.attachEvent("onclick",(function(){document.getElementById(n._addUID("GPshowMousePositionPicto")).click()})),t.appendChild(i),t},_createMousePositionPanelBasicElement:function(t,e,i,n){t=void 0===t||t,e=void 0===e||e,i=void 0!==i&&i;var o=document.createElement("div");return o.id=this._addUID("GPmousePositionBasicPanel"),o.appendChild(this._createMousePositionPanelBasicCoordinateElement(e,i,n)),o.appendChild(this._createMousePositionPanelEditToolsElement(i)),o.appendChild(this._createMousePositionPanelBasicAltitudeElement(t)),o},_createCoordinateElement:function(t,e){var i=this;if(-1===["Lon","Lat"].indexOf(t))return[];var n=[],o=document.createElement("input");o.id=this._addUID("GPmousePosition"+t),o.title=!0===e?"Cliquer pour saisir des coordonnées":"",o.readOnly=!0,e&&(o.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),o.addEventListener("change",(function(e){this.classList.remove("error"),i.validateExtentCoordinate(t,this.value,e)?this.classList.remove("error"):this.classList.add("error")}))),n.push(o);var r=document.createElement("span");return r.className="GPmousePositionUnits",n.push(r),n},_createDMSCoordinateElement:function(t,e){if(-1===["Lon","Lat"].indexOf(t))return[];var i=this,n=[],o=document.createElement("input");o.id=this._addUID("GPmousePosition"+t+"Degrees"),o.className="GPSexagesimal",o.setAttribute("name","degrees"),o.title=!0===e?"Cliquer pour saisir des coordonnées":"",o.readOnly=!0,o.dataset.min=0,o.dataset.max="Lon"===t?180:90,e&&(o.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),o.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSDegrees(t,this)?this.classList.remove("error"):this.classList.add("error")}))),n.push(o);var r=document.createElement("span");r.className="GPmousePositionSexagesimalLabel",r.innerHTML="°",n.push(r);var s=document.createElement("input");s.id=this._addUID("GPmousePosition"+t+"Minutes"),s.className="GPSexagesimal",s.setAttribute("name","minutes"),s.title=!0===e?"Cliquer pour saisir des coordonnées":"",s.readOnly=!0,s.dataset.min=0,s.dataset.max=59,e&&(s.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),s.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this)?this.classList.remove("error"):this.classList.add("error")}))),n.push(s);var a=document.createElement("span");a.className="GPmousePositionSexagesimalLabel",a.innerHTML="'",n.push(a);var l=document.createElement("input");l.id=this._addUID("GPmousePosition"+t+"Seconds"),l.className="GPSexagesimalsec",l.setAttribute("name","seconds"),l.title=!0===e?"Cliquer pour saisir des coordonnées":"",l.readOnly=!0,l.dataset.min=0,l.dataset.max=59,e&&(l.addEventListener("click",(function(){i.onMousePositionEditModeClick(!0)})),l.addEventListener("change",(function(){this.classList.remove("error"),i._checkDMSElement(this,!0)?this.classList.remove("error"):this.classList.add("error")}))),n.push(l);var c=document.createElement("span");c.className="GPmousePositionSexagesimalLabel",c.innerHTML="''",n.push(c);var u=document.createElement("select");u.id=this._addUID("GPmousePosition"+t+"Direction"),u.className="GPmousePositionDirection",u.setAttribute("name","direction"),u.disabled=!0;var h=document.createElement("option");h.value="Lon"===t?"E":"N",h.innerHTML="Lon"===t?"E":"N",u.appendChild(h);var d=document.createElement("option");return d.value="Lon"===t?"O":"S",d.innerHTML="Lon"===t?"O":"S",u.appendChild(d),n.push(u),n},_createMousePositionPanelBasicCoordinateElement:function(t,e,i){var n=document.createElement("div");n.id=this._addUID("GPmousePositionCoordinate"),n.style.display=t?"block":"none";var o=document.createElement("div"),r=document.createElement("span");r.className="GPmousePositionLabel",r.id=this._addUID("GPmousePositionLatLabel"),r.innerHTML="Latitude : ",o.appendChild(r);var s,a=document.createElement("span");a.id=this._addUID("GPmousePositionLatCoordinate"),s="DMS"===i?this._createDMSCoordinateElement("Lat",e):this._createCoordinateElement("Lat",e);for(var l=0;l<s.length;l++)a.appendChild(s[l]);o.appendChild(a),n.appendChild(o);var c=document.createElement("div"),u=document.createElement("span");u.className="GPmousePositionLabel",u.id=this._addUID("GPmousePositionLonLabel"),u.innerHTML="Longitude : ",c.appendChild(u);var h,d=document.createElement("span");d.id=this._addUID("GPmousePositionLonCoordinate"),h="DMS"===i?this._createDMSCoordinateElement("Lon",e):this._createCoordinateElement("Lon",e);for(var p=0;p<h.length;p++)d.appendChild(h[p]);return c.appendChild(d),n.appendChild(c),n},_createMousePositionPanelBasicAltitudeElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPmousePositionAltitude"),e.style.display=t?"block":"none";var i=document.createElement("span");i.className="GPmousePositionLabel",i.innerHTML="Altitude : ",e.appendChild(i);var n=document.createElement("span");n.className="GPmousePositionCoords",n.id=this._addUID("GPmousePositionAlt"),n.innerHTML="...",e.appendChild(n);var o=document.createElement("span");return o.className="GPmousePositionAltitudeUnits",o.innerHTML="m",e.appendChild(o),e},_createMousePositionPanelEditToolsElement:function(t){var e=this,i=document.createElement("div");i.className="GPmousePositionPanelEditTools",i.id=this._addUID("GPmousePositionPanelEditTools"),t||(i.style.display="none");var n=document.createElement("span");n.className="GPmousePositionEditTool",n.id=this._addUID("GPmousePositionLocate"),n.title=!0===t?"Cliquer pour saisir des coordonnées":"",t&&n.addEventListener("click",(function(){e.onMousePositionEditModeLocateClick()})),i.appendChild(n);var o=document.createElement("span");return o.className="GPmousePositionEditTool",o.id=this._addUID("GPmousePositionCloseEdit"),o.title="Quitter la saisie des coordonnées",o.style.display="none",t&&o.addEventListener("click",(function(){e.onMousePositionEditModeClick(!1)})),i.appendChild(o),i},_createShowMousePositionSettingsElement:function(t){var e=[],i=this,n=document.createElement("input");n.type="checkbox",n.id=this._addUID("GPshowMousePositionSettings");var o=document.createElement("label");return o.id=this._addUID("GPshowMousePositionSettingsPicto"),o.htmlFor=this._addUID("GPshowMousePositionSettings"),o.title="Réglages",o.className="GPshowMoreOptionsImage GPshowMoreOptions GPshowMousePositionSettingsPicto",o.style.display=t?"block":"none",o.addEventListener?o.addEventListener("click",(function(t){"function"==typeof i.onShowMousePositionSettingsClick&&i.onShowMousePositionSettingsClick(t)}),!1):o.attachEvent&&o.attachEvent("onclick",(function(t){"function"==typeof i.onShowMousePositionSettingsClick&&i.onShowMousePositionSettingsClick(t)})),e.push(n),e.push(o),e},_createMousePositionSettingsElement:function(t){var e=document.createElement("div");e.id=this._addUID("GPmousePositionSettings"),e.style.display=void 0===t||t?"block":"none";var i=document.createElement("span");return i.className="GPmousePositionSettingsLabel",i.innerHTML="Système de référence",e.appendChild(i),e},_createMousePositionSettingsSystemsElement:function(t){var e=this,i=document.createElement("select");i.id=this._addUID("GPmousePositionProjectionSystem"),i.className="GPinputSelect GPmousePositionSettingsSelect",i.addEventListener("change",(function(t){e.onMousePositionProjectionSystemChange(t)})),i.addEventListener("mouseover",(function(t){"OPTION"!==t.target.nodeName&&e.onMousePositionProjectionSystemMouseOver(t)}));for(var n=0;n<t.length;n++){var o=t[n],r=document.createElement("option");r.value=o.code,r.text=o.label||n,i.appendChild(r)}return i},_createMousePositionSettingsUnitsElement:function(t){var e=this,i=document.createElement("select");i.id=this._addUID("GPmousePositionProjectionUnits"),i.className="GPinputSelect GPmousePositionSettingsSelect",i.addEventListener("change",(function(t){e.onMousePositionProjectionUnitsChange(t)}));for(var n=0;n<t.length;n++){var o=t[n],r=document.createElement("option");r.value=o.code?o.code:n,r.text=o.label||n,i.appendChild(r)}return i},_resetLabelElements:function(t){document.getElementById(this._addUID("GPmousePositionLatLabel")).innerHTML="Geographical"===t?"Latitude :":"X :",document.getElementById(this._addUID("GPmousePositionLonLabel")).innerHTML="Geographical"===t?"Longitude :":"Y :"},_resetUnitElements:function(t){var e="";"M"!==t&&"KM"!==t||(e=t.toLowerCase());for(var i=document.getElementsByClassName("GPmousePositionUnits"),n=0;n<i.length;n++)i[n].innerHTML=e},_resetCoordinateElements:function(t,e,i){for(var n,o=document.getElementById(this._addUID("GPmousePositionLatCoordinate"));o.firstChild;)o.removeChild(o.firstChild);n="DMS"===i?this._createDMSCoordinateElement("Lat",t):this._createCoordinateElement("Lat",t);for(var r=0;r<n.length;r++)o.appendChild(n[r]);for(var s,a=document.getElementById(this._addUID("GPmousePositionLonCoordinate"));a.firstChild;)a.removeChild(a.firstChild);s="DMS"===i?this._createDMSCoordinateElement("Lon",t):this._createCoordinateElement("Lon",t);for(var l=0;l<s.length;l++)a.appendChild(s[l])},_setEditMode:function(t){document.getElementById(this._addUID("GPmousePositionLocate")).title=t?"Aller à la position ...":"Cliquer pour saisir des coordonnées",document.getElementById(this._addUID("GPmousePositionCloseEdit")).style.display=t?"inline-block":"none";for(var e="div[id^="+this._addUID("GPmousePositionCoordinate")+"]",i=document.querySelectorAll(e+" input"),n=0;n<i.length;n++)i[n].readOnly=!t,t&&(i[n].value="",i[n].classList.remove("error"));for(var o=document.querySelectorAll(e+" select"),r=0;r<o.length;r++)o[r].disabled=!t},_checkDMSElement:function(t,e){var i=void 0!==e,n=t.value;if(i&&(n=n.replace(",",".")),isNaN(n))return!1;var o=parseFloat(n);if(!i&&(0|o)!==o)return!1;var r=Number(t.dataset.min),s=Number(t.dataset.max);return o>=r&&o<=s},_checkDMSDegrees:function(t,e){if(isNaN(e.value))return!1;var i=parseFloat(e.value);if((0|i)!==i)return!1;var n=Number(e.dataset.min),o=Number(e.dataset.max);if(i<n||i>o)return!1;var r=document.getElementById(this._addUID("GPmousePosition"+t+"Minutes")),s=document.getElementById(this._addUID("GPmousePosition"+t+"Seconds"));return i>=o?(r.dataset.max=0,s.dataset.max=0):(r.dataset.max=59,s.dataset.max=59.9999),!0},GPdisplayCoords:function(t){if(t){var e=document.getElementById(this._addUID("GPmousePositionLonLabel")),i=document.getElementById(this._addUID("GPmousePositionLatLabel"));if(t.x||t.y?(i.innerHTML="X : ",e.innerHTML="Y : "):t.e||t.n?(i.innerHTML="E : ",e.innerHTML="N : "):(i.innerHTML="Latitude : ",e.innerHTML="Longitude : "),"object"===bn(t.lat)&&"object"===bn(t.lng)){var n={lng:"Lon",lat:"Lat"},o=["Degrees","Minutes","Seconds"];for(var r in n)for(var s=0;s<o.length;++s){var a="GPmousePosition"+n[r]+o[s],l=document.getElementById(this._addUID(a)),c=o[s].charAt(0).toLowerCase();l.value=t[r][c]}document.getElementById(this._addUID("GPmousePositionLonDirection")).value=t.lng.direction,document.getElementById(this._addUID("GPmousePositionLatDirection")).value=t.lat.direction}else{var u=document.getElementById(this._addUID("GPmousePositionLat")),h=document.getElementById(this._addUID("GPmousePositionLon"));u.value=t.x||t.lat||t.e||"0",h.value=t.y||t.lng||t.lon||t.n||"0";for(var d=void 0===t.unit?"":t.unit,p=document.getElementsByClassName("GPmousePositionUnits"),m=0;m<p.length;++m)p[m].innerHTML=d}}},GPdisplayElevation:function(t,e,i,n){var o,r=this;e||(e=500),clearTimeout(o),document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML="...",null==i&&(i=-99999),null==n&&(n=99980);var s=i+n,a=i-n;t&&document.getElementById(this._addUID("GPmousePositionAltitude"))&&(o=setTimeout((function(){r.onRequestAltitude(t,(function(t){a<t&&t<s?r.GPresetElevation():document.getElementById(r._addUID("GPmousePositionAlt")).innerHTML=t}))}),e))},GPresetElevation:function(){document.getElementById(this._addUID("GPmousePositionAltitude"))&&(document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML="---")}},Mn=i(8),Pn=i.n(Mn),Ln=(i(48),{isLoaded:!1,get:function(t){if(""!==t&&null!=t){var e=t.split(":");if(2===e.length){var i=e[0],n=e[1];if(this.hasOwnProperty(i)&&this[i].hasOwnProperty(n))return this[i][n]}}},exist:function(t){if(""===t||null==t)return!1;var e=t.split(":");if(2!==e.length)return!1;var i=e[0],n=e[1];return!!this.hasOwnProperty(i)&&!!this[i].hasOwnProperty(n)},load:function(t){if(!this.isLoaded){for(var e=["IGNF","EPSG","CRS"],i=0;i<e.length;i++){var n=e[i],o=this[n];for(var r in o)if(o.hasOwnProperty(r)){var s=n+":"+r;t.defs(s,this.get(s))}}this.isLoaded=!0}},loadByDefault:function(t){var e={EPSG:{2154:Ln.EPSG[2154],27571:Ln.EPSG[27571],27572:Ln.EPSG[27572],27573:Ln.EPSG[27573],27574:Ln.EPSG[27574]},CRS:{84:Ln.CRS[84]},IGNF:{LAMB93:Ln.IGNF.LAMB93,LAMBE:Ln.IGNF.LAMBE,LAMB1:Ln.IGNF.LAMB1,LAMB2:Ln.IGNF.LAMB2,LAMB3:Ln.IGNF.LAMB3,LAMB4:Ln.IGNF.LAMB4,RGF93G:Ln.IGNF.RGF93G,WGS84G:Ln.IGNF.WGS84G}};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];for(var o in n)if(n.hasOwnProperty(o)){var r=i+":"+o;t.defs(r,n[o])}}},loadByName:function(t,e){if(!this.exist(e))return!1;try{t.defs(e,this.get(e))}catch(t){return!1}return!0},EPSG:{4978:"+proj=geocent +datum=WGS84 +units=m +no_defs ",3857:"+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",3785:"+title=WGS 84 / Pseudo-Mercator (deprecated) +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",4149:"+title=CH1903 +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ",4150:"+title=CH1903plus +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ",4151:"+title=CHTRF95 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4171:"+title=RGF93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4230:"+title=ED50 +proj=longlat +ellps=intl +no_defs ",4235:"+title=Guyane Francaise +proj=longlat +ellps=intl +no_defs ",4258:"+title=ETRS89 +proj=longlat +ellps=GRS80 +no_defs ",4275:"+title=NTF +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs ",4322:"+title=WGS 72 +proj=longlat +ellps=WGS72 +no_defs ",4326:"+title=WGS 84 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ",4467:"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",4470:"+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4471:"+proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",4474:"+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ",4558:"+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4559:"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",4621:"+title=Fort Marigot +proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs ",4622:"+title=Guadeloupe 1948 +proj=longlat +ellps=intl +no_defs ",4623:"+title=CSG67 +proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs ",4624:"+title=RGFG95 +proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs ",4625:"+title=Martinique 1938 +proj=longlat +ellps=intl +no_defs ",4626:"+title=Reunion 1947 +proj=longlat +ellps=intl +no_defs ",4627:"+title=RGR92 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4628:"+title=Tahiti 52 +proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs ",4629:"+title=Tahaa 54 +proj=longlat +ellps=intl +no_defs ",4630:"+title=IGN72 Nuku Hiva +proj=longlat +ellps=intl +no_defs ",4632:"+title=Combani 1950 +proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs ",4633:"+title=IGN56 Lifou +proj=longlat +ellps=intl +no_defs ",4634:"+title=IGN72 Grand Terre +proj=longlat +ellps=intl +no_defs ",4637:"+title=Perroud 1950 +proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +no_defs ",4638:"+title=Saint Pierre et Miquelon 1950 +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs ",4640:"+title=RRAF 1991 +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs ",4641:"+title=IGN53 Mare +proj=longlat +ellps=intl +no_defs ",4645:"+title=RGNC 1991 +proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs ",4687:"+proj=longlat +ellps=GRS80 +no_defs ",4662:"+title=IGN72 Grande Terre +proj=longlat +ellps=intl +no_defs ",4689:"+title=IGN63 Hiva Oa +proj=longlat +ellps=intl +no_defs ",4690:"+title=Tahiti 79 +proj=longlat +ellps=intl +no_defs ",4691:"+title=Moorea 87 +proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs ",4692:"+title=Maupiti 83 +proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs ",4698:"+title=IGN 1962 Kerguelen +proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs ",4749:"+title=RGNC91-93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4750:"+title=ST87 Ouvea +proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs ",4807:"+title=NTF (Paris) +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs ",2056:"+title=CH1903+ / LV95 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ",2154:"+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2213:"+title=ETRS89 / TM 30 NE +proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs ",2969:"+title=Fort Marigot / UTM zone 20N +proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs ",2970:"+title=Guadeloupe 1948 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ",2971:"+title=CSG67 / UTM zone 22N +proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ",2972:"+title=RGFG95 / UTM zone 22N +proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ",2973:"+title=Martinique 1938 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ",2975:"+title=RGR92 / UTM zone 40S +proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2976:"+title=Tahiti 52 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs ",2977:"+title=Tahaa 54 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +units=m +no_defs ",2978:"+title=IGN72 Nuku Hiva / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ",2980:"+title=Combani 1950 / UTM zone 38S +proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ",2981:"+title=IGN56 Lifou / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",2982:"+title=IGN72 Grand Terre / UTM zone 58S (deprecated) +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",2984:"+title=RGNC 1991 / Lambert New Caledonia (deprecated) +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2986:"+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67.000000000 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs",2987:"+title=Saint Pierre et Miquelon 1950 / UTM zone 21N +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs ",2989:"+title=RRAF 1991 / UTM zone 20N +proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2990:"+title=Reunion 1947 / TM Reunion (deprecated) +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs ",2995:"+title=IGN53 Mare / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",3038:"+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3039:"+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3040:"+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3041:"+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3045:"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3046:"+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3047:"+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3048:"+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3049:"+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3050:"+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3051:"+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3034:"+title=ETRS89 / ETRS-LCC +proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs ",3035:"+title=ETRS89 / ETRS-LAEA +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs ",3042:"+title=ETRS89 / ETRS-TM30 +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ",3043:"+title=ETRS89 / ETRS-TM31 +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ",3044:"+title=ETRS89 / ETRS-TM32 +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ",25828:"+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25829:"+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25833:"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25834:"+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25835:"+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25836:"+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25837:"+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25838:"+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3060:"+title=IGN72 Grande Terre / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",3163:"+title=RGNC91-93 / Lambert New Caledonia +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3164:"+title=ST87 Ouvea / UTM zone 58S +proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs ",3165:"+title=NEA74 Noumea / Noumea Lambert +proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs ",3166:"+title=NEA74 Noumea / Noumea Lambert 2 +proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs ",3169:"+title=RGNC91-93 / UTM zone 57S +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3170:"+title=RGNC91-93 / UTM zone 58S +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3171:"+title=RGNC91-93 / UTM zone 59S +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3172:"+title=IGN53 Mare / UTM zone 59S +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs ",3296:"+title=RGPF / UTM zone 5S +proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs ",3297:"+title=RGPF / UTM zone 6S +proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs ",3298:"+title=RGPF / UTM zone 7S +proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs ",3299:"+title=RGPF / UTM zone 8S +proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs ",3302:"+title=IGN63 Hiva Oa / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ",3303:"+title=Fatu Iva 72 / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs ",3304:"+title=Tahiti 79 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +units=m +no_defs ",3305:"+title=Moorea 87 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs ",3306:"+title=Maupiti 83 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs ",3312:"+title=CSG67 / UTM zone 21N +proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ",3313:"+title=RGFG95 / UTM zone 21N +proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ",3336:"+title=IGN 1962 Kerguelen / UTM zone 42S +proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs ",3395:"+title=WGS 84 / World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",3727:"+title=Reunion 1947 / TM Reunion +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs ",21781:"+title=CH1903 / LV03 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ",25830:"+title=ETRS89 / UTM zone 30N +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ",25831:"+title=ETRS89 / UTM zone 31N +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ",25832:"+title=ETRS89 / UTM zone 32N +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ",27561:"+title=NTF (Paris) / Lambert Nord France +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27562:"+title=NTF (Paris) / Lambert Centre France +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27563:"+title=NTF (Paris) / Lambert Sud France +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27564:"+title=NTF (Paris) / Lambert Corse +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27571:"+title=NTF (Paris) / Lambert zone I +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27572:"+title=NTF (Paris) / Lambert zone II +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27573:"+title=NTF (Paris) / Lambert zone III +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27574:"+title=NTF (Paris) / Lambert zone IV +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27581:"+title=NTF (Paris) / France I (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27582:"+title=NTF (Paris) / France II (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27583:"+title=NTF (Paris) / France III (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27584:"+title=NTF (Paris) / France IV (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27591:"+title=NTF (Paris) / Nord France (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27592:"+title=NTF (Paris) / Centre France (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27593:"+title=NTF (Paris) / Sud France (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27594:"+title=NTF (Paris) / Corse (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",32601:"+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32602:"+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32603:"+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32604:"+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32605:"+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32606:"+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32607:"+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32608:"+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32609:"+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32610:"+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32611:"+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32612:"+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32613:"+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32614:"+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32615:"+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32616:"+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32617:"+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32618:"+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32619:"+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32620:"+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32621:"+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32622:"+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32623:"+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32624:"+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32625:"+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32626:"+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32627:"+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32628:"+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32629:"+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32630:"+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32631:"+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32632:"+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32633:"+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32634:"+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32635:"+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32636:"+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32637:"+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32638:"+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32639:"+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32640:"+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32641:"+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32642:"+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32643:"+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32644:"+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32645:"+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32646:"+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32647:"+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32648:"+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32649:"+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32650:"+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32651:"+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32652:"+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32653:"+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32654:"+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32655:"+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32656:"+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32657:"+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32658:"+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32659:"+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32660:"+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32661:"+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32662:"+title=WGS 84 / Plate Carree +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32701:"+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32702:"+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32703:"+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32704:"+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32705:"+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32706:"+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32707:"+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32708:"+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32709:"+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32710:"+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32711:"+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32712:"+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32713:"+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32714:"+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32715:"+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32716:"+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32717:"+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32718:"+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32719:"+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32720:"+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32721:"+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32722:"+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32723:"+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32724:"+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32725:"+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32726:"+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32727:"+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32728:"+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32729:"+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32730:"+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32731:"+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32732:"+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32733:"+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32734:"+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32735:"+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32736:"+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32737:"+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32738:"+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32739:"+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32740:"+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32741:"+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32742:"+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32743:"+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32744:"+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32745:"+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32746:"+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32747:"+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32748:"+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32749:"+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32750:"+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32751:"+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32752:"+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32753:"+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32754:"+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32755:"+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32756:"+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32757:"+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32758:"+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32759:"+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32760:"+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32761:"+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",310024802:"+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310915814:"+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310486805:"+title=Geoportail - Guyane +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310700806:"+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310702807:"+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310706808:"+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310547809:"+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642810:"+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310032811:"+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642812:"+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642801:"+title=Geoportail - Crozet +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642813:"+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642901:"+title=Geoportail - Monde +proj=mill +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",5489:"+title=RGAF09 geographiques (dms) +proj=longlat +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +units=m +no_defs",5490:"+title=RGAF09 UTM Nord Fuseau 20 +proj=tmerc +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs"},CRS:{84:"+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "},IGNF:{AMST63:"+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CROZ63:"+title=Crozet 1963 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CSG67:"+title=Guyane CSG67 +proj=geocent +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",ED50:"+title=ED50 +proj=geocent +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",ETRS89:"+title=Systeme de reference terrestre Europeen (1989) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",GUAD48:"+title=Guadeloupe Ste Anne +proj=geocent +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",GUADFM49:"+title=Guadeloupe Fort Marigot +proj=geocent +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN63:"+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=geocent +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN72:"+title=IGN 1972 Grande-Terre / Ile des Pins +proj=geocent +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",KERG62CAR:"+title=Kerguelen - K0 +proj=geocent +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MART38:"+title=Martinique Fort-Desaix +proj=geocent +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MAYO50:"+title=Mayotte Combani +proj=geocent +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MOOREA87:"+title=Moorea 1987 +proj=geocent +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",NTF:"+title=Nouvelle Triangulation Francaise +proj=geocent +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs",NUKU72:"+title=IGN 1972 Nuku Hiva +proj=geocent +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",REUN47:"+title=Reunion 1947 +proj=geocent +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",RGF93:"+title=Reseau geodesique francais 1993 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGFG95:"+title=Reseau geodesique francais de Guyane 1995 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGM04:"+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGNC:"+title=Reseau Geodesique de Nouvelle-Caledonie +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGPF:"+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGR92:"+title=Reseau geodesique Reunion 1992 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGSPM06:"+title=Reseau Geodesique Saint-Pierre-et-Miquelon (2006) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGTAAF07:"+title=Reseau Geodesique des TAAF (2007) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RRAF91:"+title=RRAF 1991 (Reseau de Reference des Antilles Francaises) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",STPL69:"+title=Saint-Paul 1969 +proj=geocent +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",STPM50:"+title=St Pierre et Miquelon 1950 +proj=geocent +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs",TAHAA:"+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=geocent +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TAHI79:"+title=IGN79 (Tahiti) Iles de la Societe +proj=geocent +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TERA50:"+title=Pointe Geologie - Perroud 1950 +proj=geocent +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WALL78:"+title=Wallis-Uvea 1978 (MOP78) +proj=geocent +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WGS72:"+title=World Geodetic System 1972 +proj=geocent +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs",WGS84:"+title=World Geodetic System 1984 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",AMST63GEO:"+title=Amsterdam 1963 +proj=longlat +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CROZ63GEO:"+title=Crozet 1963 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CSG67GEO:"+title=Guyane CSG67 +proj=longlat +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",ED50G:"+title=ED50 +proj=longlat +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",GUAD48GEO:"+title=Guadeloupe Ste Anne +proj=longlat +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",GUADFM49GEO:"+title=Guadeloupe Fort Marigot +proj=longlat +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN63GEO:"+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=longlat +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN72GEO:"+title=IGN 1972 Grande-Terre / Ile des Pins +proj=longlat +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",KERG62GEO:"+title=Kerguelen - K0 +proj=longlat +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MART38GEO:"+title=Martinique Fort-Desaix +proj=longlat +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MAYO50GEO:"+title=Mayotte Combani +proj=longlat +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MOOREA87GEO:"+title=Moorea 1987 +proj=longlat +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",NTFG:"+title=Nouvelle Triangulation Francaise Greenwich degres sexagesimaux +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs",NTFP:"+title=Nouvelle Triangulation Francaise Paris grades +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +units=m +no_defs",NUKU72GEO:"+title=IGN 1972 Nuku Hiva +proj=longlat +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",REUN47GEO:"+title=Reunion 1947 +proj=longlat +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",RGF93G:"+title=Reseau geodesique francais 1993 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGFG95GEO:"+title=Reseau geodesique francais de Guyane 1995 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGM04GEO:"+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGNCGEO:"+title=Reseau Geodesique de Nouvelle-Caledonie +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGPFGEO:"+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGR92GEO:"+title=Reseau geodesique de la Reunion 1992 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGSPM06GEO:"+title=Saint-Pierre-et-Miquelon (2006) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGTAAF07G:"+title=Reseau Geodesique des TAAF (2007) (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",STPL69GEO:"+title=Saint-Paul 1969 +proj=longlat +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",STPM50GEO:"+title=St Pierre et Miquelon 1950 +proj=longlat +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs",TAHAAGEO:"+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=longlat +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TAHI79GEO:"+title=IGN79 (Tahiti) Iles de la Societe +proj=longlat +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TERA50G:"+title=Pointe Geologie - Perroud 1950 +proj=longlat +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WALL78GEO:"+title=Wallis - Uvea 1978 (MOP78) +proj=longlat +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WGS72G:"+title=WGS72 +proj=longlat +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs",WGS84G:"+title=World Geodetic System 1984 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",WGS84RRAFGEO:"+title=Reseau de reference des Antilles francaises (1988-1991) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",XGEO:"+title=Systeme CIO-BIH +proj=longlat +towgs84=0.0000,0.0000,0.5000,0.0000,0.0000,0.0140,-0.100000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",AMST63UTM43S:"+title=Amsterdam 1963 UTM fuseau 43 Sud +proj=tmerc +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",CROZ63UTM39S:"+title=Crozet 1963 +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",CSG67UTM21:"+title=Guyane CSG67 UTM fuseau 21 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",CSG67UTM22:"+title=Guyane CSG67 UTM fuseau 22 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",GEOPORTALANF:"+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALASP:"+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALCRZ:"+title=Geoportail - Crozet +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALFXX:"+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALGUF:"+title=Geoportail - Guyane +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALKER:"+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALMYT:"+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALNCL:"+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALPYF:"+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALREU:"+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALSPM:"+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALWLF:"+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GUAD48UTM20:"+title=Guadeloupe Ste Anne +proj=tmerc +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",GUADFM49U20:"+title=Guadeloupe Fort Marigot +proj=tmerc +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",IGN63UTM7S:"+title=IGN 1963 - Hiva Oa, Tahuata, Mohotani - UTM fuseau 7 Sud +proj=tmerc +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",IGN72UTM58S:"+title=IGN 1972 - UTM fuseau 58 Sud +proj=tmerc +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",KERG62UTM42S:"+title=Kerguelen 1962 +proj=tmerc +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",LAMB1:"+title=Lambert I +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs",LAMB1C:"+title=Lambert I Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=1200000.000 +units=m +no_defs",LAMB2:"+title=Lambert II +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs",LAMB2C:"+title=Lambert II Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs",LAMB3:"+title=Lambert III +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs",LAMB3C:"+title=Lambert III Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=3200000.000 +units=m +no_defs",LAMB4:"+title=Lambert IV +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=185861.369 +units=m +no_defs",LAMB4C:"+title=Lambert IV Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=4185861.369 +units=m +no_defs",LAMB93:"+title=Lambert 93 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.500000000 +lon_0=3.000000000 +lat_1=44.000000000 +lat_2=49.000000000 +x_0=700000.000 +y_0=6600000.000 +units=m +no_defs",RGF93CC42:"+title=Lambert conique conforme Zone 1 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=42.000000000 +lon_0=3.000000000 +lat_1=41.200000000 +lat_2=42.800000000 +x_0=1700000.000 +y_0=1200000.000 +units=m +no_defs",RGF93CC43:"+title=Lambert conique conforme Zone 2 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=43.000000000 +lon_0=3.000000000 +lat_1=42.200000000 +lat_2=43.800000000 +x_0=1700000.000 +y_0=2200000.000 +units=m +no_defs",RGF93CC44:"+title=Lambert conique conforme Zone 3 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=44.000000000 +lon_0=3.000000000 +lat_1=43.200000000 +lat_2=44.800000000 +x_0=1700000.000 +y_0=3200000.000 +units=m +no_defs",RGF93CC45:"+title=Lambert conique conforme Zone 4 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=45.000000000 +lon_0=3.000000000 +lat_1=44.200000000 +lat_2=45.800000000 +x_0=1700000.000 +y_0=4200000.000 +units=m +no_defs",RGF93CC46:"+title=Lambert conique conforme Zone 5 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.000000000 +lon_0=3.000000000 +lat_1=45.200000000 +lat_2=46.800000000 +x_0=1700000.000 +y_0=5200000.000 +units=m +no_defs",RGF93CC47:"+title=Lambert conique conforme Zone 6 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=47.000000000 +lon_0=3.000000000 +lat_1=46.200000000 +lat_2=47.800000000 +x_0=1700000.000 +y_0=6200000.000 +units=m +no_defs",RGF93CC48:"+title=Lambert conique conforme Zone 7 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=48.000000000 +lon_0=3.000000000 +lat_1=47.200000000 +lat_2=48.800000000 +x_0=1700000.000 +y_0=7200000.000 +units=m +no_defs",RGF93CC49:"+title=Lambert conique conforme Zone 8 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=49.000000000 +lon_0=3.000000000 +lat_1=48.200000000 +lat_2=49.800000000 +x_0=1700000.000 +y_0=8200000.000 +units=m +no_defs",RGF93CC50:"+title=Lambert conique conforme Zone 9 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=50.000000000 +lon_0=3.000000000 +lat_1=49.200000000 +lat_2=50.800000000 +x_0=1700000.000 +y_0=9200000.000 +units=m +no_defs",LAMBE:"+title=Lambert II etendu +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs",MART38UTM20:"+title=Martinique Fort-Desaix +proj=tmerc +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",MAYO50UTM38S:"+title=Mayotte Combani +proj=tmerc +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",MILLER:"+title=Geoportail - Monde +proj=mill +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",MOOREA87U6S:"+title=Moorea 1987 - UTM fuseau 6 Sud +proj=tmerc +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",NUKU72U7S:"+title=IGN 1972 Nuku Hiva - UTM fuseau 7 Sud +proj=tmerc +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGM04UTM38S:"+title=UTM fuseau 38 Sud (Reseau Geodesique de Mayotte 2004) +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGNCUTM57S:"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 57 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=159.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGNCUTM58S:"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 58 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGNCUTM59S:"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 59 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=171.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGPFUTM5S:"+title=RGPF - UTM fuseau 5 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGPFUTM6S:"+title=RGPF - UTM fuseau 6 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGPFUTM7S:"+title=RGPF - UTM fuseau 7 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGR92UTM40S:"+title=RGR92 UTM fuseau 40 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGSPM06U21:"+title=Saint-Pierre-et-Miquelon (2006) UTM Fuseau 21 Nord +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",STPL69UTM43S:"+title=Saint-Paul 1969 UTM fuseau 43 Sud +proj=tmerc +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",STPM50UTM21:"+title=St Pierre et Miquelon 1950 +proj=tmerc +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",TAHAAUTM05S:"+title=Tahaa 1951 +proj=tmerc +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",TAHI51UTM06S:"+title=Tahiti-Terme Nord UTM fuseau 6 Sud +proj=tmerc +towgs84=162.0000,117.0000,154.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",TAHI79UTM6S:"+title=Tahiti 1979 +proj=tmerc +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",TERA50STEREO:"+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs",UTM01SW84:"+title=World Geodetic System 1984 UTM fuseau 01 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",UTM20W84GUAD:"+title=World Geodetic System 1984 UTM fuseau 20 Nord-Guadeloupe +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM20W84MART:"+title=World Geodetic System 1984 UTM fuseau 20 Nord-Martinique +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM22RGFG95:"+title=RGFG95 UTM fuseau 22 Nord-Guyane +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM39SW84:"+title=World Geodetic System 1984 UTM fuseau 39 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",UTM42SW84:"+title=World Geodetic System 1984 UTM fuseau 42 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",UTM43SW84:"+title=World Geodetic System 1984 UTM fuseau 43 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",WALL78UTM1S:"+title=Wallis-Uvea 1978 (MOP78) UTM 1 SUD +proj=tmerc +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",ETRS89GEO:"+title=ETRS89 geographiques (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",ETRS89LAEA:"+title=ETRS89 Lambert Azimutal Equal Area +proj=laea +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=10.000000000 +x_0=4321000.000 +y_0=3210000.000 +units=m +no_defs",ETRS89LCC:"+title=ETRS89 Lambert Conformal Conic +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=9.999999995 +lat_1=35.000000000 +lat_2=65.000000000 +x_0=4000000.000 +y_0=2800000.000 +units=m +no_defs",UTM26ETRS89:"+title=Europe - de 30d a 24d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM27ETRS89:"+title=Europe - de 24d a 18d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM28ETRS89:"+title=Europe - de 18d a 12d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM29ETRS89:"+title=Europe - de 12d a 6d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM30ETRS89:"+title=Europe - de -6d a 0d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM31ETRS89:"+title=Europe - de 0d a 6d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM32ETRS89:"+title=Europe - de 6d a 12d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM33ETRS89:"+title=Europe - de 12d a 18d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM34ETRS89:"+title=Europe - de 18d a 24d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM35ETRS89:"+title=Europe - de 24d a 30d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM36ETRS89:"+title=Europe - de 30d a 36d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=33.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM37ETRS89:"+title=Europe - de 36d a 42d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=39.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM38ETRS89:"+title=Europe - de 42d a 48d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs"}}),Sn=Ln,xn=i(1),In={instance:null,build:function(){if(!this.instance){var t=new r.a.Proj.CRS("EPSG:2154",Sn.get("EPSG:2154"),{resolutions:this._getResolutions(),origin:this._getOrigin()});this.instance=t}return this.instance},_getResolutions:function(){var t=[];xn.a.isConfigLoaded()&&(t=(xn.a.configuration.getTMSConf("LAMB93_5cm")||xn.a.configuration.getTMSConf("2154_5cm")).nativeResolutions);return t.length?t:[104579.22454989408,52277.53235379051,26135.487078595408,13066.891381800004,6533.228604113456,3266.5595244626675,1633.2660045974187,816.6295549860224,408.31391467683596,204.15674151090204,102.07831678324082,51.0391448966112,25.519569074269395,12.759783693647506,6.379891635966491,3.18994576530532,1.5949728694977277,.7974864315474559,.398743214900604,.19937160727567999,.099685803696052,.049842901818919996]},_getOrigin:function(){return[0,12e6]}},Tn={instance:null,build:function(){if(!this.instance){var t=new r.a.Proj.CRS("EPSG:27572",Sn.get("EPSG:27572"),{resolutions:this._getResolutions(),origin:this._getOrigin()});this.instance=t}return this.instance},_getResolutions:function(){var t=[];if(xn.a.isConfigLoaded()){var e=xn.a.configuration.getTMSConf("LAMB2E");e&&Object.keys(e).length&&(t=e.nativeResolutions)}return t.length?t:[104579.22454989408,52277.53235379051,26135.487078595408,13066.891381800004,6533.228604113456,3266.5595244626675,1633.2660045974187,816.6295549860224,408.31391467683596,204.15674151090204,102.07831678324082,51.0391448966112,25.519569074269395,12.759783693647506,6.379891635966491,3.18994576530532,1.5949728694977277,.7974864315474559,.398743214900604,.19937160727567999,.099685803696052,.049842901818919996]},_getOrigin:function(){return[0,12e6]}},Gn={instance:null,build:function(){if(!this.instance){var t=new r.a.Proj.CRS("EPSG:4326",Sn.get("EPSG:4326"),{resolutions:this._getResolutions(),origin:[-180,90]});this.instance=t}return this.instance},_getResolutions:function(){var t=[];xn.a.isConfigLoaded()&&(t=xn.a.configuration.getTMSConf("WGS84G").nativeResolutions);return t.length?t:[1.40625,.703125,.3515625,.17578125,.087890625,.0439453125,.02197265625,.010986328125,.0054931640625,.00274658203125,.001373291015625,.0006866455078125,.00034332275390625,.000171661376953126,858306884765628e-19,429153442382813e-19,214576721191407e-19,107288360595703e-19,536441802978517e-20,268220901489259e-20,13411045074463e-19,6.70552253723145e-7,3.3527612686157e-7]},_getOrigin:function(){}};Sn.load(Pn.a);var Rn={EPSG2154:function(){return In.build()},EPSG27572:function(){return Tn.build()},EPSG4326:function(){return Gn.build()}};function Dn(t){return(Dn="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)}var kn=l.getLogger("mouseposition"),An=r.a.Control.extend({includes:Cn,options:{position:"bottomleft",collapsed:!0,units:[],systems:[],displayAltitude:!0,displayCoordinates:!0,editCoordinates:!1,altitude:{triggerDelay:200,responseDelay:500,noDataValue:-99999,noDataValueTolerance:9e4,serviceOptions:{}}},initialize:function(t){r.a.Util.extend(this.options,t),this._uid=c.generate(),this._projectionSystems=[],this._initProjectionSystems(),this._projectionUnits={},this._initProjectionUnits(),this._isDesktop=this._detectSupport(),this.options.altitude.triggerDelay<100&&(this.options.altitude.triggerDelay=100),this._timer=this.options.altitude.triggerDelay,this._currentProjectionSystems=this._projectionSystems[0],this._projectionSystemsContainer=null,this._currentProjectionType=this._projectionSystems[0].type,this._currentProjectionUnits=this._projectionUnits[this._currentProjectionType][0].code,this._projectionUnitsContainer=null,this._showContainer=null,this._pictoContainer=null,this._panelContainer=null,this._panelHeaderContainer=null,this.options.displayAltitude||this.options.displayCoordinates||(this.options.displayCoordinates=!0),this.options.displayCoordinates||(this.options.editCoordinates=!1),this._isEditing=!1,r.a.Util.setOptions(this,this.options)},onAdd:function(t){var e=this._container=this._initLayout();return this.options.collapsed||(this._isDesktop?t.on("mousemove",this.onMouseMove,this):t.on("move",this.onMapMove,this)),r.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),r.a.DomEvent.addListener(e,"mousemove",r.a.DomEvent.stopPropagation).addListener(e,"mousemove",r.a.DomEvent.preventDefault),e},onRemove:function(t){t.off("mousemove",this.onMouseMove)},_initProjectionSystems:function(){for(var t=[{label:"Géographique",crs:r.a.CRS.Simple,type:"Geographical"},{label:"Web Mercator",crs:r.a.CRS.EPSG3395,type:"Metric"},{label:"Lambert 93",crs:Rn.EPSG2154,type:"Metric",geoBBox:{left:-9.86,bottom:41.15,right:10.38,top:51.56}},{label:"Lambert II étendu",crs:Rn.EPSG27572,type:"Metric",geoBBox:{left:-4.87,bottom:42.33,right:8.23,top:51.14}}],e=this.options.systems,i=0;i<e.length;i++){var n=e[i];if(n.label)if(n.crs){n.type||(kn.warn("type srs not defined, use 'Metric' by default !"),n.type="Metric"),this._projectionSystems.push(e[i]);for(var o=!1,s=0;s<t.length;s++){var a=t[s];n.crs===a.crs&&(o=!0,kn.info("crs '{}' already configured by default",a.code))}o||kn.info("crs '{}' not found, it's a new projection",n.code||n.label)}else kn.error("crs not defined !");else kn.error("not defined !")}0===this._projectionSystems.length&&(this._projectionSystems=t);for(var l=0;l<this._projectionSystems.length;++l)this._projectionSystems[l].code=l},_initProjectionUnits:function(){var t={Geographical:[{code:"DEC",label:"degrés décimaux",format:this._displayDEC},{code:"DMS",label:"degrés sexagésimaux",format:this._displayDMS},{code:"RAD",label:"radians",format:this._displayRAD},{code:"GON",label:"grades",format:this._displayGON}],Metric:[{code:"M",label:"mètres",format:this._displayMeter},{code:"KM",label:"kilomètres",format:this._displayKMeter}]},e=this.options.units;for(var i in t)if(t.hasOwnProperty(i)){for(var n=!1,o=0;o<t[i].length;o++)for(var r=t[i][o],s=0;s<e.length;s++){var a=e[s];r.code===a&&(n=!0,this._projectionUnits[i]||(this._projectionUnits[i]=[]),this._projectionUnits[i].push(r))}n||(this._projectionUnits[i]=t[i])}0===Object.keys(this._projectionUnits).length&&(this._projectionUnits=t)},_detectSupport:function(){var t=!0,e=window.navigator.userAgent.toLowerCase();return-1===e.indexOf("iphone")&&-1===e.indexOf("ipod")&&-1===e.indexOf("ipad")&&-1===e.indexOf("android")&&-1===e.indexOf("mobile")&&-1===e.indexOf("blackberry")&&-1===e.indexOf("tablet")&&-1===e.indexOf("phone")&&-1===e.indexOf("touch")||(t=!1),-1===e.indexOf("msie")&&-1===e.indexOf("trident")||(t=!0),t},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowMousePositionElement();t.appendChild(e),this.options.collapsed||(e.checked=!0);var i=this._pictoContainer=this._createShowMousePositionPictoElement(this._isDesktop);t.appendChild(i);var n=this._panelContainer=this._createMousePositionPanelElement(),o=this._panelHeaderContainer=this._createMousePositionPanelHeaderElement();n.appendChild(o);var r=this._createMousePositionPanelBasicElement(this.options.displayAltitude,this.options.displayCoordinates,this.options.editCoordinates);n.appendChild(r);for(var s=this._createShowMousePositionSettingsElement(this.options.displayCoordinates),a=0;a<s.length;a++)n.appendChild(s[a]);var l=this._createMousePositionSettingsElement(),c=this._projectionSystemsContainer=this._createMousePositionSettingsSystemsElement(this._projectionSystems),u=this._projectionUnitsContainer=this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);l.appendChild(c),l.appendChild(u),n.appendChild(l),t.appendChild(n);var h=this._createMapCenter();return this._map.getContainer().appendChild(h),t},_setElevationPanel:function(t){t||(r.a.DomUtil.get(this._addUID("GPmousePositionAltitude")).style.display="none")},_setCoordinatePanel:function(t){t||(r.a.DomUtil.get(this._addUID("GPmousePositionCoordinate")).style.display="none")},_setSettingsPanel:function(t){if(!t){var e=r.a.DomUtil.get("GPshowMousePositionSettingsPicto"),i=r.a.DomUtil.get(this._addUID("GPmousePositionSettings"));e.style.display="none",i.style.display="none"}},_setTypeUnitsPanel:function(t){for(var e=this._projectionUnitsContainer;e.firstChild;)e.removeChild(e.firstChild);for(var i=this._projectionUnits[t],n=0;n<i.length;n++){var o=i[n],r=document.createElement("option");r.value=o.code?o.code:n,r.text=o.label||n,e.appendChild(r)}var s=this._projectionUnits[t][0].code;"DMS"!==this._currentProjectionUnits&&"DMS"!==s||(this._resetCoordinateElements(this.options.editCoordinates,t,s),this._setEditMode(this._isEditing)),this._currentProjectionType=t,this._resetLabelElements(t),this._resetUnitElements(s),this._currentProjectionUnits=this._projectionUnits[t][0].code},_displayDEC:function(t){var e={};return e.lat=hn.roundToDecimal(t.lat,6),e.lng=hn.roundToDecimal(t.lng,6),e.unit="°",e},_displayDMS:function(t){var e={};return e.lat=hn.decimalLatToDMS(t.lat,!0),e.lng=hn.decimalLonToDMS(t.lng,!0),e},_displayRAD:function(t){var e={};return e.lat=hn.decimalToRadian(t.lat),e.lng=hn.decimalToRadian(t.lng),e.unit="rad",e},_displayGON:function(t){var e={};return e.lat=hn.decimalToGrade(t.lat),e.lng=hn.decimalToGrade(t.lng),e.unit="gon",e},_displayMeter:function(t){var e={};return e.x=r.a.Util.formatNum(t.x,2),e.y=r.a.Util.formatNum(t.y,2),e.unit="m",e},_displayKMeter:function(t){var e={};return e.x=r.a.Util.formatNum(t.x/1e3,2),e.y=r.a.Util.formatNum(t.y/1e3,2),e.unit="km",e},_project:function(t,e){if("function"==typeof e&&(e=e()),"object"===Dn(e)){if(e===r.a.CRS.Simple)return t;if(e.projection&&"object"===Dn(e.projection)){var i=e.projection.project(t);return"Geographical"===this._currentProjectionType&&(i.lat=i.y,i.lng=i.x),i&&0!==Object.keys(i).length||kn.error("Failed to project with crs code : "+e.code),i}kn.error("projection is not an object !")}else kn.log("crs is not an object !")},_unproject:function(t){var e=this._currentProjectionSystems.crs;if(e)if("function"==typeof e&&(e=e()),"object"===Dn(e)){if(e===r.a.CRS.Simple)return{lat:t.y,lng:t.x};if("Geographical"===this._currentProjectionType)return{lat:t.y,lng:t.x};if(e.projection&&"object"===Dn(e.projection)){var i=e.projection.unproject(t);return i&&0!==Object.keys(i).length||kn.error("Failed to unproject coordinate"),i}kn.error("projection is not an object !")}else kn.log("crs is not an object !");else kn.log("system crs not found")},_setCoordinate:function(t){for(var e=this._currentProjectionSystems.type,i=null,n=this._projectionUnits[e],o=0;o<n.length;o++)if(n[o].code===this._currentProjectionUnits){i=n[o].format;break}var r,s=this._currentProjectionSystems.crs;s?(r=i(this._project(t,s)))&&0!==Object.keys(r).length&&this.GPdisplayCoords(r):kn.error("crs not found !")},_setElevation:function(t){var e=this.options.altitude.responseDelay,i=this.options.altitude.noDataValue,n=this.options.altitude.noDataValueTolerance;this.GPdisplayElevation(t,e,i,n)},onMoveStopped:function(t){this._setElevation(t)},onMouseMove:function(t){var e=this,i=t.latlng;this._setCoordinate(i),clearTimeout(this._timer),this._timer=setTimeout((function(){e.onMoveStopped(i)}),this.options.altitude.triggerDelay)},onMapMove:function(){var t=this,e=this._map.getCenter();this._setCoordinate(e),clearTimeout(this._timer),this._timer=setTimeout((function(){t.onMoveStopped(e)}),this.options.altitude.triggerDelay)},onRequestAltitude:function(t,e){if(kn.log("onRequestAltitude"),t&&0!==Object.keys(t).length&&this.options.displayAltitude){kn.log(t);var i={};r.a.Util.extend(i,this.options.altitude.serviceOptions),r.a.Util.extend(i,{zonly:!0,positions:[{lon:t.lon||t.lng,lat:t.lat}]}),r.a.Util.extend(i,{scope:this,onSuccess:function(t){kn.log(t),t&&Object.keys(t).length&&e.call(this,t.elevations[0].z)},onFailure:function(t){kn.error(t.message)}}),r.a.Util.extend(i,{apiKey:i.apiKey||this.options.apiKey}),r.a.Util.extend(i,{ssl:this.options.ssl}),kn.log(i),an.Services.getAltitude(i)}},onShowMousePositionClick:function(t){kn.log(t);var e=this._map;this._showContainer.checked?this._isDesktop?e.off("mousemove",this.onMouseMove,this):e.off("move",this.onMapMove,this):this._isDesktop?e.on("mousemove",this.onMouseMove,this):e.on("move",this.onMapMove,this),this._setElevationPanel(this.options.displayAltitude),this._setCoordinatePanel(this.options.displayCoordinates),this.options.displayCoordinates||this._setSettingsPanel(!1)},onMousePositionEditModeClick:function(t){if(this.options.editCoordinates&&this._isEditing!==t){this._isEditing=t,this._setEditMode(this._isEditing);var e=this._map;this._isDesktop?this._isEditing?e.off("mousemove",this.onMouseMove,this):e.on("mousemove",this.onMouseMove,this):this._isEditing?e.off("move",this.onMapMove,this):e.on("move",this.onMapMove,this)}},_convertCoordinate:function(t,e){var i;if("DEC"===e||"DMS"===e)i=t;else if("M"===e)i=t;else if("KM"===e)i=1e3*t;else if("RAD"===e){i=(t*(180/Math.PI).toFixed(20)).toFixed(20)}else if("GON"===e){i=(t*.9.toFixed(20)).toFixed(20)}return i},validateExtentCoordinate:function(t,e,i){if(void 0!==i)return!0;if(-1===["Lon","Lat"].indexOf(t))return!1;var n=this._currentProjectionSystems.geoBBox;if(void 0===n)return!0;if(n){var o=[n.left,n.bottom,n.right,n.top],r=this._currentProjectionUnits,s=this._unproject({x:"Lon"===t?this._convertCoordinate(e,r):0,y:"Lat"===t?this._convertCoordinate(e,r):0});if("Lon"===t&&(s.lng<o[0]||s.lng>o[2]))return kn.warn("coordinates (lon) out of extent !?"),!1;if("Lat"===t&&(s.lat<o[1]||s.lat>o[3]))return kn.warn("coordinates (lat) out of extent !?"),!1}return!0},_getCoordinate:function(t){var e=r.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Degrees")),i=e.value;if(!i)return null;if(i=i.replace(",","."),!wn.isInteger(i))return null;var n=wn.toInteger(i);if(n<Number(e.dataset.min)||n>Number(e.dataset.max))return null;var o=r.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Direction")).value,s=r.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Minutes")),a=s.value;if(a&&(a=a.replace(",","."),wn.isInteger(a))){var l=wn.toInteger(a);l>=Number(s.dataset.min)&&l<=Number(s.dataset.max)&&(n+=l/60)}var c=r.a.DomUtil.get(this._addUID("GPmousePosition"+t+"Seconds")),u=c.value;if(u){u=u.replace(",",".");var h=wn.toFloat(u);h&&h>=Number(c.dataset.min)&&h<=Number(c.dataset.max)&&(n+=h/3600)}return"O"!==o&&"S"!==o||(n=-n),n},_locateDMSCoordinates:function(){var t={lat:this._getCoordinate("Lat"),lng:this._getCoordinate("Lon")};this.validateExtentCoordinate("Lon",t.lng)&&(this.validateExtentCoordinate("Lat",t.lat)&&this._map.panTo(t))},_locateCoordinates:function(){var t=r.a.DomUtil.get(this._addUID("GPmousePositionLon")).value;if(t=t.replace(",","."),t=parseFloat(t),!isNaN(t)){var e=r.a.DomUtil.get(this._addUID("GPmousePositionLat")).value;if(e=e.replace(",","."),e=parseFloat(e),!isNaN(e)){var i=null,n=null,o=null,s=null;if("Geographical"===this._currentProjectionType?(i=t,n=e):(o=e,s=t),this.validateExtentCoordinate("Lon",i||o)&&this.validateExtentCoordinate("Lat",n||s)){var a=this._currentProjectionUnits,l=this._unproject({x:this._convertCoordinate(null!==i?i:o,a),y:this._convertCoordinate(null!==n?n:s,a)});this._map.panTo(l)}}}},onMousePositionEditModeLocateClick:function(){this.options.editCoordinates&&(this._isEditing?"DMS"===this._currentProjectionUnits?this._locateDMSCoordinates():this._locateCoordinates():this.onMousePositionEditModeClick(!0))},onMousePositionProjectionSystemChange:function(t){kn.log("onMousePositionProjectionSystemChange",t);var e=t.target.selectedIndex,i=t.target.options[e].value,n=t.target.options[e].label;kn.log(e,i,n),this._setCurrentSystem(i)},_setCurrentSystem:function(t){for(var e=null,i=0;i<this._projectionSystems.length;++i)if(this._projectionSystems[i].code===Number(t)){e=this._projectionSystems[i].type;break}e?(e!==this._currentProjectionType&&this._setTypeUnitsPanel(e),this._currentProjectionSystems=this._projectionSystems[Number(t)],this._isDesktop||this.onMapMove()):kn.log("system not found in projection systems container")},onMousePositionProjectionSystemMouseOver:function(t){kn.log("onMousePositionProjectionSystemMouseOver",t);var e=this._map;if(e){var i=r.a.DomUtil.get(this._addUID("GPmousePositionProjectionSystem"));i.innerHTML="";for(var n=0;n<this._projectionSystems.length;n++){var o=this._projectionSystems[n],s=null;o.geoBBox&&(e.getBounds()._southWest.lng>o.geoBBox.right||e.getBounds()._southWest.lat>o.geoBBox.top||e.getBounds()._northEast.lng<o.geoBBox.left||e.getBounds()._northEast.lat<o.geoBBox.bottom)?o===this._currentProjectionSystems&&((s=document.createElement("option")).value=o.code,s.text=o.label||n,s.setAttribute("selected","selected"),s.setAttribute("disabled","disabled"),i.appendChild(s)):((s=document.createElement("option")).value=o.code,s.text=o.label||n,o===this._currentProjectionSystems&&s.setAttribute("selected","selected"),i.appendChild(s))}}},onMousePositionProjectionUnitsChange:function(t){kn.log("onMousePositionProjectionUnitsChange",t);var e=t.target.selectedIndex,i=t.target.options[e].value,n=t.target.options[e].label;kn.log(e,i,n);var o=this._currentProjectionUnits,r=this._currentProjectionUnits=i,s=this._currentProjectionType;this._resetLabelElements(s),this._resetUnitElements(r),"DMS"!==o&&"DMS"!==r||(this._resetCoordinateElements(this.options.editCoordinates,s,r),this._setEditMode(this._isEditing)),this._isDesktop||this.onMapMove()},moveTo:function(t,e,i){this._showContainer.checked||this._pictoContainer.click();var n=this._map;n&&(this.onMouseMove({latlng:t}),n.flyTo(t,e||10,i||{}))}}),Nn=(i(13),{_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocoding"),t.className="GPwidget",t},_createShowReverseGeocodingElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowReverseGeocoding"),t.type="checkbox",t},_createShowReverseGeocodingPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowReverseGeocodingPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowReverseGeocoding"),e.title="Ouvrir la recherche inverse",e.addEventListener?e.addEventListener("click",(function(){t.onShowReverseGeocodingClick()})):e.attachEvent&&e.attachEvent("onclick",(function(){t.onShowReverseGeocodingClick()}));var i=document.createElement("span");return i.id=this._addUID("GPshowReverseGeocodingOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createReverseGeocodingWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPreverseGeocodingCalcWaitingContainer"),t.className="GPreverseGeocodingCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GPreverseGeocodingCalcWaiting",e.innerHTML="Recherche en cours...",t.appendChild(e),t},_createReverseGeocodingResultsPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocodingResultsPanel"),t.className="GPpanel GPreverseGeocodingComponentHidden",t},_createReverseGeocodingResultsListElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocodingResultsList"),t},_createReverseGeocodingResultElement:function(t,e){var i=this,n=document.getElementById(this._addUID("GPreverseGeocodingResultsList")),o=document.createElement("div");o.id=this._addUID("ReverseGeocodedLocation_"+e),o.className="GPautoCompleteProposal",o.innerHTML=t,o.title=t,o.addEventListener?(o.addEventListener("mouseover",(function(t){i.onReverseGeocodingResultMouseOver(t)})),o.addEventListener("mouseout",(function(t){i.onReverseGeocodingResultMouseOut(t)})),o.addEventListener("click",(function(t){"function"==typeof i.onReverseGeocodingResultClick&&i.onReverseGeocodingResultClick(t)}))):o.attachEvent&&(o.attachEvent("onmouseover",(function(t){i.onReverseGeocodingResultMouseOver(t)})),o.attachEvent("onmouseout",(function(t){i.onReverseGeocodingResultMouseOut(t)})),o.attachEvent("onclick",(function(t){"function"==typeof i.onReverseGeocodingResultClick&&i.onReverseGeocodingResultClick(t)}))),n.appendChild(o)},_createReverseGeocodingPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPreverseGeocodingPanel"),t.className="GPpanel",t},_createReverseGeocodingPanelHeaderElement:function(){var t=document.createElement("div");return t.className="GPpanelHeader",t},_createReverseGeocodingPanelReturnPictoElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPreverseGeocodingReturnPicto"),e.title="Nouvelle recherche",e.className="GPreverseGeocodingReturnPictoHidden",e.addEventListener?e.addEventListener("click",(function(e){document.getElementById(t._addUID("GPreverseGeocodingResultsPanel")).className="GProuteComponentHidden",document.getElementById(t._addUID("GPreverseGeocodingForm")).className="",document.getElementById(t._addUID("GPreverseGeocodingHeaderTitle")).innerHTML="Recherche inverse",document.getElementById(t._addUID("GPreverseGeocodingReturnPicto")).className="GPreverseGeocodingReturnPictoHidden",t.onGPreverseGeocodingReturnPictoClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){document.getElementById(t._addUID("GPreverseGeocodingResultsPanel")).className="GProuteComponentHidden",document.getElementById(t._addUID("GPreverseGeocodingForm")).className="",document.getElementById(t._addUID("GPreverseGeocodingHeaderTitle")).innerHTML="Recherche inverse",document.getElementById(t._addUID("GPreverseGeocodingReturnPicto")).className="GPreverseGeocodingReturnPictoHidden",t.onGPreverseGeocodingReturnPictoClick(e)})),e},_createReverseGeocodingPanelTitleElement:function(){var t=document.createElement("div");return t.className="GPpanelTitle",t.id=this._addUID("GPreverseGeocodingHeaderTitle"),t.innerHTML="Recherche inverse",t},_createReverseGeocodingPanelCloseElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPreverseGeocodingPanelClose"),e.className="GPpanelClose",e.title="Fermer le panneau",e.addEventListener?e.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowReverseGeocodingPicto")).click()}),!1):e.attachEvent&&e.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowReverseGeocodingPicto")).click()})),e},_createReverseGeocodingPanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GPreverseGeocodingForm"),e.addEventListener?e.addEventListener("submit",(function(e){e.preventDefault(),t.onReverseGeocodingSubmit()})):e.attachEvent&&e.attachEvent("onsubmit",(function(e){e.preventDefault(),t.onReverseGeocodingSubmit()})),e},_createReverseGeocodingFormModeChoiceGeocodingTypeElement:function(t){var e=this,i=document.createElement("div");i.className="GPflexInput";var n=document.createElement("label");n.className="GPreverseGeocodingCodeLabel",n.innerHTML="Recherche par",n.title="Recherche par",i.appendChild(n);var o=document.createElement("select");o.className="GPreverseGeocodingCode",o.addEventListener?o.addEventListener("change",(function(t){e.onReverseGeocodingTypeChange(t)})):o.attachEvent&&o.attachEvent("onchange",(function(t){e.onReverseGeocodingTypeChange(t)})),t&&Array.isArray(t)||(t=["StreetAddress","PositionOfInterest","CadastralParcel"]);for(var r=0;r<t.length;r++)switch(t[r]){case"PositionOfInterest":var s=document.createElement("option");s.value="PositionOfInterest",s.text="Lieux/toponymes",o.appendChild(s);break;case"StreetAddress":var a=document.createElement("option");a.value="StreetAddress",a.text="Adresses",o.appendChild(a);break;case"CadastralParcel":var l=document.createElement("option");l.value="CadastralParcel",l.text="Parcelles cadastrales",o.appendChild(l)}return i.appendChild(o),i},_createReverseGeocodingFormModeChoiceGeocodingDelimitationElement:function(t){var e=this,i=document.createElement("div");i.className="GPflexInput";var n=document.createElement("label");n.className="GPreverseGeocodingCodeLabel",n.innerHTML="Délimitation",n.title="Délimitation",i.appendChild(n);var o=document.createElement("select");o.className="GPreverseGeocodingCode",o.addEventListener?o.addEventListener("change",(function(t){e.onReverseGeocodingDelimitationChange(t)})):o.attachEvent&&o.attachEvent("onchange",(function(t){e.onReverseGeocodingDelimitationChange(t)})),t&&Array.isArray(t)||(t=["Point","Circle","Extent"]);for(var r=0;r<t.length;r++)switch(t[r].toLowerCase()){case"point":var s=document.createElement("option");s.value="point",s.text="Pointer un lieu",o.appendChild(s);break;case"circle":var a=document.createElement("option");a.value="circle",a.text="Dessiner un cercle",o.appendChild(a);break;case"extent":var l=document.createElement("option");l.value="extent",l.text="Dessiner une emprise",o.appendChild(l)}return i.appendChild(o),i},_createReverseGeocodingSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPreverseGeocodingSubmit"),t.className="GPinputSubmit",t.type="submit",t.value="Rechercher",t}}),On=l.getLogger("reversegeocoding"),Un=r.a.Control.extend({includes:Nn,options:{position:"bottomleft",collapsed:!0,resources:["StreetAddress","PositionOfInterest","CadastralParcel"],delimitations:["Point","Circle","Extent"],reverseGeocodeOptions:{}},initialize:function(t){r.a.Util.extend(this.options,t),this._checkInputOptions(),this._uid=c.generate(),this._currentGeocodingType=null,this._initGeocodingType(),this._currentGeocodingDelimitation=null,this._initGeocodingDelimitation(),this._showReverseGeocodingContainer=null,this._panelHeaderContainer=null,this._panelTitleContainer=null,this._returnPictoContainer=null,this._formContainer=null,this._resultsContainer=null,this._resultsListContainer=null,this._waitingContainer=null,this._inputFeaturesLayer=null,this._inputResultsLayer=null,this._lastIdLayer=0,this._currentIdLayer=0,this._currentFeature=null,this._requestGeom=null,this._waiting=!1,this._timer=null,this._reverseGeocodingLocations=[]},onAdd:function(t){var e=this._container=this._initLayout();return r.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),t&&(this.options.collapsed||this._activateMapInteraction(t)),e},onRemove:function(t){this._clearLocations(),this._clearLocationsFeature(t),this._clearInputRequest(),this._removeMapInteraction(t)},_checkInputOptions:function(){var t;if(this.options.resources){var e=this.options.resources;if(Array.isArray(e)){var i=["StreetAddress","PositionOfInterest","CadastralParcel","Administratif"];for(t=0;t<e.length;t++)-1===i.indexOf(e[t])&&On.log("[ReverseGeocoding] options.resources : "+e[t]+" is not a resource for reverse geocode")}else On.log("[ReverseGeocoding] 'options.resources' parameter should be an array"),e=null}if(this.options.delimitations){var n=this.options.delimitations;if(Array.isArray(n)){var o=["Circle","Point","Extent"];for(t=0;t<n.length;t++)-1===o.indexOf(n[t])&&On.log("[ReverseGeocoding] options.delimitations : "+n[t]+" is not a delimitation for reverse geocode")}else On.log("[ReverseGeocoding] 'options.delimitations' parameter should be an array"),n=null}},_initGeocodingType:function(){this._currentGeocodingType="StreetAddress";var t=this.options.resources;t&&0!==t.length||(this.options.resources=["StreetAddress","PositionOfInterest","CadastralParcel"]),Array.isArray(t)&&t.length&&("StreetAddress"!==t[0]&&"PositionOfInterest"!==t[0]&&"CadastralParcel"!==t[0]||(this._currentGeocodingType=t[0]));var e=this.options.reverseGeocodeOptions;e.filterOptions&&Array.isArray(e.filterOptions.type)&&0!==e.filterOptions.type.length&&(this._currentGeocodingType=e.filterOptions.type[0])},_initGeocodingDelimitation:function(){this._currentGeocodingDelimitation="Point";var t=this.options.delimitations;if(t&&0!==t.length||(this.options.delimitations=["Point","Circle","Extent"]),Array.isArray(t)&&t.length){var e=t[0].toLowerCase();"point"!==e&&"circle"!==e&&"extent"!==e||(this._currentGeocodingDelimitation=t[0])}},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showReverseGeocodingContainer=this._createShowReverseGeocodingElement();t.appendChild(e),this.options.collapsed||(e.checked=!0);var i=this._createShowReverseGeocodingPictoElement();t.appendChild(i);var n=this._createReverseGeocodingPanelElement(),o=this._panelHeaderContainer=this._createReverseGeocodingPanelHeaderElement(),r=this._returnPictoContainer=this._createReverseGeocodingPanelReturnPictoElement();o.appendChild(r);var s=this._panelTitleContainer=this._createReverseGeocodingPanelTitleElement();o.appendChild(s);var a=this._createReverseGeocodingPanelCloseElement();o.appendChild(a),n.appendChild(o);var l=this._formContainer=this._createReverseGeocodingPanelFormElement();l.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources)),l.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations));var c=this._createReverseGeocodingSubmitFormElement();l.appendChild(c),n.appendChild(l);var u=this._waitingContainer=this._createReverseGeocodingWaitingElement();n.appendChild(u);var h=this._resultsContainer=this._createReverseGeocodingResultsPanelElement(),d=this._resultsListContainer=this._createReverseGeocodingResultsListElement();return h.appendChild(d),n.appendChild(h),t.appendChild(n),On.log(t),t},_activateMapInteraction:function(t){if(On.info("_activateMapInteraction()"),null===this._inputFeaturesLayer){this._inputFeaturesLayer=new r.a.FeatureGroup,t.addLayer(this._inputFeaturesLayer);var e=this;t.on("draw:created",(function(t){var i=t.layer,n=t.layerType;On.trace("draw:created"),e._setFeaturePosition(i,n),e._currentIdLayer=r.a.Util.stamp(i),e._setFeatureLayer(i)})),t.on("draw:drawstart",(function(){On.trace("draw:drawstart"),e._removeFeatureLayer(e._lastIdLayer),e._lastIdLayer=e._currentIdLayer})),t.on("draw:drawstop",(function(){On.trace("draw:drawstop")}))}switch(this._currentGeocodingDelimitation.toLowerCase()){case"point":this._activatePointInteraction(t);break;case"circle":this._activateCircleInteraction(t);break;case"extent":this._activateBoxInteraction(t)}},_removeMapInteraction:function(t){t&&(null!==this._inputFeaturesLayer&&(t.off("draw:created"),t.off("draw:drawstart"),t.off("draw:drawstop"),t.removeLayer(this._inputFeaturesLayer),this._inputFeaturesLayer=null),this._lastIdLayer=this._currentIdLayer=0,this._currentFeature&&this._currentFeature.disable())},_activatePointInteraction:function(t){On.info("_activatePointInteraction()"),this._currentFeature&&this._currentFeature.disable(),r.a.drawLocal.draw.handlers.marker.tooltip.start="click map to place search point";this._currentFeature=new r.a.Draw.Marker(t,{repeatMode:!0}),this._currentFeature.enable()},_activateCircleInteraction:function(t){On.info("_activateCircleInteraction()"),this._currentFeature&&this._currentFeature.disable();this._currentFeature=new r.a.Draw.Circle(t,{repeatMode:!0}),this._currentFeature.enable()},_activateBoxInteraction:function(t){On.info("_activateBoxInteraction()"),this._currentFeature&&this._currentFeature.disable();this._currentFeature=new r.a.Draw.Rectangle(t,{repeatMode:!0}),this._currentFeature.enable()},_setFeaturePosition:function(t,e){var i=null;"marker"===e?(i=t.getLatLng(),this._requestGeom={type:"Point",coordinates:[i.lng,i.lat]}):"circle"===e?(i=t.getLatLng(),this._requestGeom={type:"Circle",coordinates:[i.lng,i.lat],radius:t.getRadius()}):"rectangle"===e?(i=t.getBounds(),this._requestGeom={type:"Polygon",coordinates:[[[i.getNorthWest().lng,i.getNorthWest().lat],[i.getSouthWest().lng,i.getSouthWest().lat],[i.getSouthEast().lng,i.getSouthEast().lat],[i.getNorthEast().lng,i.getNorthEast().lat],[i.getNorthWest().lng,i.getNorthWest().lat]]]}):On.warn("type geometric not defined !?"),On.log(i)},_setFeatureLayer:function(t){this._inputFeaturesLayer&&this._inputFeaturesLayer.addLayer(t)},_removeFeatureLayer:function(t){this._inputFeaturesLayer&&0!==t&&(t?this._inputFeaturesLayer.removeLayer(t):this._inputFeaturesLayer.clearLayers())},_reverseGeocodingRequest:function(t){var e=this._map;this._removeMapInteraction(e);var i={};r.a.Util.extend(i,this.options.reverseGeocodeOptions),r.a.Util.extend(i,t),r.a.Util.extend(i,{apiKey:this.options.apiKey,timeOut:3e4,protocol:"XHR"}),"circle"===this._requestGeom.type.toLowerCase()?(this._requestGeom.radius>1e3&&(On.log("INFO : initial circle radius ("+this._requestGeom.radius+") limited to 1000m."),this._requestGeom.radius=1e3),i.searchGeometry=this._requestGeom):"polygon"===this._requestGeom.type.toLowerCase()?i.searchGeometry=this._requestGeom:"point"===this._requestGeom.type.toLowerCase()&&("StreetAddress"===this._currentGeocodingType?(i.searchGeometry={type:"Circle",radius:50,coordinates:this._requestGeom.coordinates},i.maximumResponses=1):i.searchGeometry=this._requestGeom),On.log("reverseGeocode request options : ",i),this._displayWaitingContainer(),an.Services.reverseGeocode(i)},_displayGeocodedLocations:function(t){var e=this._map;this._clearLocations(),this._clearLocationsFeature(e),this._reverseGeocodingLocations=t,t&&0!==t.length?(this._formContainer.className="GPreverseGeocodingComponentHidden",this._hideWaitingContainer(),this._panelTitleContainer.innerHTML="Résultats de la recherche",this._returnPictoContainer.className="",this._resultsContainer.className="GPpanel",this._fillGeocodedLocationListContainer(t),this._displayGeocodedLocationsOnMap(t),e.fitBounds(this._inputResultsLayer.getBounds())):this._clearInputRequest()},_fillGeocodedLocationListContainer:function(t){for(var e=0;e<t.length;e++){var i=t[e];On.log(i);var n=this._fillGeocodedLocationDescription(i);n&&0!==n.length&&this._createReverseGeocodingResultElement(n,e)}},_fillGeocodedLocationDescription:function(t){if(t&&t.placeAttributes){var e=t.placeAttributes,i="";switch(t.type){case"StreetAddress":e.street&&(i+=e.housenumber?e.housenumber+" ":"",i+=e.street+", "),i+=e.postcode+" "+e.city;break;case"PositionOfInterest":i+=e.toponym,e.postcode&&1===e.postcode.length&&(i+=", "+e.postcode[0]),i+=" ("+e.category.join(",")+")";break;case"CadastralParcel":i+=e.id,i+=e.city?" ("+e.city+")":"";break;default:i+=e.city?e.city:""}return i}},_displayGeocodedLocationsOnMap:function(t){var e=this._map,i=this;function n(t){var e=t.target;e.setIcon(new pn("red"));var n=r.a.DomUtil.get("ReverseGeocodedLocation_"+e.options.id+"-"+i._uid);r.a.DomUtil.addClass(n,"GPreverseGeocodedLocationHighlight"),n.scrollIntoView(!1)}function o(t){var e=t.target;e.setIcon(new pn("green"));var n=r.a.DomUtil.get("ReverseGeocodedLocation_"+e.options.id+"-"+i._uid);r.a.DomUtil.removeClass(n,"GPreverseGeocodedLocationHighlight")}this._inputResultsLayer=new r.a.FeatureGroup,e.addLayer(this._inputResultsLayer);for(var s=0;s<t.length;s++){var a=t[s];if(a){var l={id:s,icon:new pn("green"),riseOnHover:!0,draggable:!1,clickable:!0,zIndexOffset:1e3,data:a},c=r.a.marker(r.a.latLng(a.position),l),u="<ul>",h=a.placeAttributes;for(var d in h)h.hasOwnProperty(d)&&"trueGeometry"!==d&&"extraFields"!==d&&"houseNumberInfos"!==d&&"_count"!==d&&(u+="<li>",u+='<span class="gp-attname-others-span">'+d.toUpperCase()+" : </span>",u+=h[d],u+=" </li>");u+=" </ul>",c.bindPopup(u),c.on("mouseover",n),c.on("mouseout",o),c.on("click",(function(t){i.fire("reverse:onclickresult",{data:t.target.options.data})})),this._inputResultsLayer.addLayer(c)}}},onShowReverseGeocodingClick:function(){var t=this._map;this._showReverseGeocodingContainer.checked?this._removeMapInteraction(t):this._waiting||this._reverseGeocodingLocations.length||this._activateMapInteraction(t)},onReverseGeocodingTypeChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;i&&(On.log(i),this._currentGeocodingType=i)},onReverseGeocodingDelimitationChange:function(t){var e=t.target.selectedIndex,i=t.target.options[e].value;if(i){On.log(i),this._currentGeocodingDelimitation=i,this._clearInputRequest();var n=this._map;this._removeMapInteraction(n),this._activateMapInteraction(n)}},onGPreverseGeocodingReturnPictoClick:function(){var t=this._map;this._clearLocations(),this._clearLocationsFeature(t),this._clearInputRequest(),this._activateMapInteraction(t)},onReverseGeocodingSubmit:function(){if(this._requestGeom){var t=this._map,e=this;this._reverseGeocodingRequest({index:e._currentGeocodingType,onSuccess:function(i){if(On.log(i),i){var n=i.locations;e._displayGeocodedLocations(n),e._hideWaitingContainer(),0===n.length&&e._activateMapInteraction(t)}},onFailure:function(i){e._hideWaitingContainer(),e._clearLocations(),e._clearLocationsFeature(t),e._clearInputRequest(),e._activateMapInteraction(t),On.log(i.message)}})}else On.log("missing search geometry")},onReverseGeocodingResultClick:function(t){var e=c.index(t.target.id);this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("click")}))},onReverseGeocodingResultMouseOver:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.add("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseover")}))},onReverseGeocodingResultMouseOut:function(t){var e=c.index(t.target.id);t.target.classList&&t.target.classList.remove("GPreverseGeocodedLocationHighlight"),this._inputResultsLayer&&this._inputResultsLayer.eachLayer((function(t){t.options.id===parseInt(e,10)&&t.fire("mouseout")}))},_clearLocations:function(){if(this._reverseGeocodingLocations=[],this._resultsListContainer)for(;this._resultsListContainer.firstChild;)this._resultsListContainer.removeChild(this._resultsListContainer.firstChild)},_clearLocationsFeature:function(t){null!==this._inputResultsLayer&&(t.removeLayer(this._inputResultsLayer),this._inputResultsLayer=null)},_clearInputRequest:function(){this._requestPosition=null,this._requestCircleFilter=null,this._requestBboxFilter=null},_displayWaitingContainer:function(){this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout((function(){!0===t._waiting?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)}),16e3)},_hideWaitingContainer:function(){this._waiting&&(this._waitingContainer.className="GPreverseGeocodingCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)}});r.a.extend(Un.prototype,r.a.Evented.prototype);var jn=Un,Fn=l.getLogger("RouteDOM"),qn={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProute"),t.className="GPwidget",t},_createShowRouteElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowRoute"),t.type="checkbox",t},_createShowRoutePictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowRoutePicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowRoute"),e.title="Ouvrir le calcul d'itinéraire",e.addEventListener?e.addEventListener("click",(function(e){t.onShowRoutePanelClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowRoutePanelClick(e)}));var i=document.createElement("span");return i.id=this._addUID("GPshowRouteOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createRoutePanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProutePanel"),t.className="GPpanel",t},_createRoutePanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Calcul d'itinéraire",e.appendChild(i);var n=document.createElement("div");return n.id=this._addUID("GProutePanelClose"),n.className="GPpanelClose",n.title="Masquer le panneau",n.addEventListener?n.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()}),!1):n.attachEvent&&n.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowRoutePicto")).click()})),e.appendChild(n),e},_createRoutePanelFormElement:function(){var t=this,e=document.createElement("form");return e.id=this._addUID("GProuteForm"),e.setAttribute("onkeypress","return event.keyCode != 13;"),e.addEventListener("submit",(function(e){Fn.log(e),e.preventDefault();var i=document.getElementsByClassName(t._addUID("GPlocationPoint")),n=i[0].childNodes[0].id,o=i[i.length-1].childNodes[0].id,r=c.index(n),s=c.index(o);if(""===document.getElementById(t._addUID("GPlocationOrigin_"+r)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+r)).value||""===document.getElementById(t._addUID("GPlocationOrigin_"+s)).value&&""===document.getElementById(t._addUID("GPlocationOriginCoords_"+s)).value)return!1;t._addRouteResultsStagesValuesElement(i);var a=null;if(document.getElementById(t._addUID("GProuteComputationSelect"))){var l=document.getElementById(t._addUID("GProuteResultsComputationSelect"));l.selectedIndex=document.getElementById(t._addUID("GProuteComputationSelect")).selectedIndex,a=l.options[l.selectedIndex].value}var u=null;document.getElementById(t._addUID("GProuteTransportCar"))&&document.getElementById(t._addUID("GProuteTransportCar")).checked&&(u=document.getElementById(t._addUID("GProuteTransportCar")).value),document.getElementById(t._addUID("GProuteTransportPedestrian"))&&document.getElementById(t._addUID("GProuteTransportPedestrian")).checked&&(u=document.getElementById(t._addUID("GProuteTransportPedestrian")).value);for(var h=[],d=document.getElementsByClassName("GProuteExclusionsOption"),p=0;p<d.length;p++){var m=d[p].htmlFor,f=document.getElementById(m);f.checked||h.push(f.value)}return t.onRouteComputationSubmit({computation:a,transport:u,exclusions:h}),!1})),e},_createRoutePanelResultsElement:function(){var t=document.createElement("div");t.id=this._addUID("GProuteResultsPanel"),t.className="GProuteComponentHidden",t.appendChild(this._createRouteResultsStagesElement()),t.appendChild(this._createRouteResultsElement());var e=document.createElement("div");e.className="GPfakeBorder GPfakeBorderLeft",t.appendChild(e),t.appendChild(this._createRouteShowResultsDetailsElement());var i=document.createElement("label");i.htmlFor=this._addUID("GProuteResultsShowDetails"),i.innerHTML="Afficher le détail",t.appendChild(i);var n=document.createElement("label");n.htmlFor=this._addUID("GProuteResultsShowDetails"),n.innerHTML="Masquer le détail",t.appendChild(n);var o=document.createElement("div");return o.className="GPfakeBorder",t.appendChild(o),t.appendChild(this._createRouteResultsDetailsElement()),t},_createRouteWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GProuteCalcWaitingContainer"),t.className="GProuteCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GProuteCalcWaiting",e.innerHTML="Calcul en cours...",t.appendChild(e),t},_createRouteResultsStagesElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteResultsStages"),t},_addRouteResultsStagesValuesElement:function(t){document.getElementById(this._addUID("GProuteResultsStages")).innerHTML="";for(var e=0;e<t.length;e++){var i=t[e].childNodes[0].id,n=c.index(i);if("GPflexInput GPlocationStageFlexInput"===document.getElementById(this._addUID("GPlocationPoint_"+n)).className){var o=document.createElement("div");o.className="GProuteResultsStages";var r=document.createElement("div");r.className="GProuteResultStageLabel",r.innerHTML=document.getElementById(this._addUID("GPlocationOriginLabel_"+n)).innerHTML+" :",o.appendChild(r);var s=document.createElement("div");s.className="GProuteResultStageValue";var a=document.getElementById(this._addUID("GPlocationOriginCoords_"+n)),l=a.value,u="GPlocationOriginVisible"===a.className;s.innerHTML=null!==l&&""!==l&&u?l:document.getElementById(this._addUID("GPlocationOrigin_"+n)).value,o.appendChild(s),""!==s.innerHTML&&document.getElementById(this._addUID("GProuteResultsStages")).appendChild(o)}}},_createRouteResultsElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GProuteResults");var i=document.createElement("div");i.id=this._addUID("GProuteResultsValues"),e.appendChild(i);var n=document.createElement("div");n.id=this._addUID("GProuteResultsMode");var o=document.createElement("select");o.id=this._addUID("GProuteResultsComputationSelect"),o.className="GPinputSelect",o.addEventListener("change",(function(e){t.onRouteModeComputationChangeAndRun(e)}));for(var r=[{code:"fastest",label:"Plus rapide"},{code:"shortest",label:"Plus court"}],s=0;s<r.length;s++){var a=document.createElement("option");a.value=r[s].code,a.text=r[s].label,o.appendChild(a)}n.appendChild(o),e.appendChild(n);var l=document.createElement("div");return l.id=this._addUID("GProuteResultsNew"),l.title="Modifier le calcul",l.addEventListener("click",(function(e){document.getElementById(t._addUID("GProuteResultsPanel")).className="GProuteComponentHidden",document.getElementById(t._addUID("GProuteForm")).className="",t.onShowRouteResultsNewClick(e)})),e.appendChild(l),e},_addRouteResultsValuesElement:function(t,e,i){var n=document.getElementById(this._addUID("GProuteResultsValues"));if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);var o=document.createElement("div");o.className="GProuteResultsValue";var r=document.createElement("label");r.className="GProuteResultsValueLabel",r.innerHTML="Distance :",o.appendChild(r);var s=0;if(parseInt(t/1e3,10)){var a=Math.round(t);s=(a/=1e3)+" km"}else s=Math.round(t)+" m";var l=document.createElement("div");l.id=this._addUID("GProuteResultsValueDist"),l.innerHTML=s,o.appendChild(l),n.appendChild(o);var c=document.createElement("div");c.className="GProuteResultsValue";var u=document.createElement("label");u.className="GProuteResultsValueLabel",u.innerHTML="Durée :",c.appendChild(u);var h=document.createElement("div");return h.id=this._addUID("GProuteResultsValueDist"),h.innerHTML=i(e),c.appendChild(h),n.appendChild(c),n},_createRouteShowResultsDetailsElement:function(){var t=document.createElement("input");return t.id=this._addUID("GProuteResultsShowDetails"),t.type="checkbox",t},_createRouteResultsDetailsElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteResultsDetails"),t},_addRouteResultsDetailsElement:function(t,e){var i=this,n=document.getElementById(this._addUID("GProuteResultsDetails"));if(n.childElementCount)for(;n.firstChild;)n.removeChild(n.firstChild);for(var o=0,r=0,s=0;s<t.length;s++){var a=s+1,l=t[s],c=document.createElement("div");c.className="GProuteResultsDetailsNumber",c.innerHTML=a+".",n.appendChild(c),r+=parseFloat(l.duration),o+=parseFloat(l.distance);var u=0;if(parseInt(o/1e3,10)){var h=Math.round(o);u=(h/=1e3)+" km"}else u=Math.round(o)+" m";var d=document.createElement("div");d.className="GProuteResultsDetailsInstruction",d.id=this._addUID("GProuteResultsDetailsInstruction_"+a),d.title="distance : "+u+" / temps : "+e(r),d.innerHTML=l.instruction,d.addEventListener("mouseover",(function(t){i.onRouteResultsDetailsMouseOver(t)})),d.addEventListener("mouseout",(function(t){i.onRouteResultsDetailsMouseOut(t)})),d.addEventListener("click",(function(t){"function"==typeof i.onRouteResultsDetailsClick&&i.onRouteResultsDetailsClick(t)})),n.appendChild(d)}return n},_createRoutePanelFormPointElement:function(t,e,i){var n=this,o=document.createElement("div");o.id="GProutePoint"+t,o.className=i?"GPflexInput GProuteStageFlexInput":"GPflexInput GProuteStageFlexInputHidden";var r=document.createElement("label");r.id="GProuteOriginLabel"+t,r.htmlFor="GProuteOrigin"+t,r.innerHTML=e,r.addEventListener("click",(function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteOriginCoords"+t).value="";for(var e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+t).checked=!1,document.getElementById("GProuteOrigin"+t).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+t).className="GProuteOriginHidden"})),o.appendChild(r);var s=document.createElement("input");s.id="GProuteOrigin"+t,s.className="GProuteOriginVisible",s.type="text",s.placeholder="Saisir une adresse",s.addEventListener("keyup",(function(t){var e=t.which||t.keyCode;if(13!==e&&10!==e){var i=this.id.charAt(this.id.length-1);document.getElementById("GProuteOrigin"+i).value.length>2?document.getElementById("GProuteAutoCompleteList"+i).style.display="block":document.getElementById("GProuteAutoCompleteList"+i).style.display="none",n.onAutoCompleteSearchText(t)}})),s.addEventListener("blur",(function(){var t=this.id.charAt(this.id.length-1);document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),o.appendChild(s);var a=document.createElement("input");a.id="GProuteOriginCoords"+t,a.className="GProuteOriginHidden",a.type="text",a.disabled=!0,o.appendChild(a);var l=document.createElement("input");l.id="GProuteOriginPointer"+t,l.type="checkbox",o.appendChild(l);var c=document.createElement("label");return c.id="GProuteOriginPointerImg"+t,c.htmlFor="GProuteOriginPointer"+t,c.className="GProuteOriginPointerImg",c.title="Pointer un lieu sur la carte",c.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e,i=this.id.charAt(this.id.length-1);for(e=1;e<8;e++)i!==e&&(document.getElementById("GProuteOriginPointer"+e).checked=!1,"Pointer un lieu sur la carte"===document.getElementById("GProuteOriginCoords"+e).value&&(document.getElementById("GProuteOriginCoords"+e).value="",document.getElementById("GProuteOrigin"+e).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+e).className="GProuteOriginHidden"));if(document.getElementById("GProuteOriginPointer"+i).checked){for(document.getElementById("GProuteOriginCoords"+i).value="",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display="flex";document.getElementById("GProuteForm").className="",document.getElementById("GProuteOriginPointer"+i).checked=!1,document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden"}else{for(document.getElementById("GProuteOriginCoords"+i).value="Pointer un lieu sur la carte",e=1;e<8;e++)document.getElementById("GProutePoint"+e).style.display=i===e?"flex":"none";document.getElementById("GProuteForm").className="GProuteFormMini",document.getElementById("GProuteOriginPointer"+i).checked=!0,document.getElementById("GProuteOrigin"+i).className="GProuteOriginHidden",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginVisible"}n.onRouteMapPointClick(t)})),o.appendChild(c),o},_createRoutePanelFormRemoveStageElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteStageRemove"+t,i.className="GProuteStageRemove",i.title="Supprimer l'étape",1!==t&&7!==t&&i.addEventListener("click",(function(t){var i=this.id.charAt(this.id.length-1);document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInputHidden",document.getElementById("GProuteOrigin"+i).value="",document.getElementById("GProuteOrigin"+i).className="GProuteOriginVisible",document.getElementById("GProuteOriginCoords"+i).value="",document.getElementById("GProuteOriginCoords"+i).className="GProuteOriginHidden",document.getElementById("GProuteStageAdd").style.display="",e.onRouteRemovePointClick(t)})),i},_createRoutePanelFormAddStageElement:function(){var t=this,e=document.createElement("div");return e.id="GProuteStageAdd",e.title="Ajouter une étape",e.addEventListener("click",(function(e){for(var i=1,n=0,o=2;o<7;o++)"GPflexInput GProuteStageFlexInputHidden"===document.getElementById("GProutePoint"+o).className?1===i&&(i=o):n++;i<7&&(document.getElementById("GProutePoint"+i).className="GPflexInput GProuteStageFlexInput"),4===n&&(document.getElementById("GProuteStageAdd").style.display="none"),t.onRouteAddPointClick(e)})),e},_createRoutePanelFormAutoCompleteListElement:function(t){var e=this,i=document.createElement("div");return i.id="GProuteAutoCompleteList"+t,i.className="GPadvancedAutoCompleteList",i.addEventListener?i.addEventListener("click",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"}),!1):i.attachEvent&&i.attachEvent("onclick",(function(i){e.onAutoCompletedResultsItemClick(i),document.getElementById("GProuteAutoCompleteList"+t).style.display="none"})),i},_createRouteAutoCompletedLocationElement:function(t,e,i){var n=document.getElementById("GProuteAutoCompleteList"+e),o=document.createElement("div");o.id="AutoCompletedLocation"+i,o.className="GPautoCompleteProposal",o.innerHTML=ln.getSuggestedLocationFreeform(t),n.appendChild(o)},_createRoutePanelFormModeChoiceElement:function(){var t=document.createElement("div");return t.id=this._addUID("GProuteModeChoice"),t},_createRoutePanelFormModeChoiceTransportElement:function(t){var e=this,i=document.createElement("div");i.id=this._addUID("GProuteTransportChoice");var n=document.createElement("span");n.className="GProuteModeLabel",n.innerHTML="Mode de transport",i.appendChild(n);for(var o=0;o<t.length;o++){var r=t[o];if("Voiture"===r){var s=document.createElement("input");s.id=this._addUID("GProuteTransportCar"),s.type="radio",s.name="GProuteTransport",s.value="Voiture",0===o&&(s.checked=!0),s.addEventListener?s.addEventListener("change",(function(t){e.onRouteModeTransportChange(t)})):s.attachEvent&&s.attachEvent("onchange",(function(t){e.onRouteModeTransportChange(t)})),i.appendChild(s);var a=document.createElement("label");a.className="GProuteTransportImg",a.htmlFor=this._addUID("GProuteTransportCar"),a.title="Voiture",i.appendChild(a)}if("Pieton"===r){var l=document.createElement("input");l.id=this._addUID("GProuteTransportPedestrian"),l.type="radio",l.name="GProuteTransport",l.value="Pieton",0===o&&(l.checked=!0),l.addEventListener?l.addEventListener("change",(function(t){e.onRouteModeTransportChange(t)})):l.attachEvent&&l.attachEvent("onchange",(function(t){e.onRouteModeTransportChange(t)})),i.appendChild(l);var c=document.createElement("label");c.className="GProuteTransportImg",c.htmlFor=this._addUID("GProuteTransportPedestrian"),c.title="Piéton",i.appendChild(c)}}return i},_createRoutePanelFormModeChoiceComputeElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GProuteComputationChoice");var i=document.createElement("label");i.htmlFor=this._addUID("GProuteComputationSelect"),i.innerHTML="Mode de calcul";var n=document.createElement("span");n.className="GProuteModeLabel",n.appendChild(i),e.appendChild(n);var o=document.createElement("select");o.id=this._addUID("GProuteComputationSelect"),o.className="GPinputSelect",o.addEventListener("change",(function(e){t.onRouteModeComputationChange(e)}));for(var r=[{code:"fastest",label:"Plus rapide"},{code:"shortest",label:"Plus court"}],s=0;s<r.length;s++){var a=document.createElement("option");a.value=r[s].code,a.text=r[s].label,o.appendChild(a)}return e.appendChild(o),e},_createShowRouteExclusionsElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowRouteExclusions"),t.type="checkbox",t},_createShowRouteExclusionsPictoElement:function(){var t=this,e=document.createElement("label");return e.id=this._addUID("GPshowRouteExclusionsPicto"),e.className="GPshowMoreOptionsImage GPshowMoreOptions GPshowRouteExclusionsPicto",e.htmlFor=this._addUID("GPshowRouteExclusions"),e.title="Exclusions",e.addEventListener?e.addEventListener("click",(function(e){t.onShowRouteExclusionsClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowRouteExclusionsClick(e)})),e},_createRoutePanelFormExclusionsElement:function(){var t=document.createElement("div");t.id=this._addUID("GProuteExclusions");var e=document.createElement("span");return e.className="GProuteExclusionsLabel",e.innerHTML="Passages autorisés",t.appendChild(e),t},_createRoutePanelFormExclusionOptionsElement:function(t){var e=this,i=document.createElement("div");for(var n in i.className="GProuteExclusionsOptions",t)if(t.hasOwnProperty(n)){var o=t[n];switch(n){case"toll":var r=document.createElement("input");r.id=this._addUID("GProuteExclusionsToll"),r.type="checkbox",r.value="Toll",r.checked=!o,r.addEventListener?r.addEventListener("change",(function(t){e.onRouteExclusionsChange(t)})):r.attachEvent&&r.attachEvent("onchange",(function(t){e.onRouteExclusionsChange(t)})),i.appendChild(r);var s=document.createElement("label");s.className="GProuteExclusionsOption",s.htmlFor=this._addUID("GProuteExclusionsToll"),s.innerHTML="Péages",i.appendChild(s);break;case"tunnel":var a=document.createElement("input");a.id=this._addUID("GProuteExclusionsTunnel"),a.type="checkbox",a.value="Tunnel",a.checked=!o,a.addEventListener?a.addEventListener("change",(function(t){e.onRouteExclusionsChange(t)})):a.attachEvent&&a.attachEvent("onchange",(function(t){e.onRouteExclusionsChange(t)})),i.appendChild(a);var l=document.createElement("label");l.className="GProuteExclusionsOption",l.htmlFor=this._addUID("GProuteExclusionsTunnel"),l.innerHTML="Tunnels",i.appendChild(l);break;case"bridge":var c=document.createElement("input");c.id=this._addUID("GProuteExclusionsBridge"),c.type="checkbox",c.value="Bridge",c.checked=!o,c.addEventListener?c.addEventListener("change",(function(t){e.onRouteExclusionsChange(t)})):c.attachEvent&&c.attachEvent("onchange",(function(t){e.onRouteExclusionsChange(t)})),i.appendChild(c);var u=document.createElement("label");u.className="GProuteExclusionsOption",u.htmlFor=this._addUID("GProuteExclusionsBridge"),u.innerHTML="Ponts",i.appendChild(u)}}return i},_createRouteSubmitFormElement:function(){var t=document.createElement("input");return t.id=this._addUID("GProuteSubmit"),t.className="GPinputSubmit",t.type="submit",t.value="Calculer",t},_createRouteFormResetElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GProuteReset"),e.title="Réinitialiser les paramètres",e.addEventListener("click",(function(e){t.onRouteResetClick(e)})),e}},Bn=l.getLogger("route(plus)"),zn=r.a.Control.extend({includes:qn,options:{position:"topleft",collapsed:!0,graphs:["Voiture","Pieton"],exclusions:{toll:!1,tunnel:!1,bridge:!1},disableReverse:!1,routeOptions:{},autocompleteOptions:{}},initialize:function(t){r.a.Util.setOptions(this,t),this._uid=c.generate(),this._initTransport(),this._initExclusions(),this._initComputation(),this._showRouteContainer=null,this._pictoRouteContainer=null,this._waitingContainer=null,this._formRouteContainer=null,this._resultsRouteContainer=null,this._isDesktop=this._detectSupport(),this._currentPoints=[],this._currentTransport=null,this._currentComputation=null,this._currentExclusions=[],this._geojsonRoute=null,this._geojsonSections=null,this._waiting=!1,this._timer=null,this._currentRouteInformations=null,this._resources={}},onAdd:function(t){var e=this._container=this._initLayout(t);return r.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),e},onRemove:function(){},_initTransport:function(){this._currentTransport="Voiture";var t=this.options.graphs;t&&0!==t.length||(this.options.graphs=["Voiture","Pieton"]),r.a.Util.isArray(t)&&t.length&&("Voiture"!==t[0]&&"Pieton"!==t[0]||(this._currentTransport=t[0]));var e=this.options.routeOptions;e.graph&&(this._currentTransport=e.graph)},_initComputation:function(){this._currentComputation="fastest";var t=this.options.routeOptions;t.routePreference&&(this._currentComputation=t.routePreference)},_initExclusions:function(){this._currentExclusions=[];var t=this.options.exclusions;if(t&&0!==Object.keys(t).length||(this.options.exclusions={toll:!1,tunnel:!1,bridge:!1}),t&&Object.keys(t).length)for(var e in t)t.hasOwnProperty(e)&&t.k&&this._currentExclusions.push(e);var i=this.options.routeOptions;r.a.Util.isArray(i.exclusions)&&(this._currentExclusions=i.exclusions)},_detectSupport:function(){var t=!0,e=window.navigator.userAgent.toLowerCase();return-1===e.indexOf("iphone")&&-1===e.indexOf("ipod")&&-1===e.indexOf("ipad")&&-1===e.indexOf("android")&&-1===e.indexOf("mobile")&&-1===e.indexOf("blackberry")&&-1===e.indexOf("tablet")&&-1===e.indexOf("phone")&&-1===e.indexOf("touch")||(t=!1),-1===e.indexOf("msie")&&-1===e.indexOf("trident")||(t=!0),t},_initLayout:function(t){var e=this._createMainContainerElement(),i=this._showRouteContainer=this._createShowRouteElement();e.appendChild(i),this.options.collapsed||(i.checked=!0);var n=this._pictoRouteContainer=this._createShowRoutePictoElement();e.appendChild(n);var o=this._createRoutePanelElement(),r=this._createRoutePanelHeaderElement();o.appendChild(r);for(var s=this._formRouteContainer=this._createRoutePanelFormElement(),a=this._createRoutePanelFormPointsElement(t),l=0;l<a.length;l++)s.appendChild(a[l]);var c=this._createRoutePanelFormModeChoiceElement();c.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs)),c.appendChild(this._createRoutePanelFormModeChoiceComputeElement()),s.appendChild(c),s.appendChild(this._createShowRouteExclusionsElement()),s.appendChild(this._createShowRouteExclusionsPictoElement());var u=this._createRoutePanelFormExclusionsElement();u.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions)),s.appendChild(u);var h=this._createRouteSubmitFormElement();s.appendChild(h),o.appendChild(s);var d=this._resultsRouteContainer=this._createRoutePanelResultsElement();o.appendChild(d);var p=this._waitingContainer=this._createRouteWaitingElement();return o.appendChild(p),e.appendChild(o),e},_createRoutePanelFormPointsElement:function(t){var e=[],i=1,n=new fn({apiKey:this.options.apiKey||null,tag:{id:i,unique:this._uid,label:"Départ",color:"blue",display:!0},disableReverse:this.options.disableReverse,autocompleteOptions:this.options.autocompleteOptions||null});n.setMap(t);var o=this.options.routeOptions;for(o.startPoint&&(n._inputAutoCompleteContainer.value=o.startPoint.x+" , "+o.startPoint.y,n.setCoordinate({lng:o.startPoint.x,lat:o.startPoint.y})),e.push(n.getContainer()),this._currentPoints.push(n),i=2;i<7;i++){var r=new fn({apiKey:this.options.apiKey||null,tag:{id:i,unique:this._uid,label:"Etape",color:"green",display:!1,removeOption:!0},disableReverse:this.options.disableReverse,autocompleteOptions:this.options.autocompleteOptions||null});r.setMap(t),e.push(r.getContainer()),this._currentPoints.push(r)}var s=new fn({apiKey:this.options.apiKey||null,tag:{id:i,unique:this._uid,label:"Arrivée",color:"red",display:!0,addOption:!0,removeOption:!1},disableReverse:this.options.disableReverse,autocompleteOptions:this.options.autocompleteOptions||null});return s.setMap(t),o.endPoint&&(s._inputAutoCompleteContainer.value=o.endPoint.x+" , "+o.endPoint.y,s.setCoordinate({lng:o.endPoint.x,lat:o.endPoint.y})),e.push(s.getContainer()),this._currentPoints.push(s),e},onShowRoutePanelClick:function(t){Bn.log("onShowRoutePanelClick",t),this._geojsonSections||this._clear()},onRouteModeComputationChange:function(t){Bn.log("onRouteModeComputationChange",t);var e=t.target.selectedIndex,i=t.target.options[e].value;i&&(Bn.log(i),this._currentComputation=i)},onRouteModeComputationChangeAndRun:function(t){Bn.log("onRouteModeComputationChangeAndRun",t),this.onRouteModeComputationChange(t),this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry(),this.onRouteComputationSubmit({computation:this._currentComputation,transport:this._currentTransport,exclusions:this._currentExclusions})},onRouteModeTransportChange:function(t){Bn.log("onRouteModeTransportChange",t);var e=t.target.value;e&&(Bn.log(e),this._currentTransport=e)},onShowRouteExclusionsClick:function(t){Bn.log("onShowRouteExclusionsClick",t)},onRouteExclusionsChange:function(t){Bn.log("onRouteExclusionsChange",t);var e=t.target.value,i=t.target.checked;if(e){Bn.log(e,i);for(var n=!1,o=null,r=0;r<this._currentExclusions.length;r++)this._currentExclusions[r]===e&&(o=r,n=!0);!n&&i&&this._currentExclusions.push(e),n&&!i&&(this._currentExclusions[o]=null)}},onRouteComputationSubmit:function(t){Bn.log("onRouteComputationSubmit",t);var e,i,n=this._currentPoints;if(n[0].getCoordinate){var o=n[0].getCoordinate();e={x:o.lon||o.lng,y:o.lat}}if(n[0].dragging(!1),Bn.log("start",e),n[n.length-1]&&n[n.length-1].getCoordinate){var r=n[n.length-1].getCoordinate();i={x:r.lon||r.lng,y:r.lat}}n[n.length-1].dragging(!1),Bn.log("end",i);for(var s=[],a=1;a<n.length-1;a++)if(n[a]&&n[a].getCoordinate){var l=n[a].getCoordinate();if(l){var c={x:l.lon||l.lng,y:l.lat};Bn.log("step",c),s.push(c)}}this._currentTransport=t.transport,this._currentComputation=t.computation,this._currentExclusions=t.exclusions;var u,h=this.options.routeOptions;h.resource?u=h.resource:"fastest"===this._currentComputation&&"Pieton"===this._currentTransport&&(u="bdtopo-valhalla"),void 0===this.options.routeOptions.geometryInInstructions&&(this.options.routeOptions.geometryInInstructions=!0),this._displayWaitingContainer();var d=this;this._requestRouting({startPoint:e,endPoint:i,viaPoints:s,graph:this._currentTransport,routePreference:this._currentComputation,resource:u,exclusions:this._currentExclusions,geometryInInstructions:this.options.routeOptions.geometryInInstructions,distanceUnit:"m",onSuccess:function(t){Bn.log(t),t&&(d._fillRouteResultsDetails(t),d.options.routeOptions.onSuccess&&d.options.routeOptions.onSuccess(t))},onFailure:function(t){d._hideWaitingContainer(),d._clearRouteResultsDetails(),Bn.log(t.message)}})},onShowRouteResultsNewClick:function(t){Bn.log("onShowRouteResultsNewClick",t);for(var e=this._currentPoints,i=0;i<e.length;i++)e[i].dragging(!0);this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry()},onRouteResultsDetailsMouseOver:function(t){Bn.log("onRouteResultsDetailsMouseOver",t);var e=c.index(t.target.id);this._isDesktop&&this._geojsonSections&&this._geojsonSections.eachLayer((function(t){t.feature.id===parseInt(e,10)&&t.setStyle({weight:10,color:"#0F9DE8",opacity:.5})}))},onRouteResultsDetailsMouseOut:function(t){Bn.log("onRouteResultsDetailsMouseOut",t);var e=c.index(t.target.id);this._isDesktop&&this._geojsonSections&&this._geojsonSections.eachLayer((function(t){t.feature.id===parseInt(e,10)&&t.setStyle({color:"#ED7F10",weight:5,opacity:.75})}))},onRouteResultsDetailsClick:function(t){Bn.log("onRouteResultsDetailsClick",t);var e=c.index(t.target.id),i=this;if(!this._isDesktop&&this._geojsonSections){var n=t.target.title,o=t.target.innerHTML;this._geojsonSections.eachLayer((function(i){i.feature.id===parseInt(e,10)&&(t.target.innerHTML=n,i.setStyle({weight:10,color:"#0F9DE8",opacity:.5}))})),clearTimeout(1e3),setTimeout((function(){i._geojsonSections.eachLayer((function(i){i.feature.id===parseInt(e,10)&&(t.target.innerHTML=o,i.setStyle({color:"#ED7F10",weight:5,opacity:.75}))}))}),1e3)}},_requestRouting:function(t){if(t&&0!==Object.keys(t).length&&t.startPoint&&t.endPoint){Bn.log(t);var e={};r.a.Util.extend(e,this.options.routeOptions),r.a.Util.extend(e,t),r.a.Util.extend(e,{apiKey:this.options.routeOptions.apiKey||this.options.apiKey}),r.a.Util.extend(e,{ssl:this.options.ssl}),Bn.log(e),an.Services.route(e)}},_fillRouteResultsDetails:function(t){var e=t.totalDistance,i=t.totalTime,n=this._simplifiedInstructions(t.routeInstructions);n&&this._fillRouteResultsDetailsContainer(e,i,n);var o=t.routeGeometry;if(o&&this._fillRouteResultsDetailsGeometry(o),this.options.routeOptions.geometryInInstructions){var s=n&&Array.isArray(n)&&0!==n[0].geometry.length;n&&s&&this._fillRouteResultsDetailsFeatureGeometry(n)}var a=t.bbox;if(a){var l=this._map,c=r.a.latLngBounds([a.bottom,a.left],[a.top,a.right]);l.fitBounds(c,{padding:[1,1]})}this._currentRouteInformations=t,this._formRouteContainer.className="GProuteComponentHidden",this._hideWaitingContainer(),this._resultsRouteContainer.className=""},_fillRouteResultsDetailsContainer:function(t,e,i){this._resultsRouteValuesContainer=this._addRouteResultsValuesElement(t,e,this._convertSecondsToTime),this._resultsRouteDetailsContainer=this._addRouteResultsDetailsElement(i,this._convertSecondsToTime)},_fillRouteResultsDetailsGeometry:function(t){this._clearRouteResultsGeometry();var e=this._map;this._geojsonRoute=r.a.geoJson(t,{style:{color:"#ED7F10",weight:5,opacity:.75}}).addTo(e)},_fillRouteResultsDetailsFeatureGeometry:function(t){this._clearRouteResultsFeatureGeometry();for(var e=this._map,i={type:"FeatureCollection",features:[]},n=0;n<t.length;n++){var o=t[n],s=n+1;i.features.push({id:s,type:"Feature",geometry:o.geometry,properties:{popupContent:"("+s+") distance : "+this._convertDistance(o.distance)+" / temps : "+this._convertSecondsToTime(o.duration)}})}var a=this;function l(t){var e=t.target;a._geojsonSections.resetStyle(e);var i=r.a.DomUtil.get("GProuteResultsDetailsInstruction_"+e.feature.id+"-"+a._uid);r.a.DomUtil.removeClass(i,"GProuteResultsDetailsHighlight")}function c(t){var e=t.target;Bn.log(e),e.setStyle({weight:10,color:"#0F9DE8",opacity:.5});var i=r.a.DomUtil.get("GProuteResultsDetailsInstruction_"+e.feature.id+"-"+a._uid);r.a.DomUtil.addClass(i,"GProuteResultsDetailsHighlight")}this._geojsonSections=r.a.geoJson(i,{style:{color:"#ED7F10",weight:5,opacity:.75},onEachFeature:function(t,e){e.on({mouseover:c,mouseout:l}),e.bindPopup(t.properties.popupContent)}}).addTo(e)},_clear:function(){this._currentTransport=null,this._currentExclusions=[],this._currentComputation=null,this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry();for(var t=0;t<this._currentPoints.length;t++)this._currentPoints[t].clear()},_clearRouteResultsDetails:function(){if(this._currentRouteInformations=null,this._resultsRouteDetailsContainer){var t=this._resultsRouteDetailsContainer;if(t.childElementCount)for(;t.firstChild;)t.removeChild(t.firstChild)}if(this._resultsRouteValuesContainer){var e=this._resultsRouteValuesContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild)}},_clearRouteResultsGeometry:function(){var t=this._map;null!=this._geojsonRoute&&(t.removeLayer(this._geojsonRoute),this._geojsonRoute=null)},_clearRouteResultsFeatureGeometry:function(){var t=this._map;null!=this._geojsonSections&&(t.removeLayer(this._geojsonSections),this._geojsonSections=null)},_displayWaitingContainer:function(){this._waitingContainer.className="GProuteCalcWaitingContainerVisible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var t=this;this._timer=setTimeout((function(){!0===t._waiting?t._hideWaitingContainer():t._timer&&clearTimeout(t._timer)}),16e3)},_hideWaitingContainer:function(){this._waiting&&(this._waitingContainer.className="GProuteCalcWaitingContainerHidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)},_simplifiedInstructions:function(t){var e=[],i=t[0];1===t.length&&e.push(i);for(var n=1;n<t.length;n++){var o=t[n];if(o.instruction===i.instruction){i.distance=(parseFloat(o.distance)+parseFloat(i.distance)).toString(),i.duration=(parseFloat(o.duration)+parseFloat(i.duration)).toString();for(var r=1;r<o.geometry.coordinates.length;r++)i.geometry.coordinates.push(o.geometry.coordinates[r]);n===t.length-1&&(e.push(i),i=null)}else e.push(i),i=o,n===t.length-1&&(e.push(o),i=null)}return Bn.log(e),e},_convertSecondsToTime:function(t){t=Math.round(t);var e=Math.floor(t/3600);e||(e="00");var i=t%3600,n=Math.floor(i/60);n||(n="00");var o=i%60,r=Math.ceil(o);return r||(r="00"),e+"h "+n+"m "+r+"s"},_convertDistance:function(t){var e=parseInt(t/1e3,10);return e?e+" km":parseInt(t,10)+" m"},compute:function(t,e){if(this._showRouteContainer.checked||this._pictoRouteContainer.click(),this._map){var i={computation:"fastest",transport:"Voiture",exclusions:[]};r.a.Util.extend(i,e);var n=this._currentPoints;n[0].setCoordinate(t[0]),r.a.DomUtil.get("GPlocationOrigin_1-"+this._uid).value=t[0].lng+" , "+t[0].lat;var o=t.length-1;n[6].setCoordinate(t[o]),r.a.DomUtil.get("GPlocationOrigin_7-"+this._uid).value=t[o].lng+" , "+t[o].lat;for(var s=1;s<t.length-1;s++){n[s].setCoordinate(t[s]),r.a.DomUtil.get("GPlocationOrigin_"+s+"-"+this._uid).value=t[s].lng+" , "+t[s].lat}"Voiture"===i.transport?r.a.DomUtil.get("GProuteTransportCar-"+this._uid).checked=!0:r.a.DomUtil.get("GProuteTransportPedestrian-"+this._uid).checked=!0,r.a.DomUtil.get("GProuteComputationSelect-"+this._uid).selectedIndex="fastest"===i.computation?0:1,this.onRouteComputationSubmit(i)}}}),Hn={advancedSearchFiltersByDefault:{PositionOfInterest:[{name:"category",title:"Type",value:["cimetière","aérodrome","réservoir","administratif","construction linéaire","construction ponctuelle","construction surfacique","cours d'eau","détail hydrographique","détail orographique","équipement de transport","plan d'eau","poste de transformation","terrain de sport","transport par câble","zone d'activité ou d'intérêt","zone d'habitation","lieu-dit non habité"]},{name:"postcode",title:"Code postal"},{name:"citycode",title:"Code INSEE"}],StreetAddress:[{name:"city",title:"Ville"},{name:"postcode",title:"Code postal"},{name:"citycode",title:"Code INSEE"}],CadastralParcel:[{name:"departmentcode",title:"Code département (INSEE)",description:"Code INSEE du département (ex: 01, 94)"},{name:"municipalitycode",title:"Code commune (INSEE)",description:"Code INSEE de la commune : 3 chiffres (ex: 067)"},{name:"oldmunicipalitycode",title:"Commune absorbée",description:"Commune absorbée : 3 chiffres (ex: 000, 001)"},{name:"districtcode",title:"Arrondissement",description:"Arrondissement : 3 chiffres (ex: 004, 012)"},{name:"section",title:"Section",description:"Section Cadastrale : 2 caractères (chiffre et/ou lettre)"},{name:"number",title:"Numéro",description:"Numéro de la parcelle : 4 chiffres (ex: 0041, 0250)"},{name:"sheet",title:"Feuille",description:"Numéro de la feuille cadastrale"}]},zoomToResultsByDefault:function(t){var e=15,i=t.service,n=t.fields,o=t.type,r={1:11,2:12,3:13,4:14,5:15,6:16,7:17,8:17};return"SuggestedLocation"===i&&"PositionOfInterest"===o&&(e=r[n.classification]),"GeocodedLocation"===i&&"PositionOfInterest"===o&&(e=r[n.importance]||14),"StreetAddress"===o&&(e=17),"CadastralParcel"===o&&(e=17),e}},Wn={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPsearchEngine"),t.className="GPwidget",t},_createShowSearchEngineElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowSearchEngine"),t.type="checkbox",t},_createShowSearchEnginePictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowSearchEnginePicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowSearchEngine"),e.title="Afficher/masquer la recherche par lieux",e.addEventListener("click",(function(){document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none";var e=document.getElementById(t._addUID("GPshowAdvancedSearch"));e&&(e.style.display=null,document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none");var i="#GPsearchInput-"+t._uid;document.querySelector(i+" input").disabled=!1,t.onShowSearchEngineClick()}));var i=document.createElement("span");return i.id=this._addUID("GPshowSearchEngineOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createSearchInputElement:function(t){var e=this,i=document.createElement("form");i.id=this._addUID("GPsearchInput"),i.addEventListener("submit",(function(t){return t.preventDefault(),document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="block",document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",e.onGeocodingSearchSubmit(t),!1}));var n=document.createElement("input");n.id=this._addUID("GPsearchInputText"),n.type="text",n.placeholder=t,n.autocomplete="off",n.addEventListener("keyup",(function(t){var i=t.which||t.keyCode;13!==i&&10!==i&&38!==i&&40!==i&&(document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="none",n.value.length>2?document.getElementById(e._addUID("GPautoCompleteList")).style.display="block":document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",e.onAutoCompleteSearchText(t))})),n.addEventListener("keydown",(function(t){var i=t.which||t.keyCode,n=document.getElementById(e._addUID("GPautocompleteResults"));if(n){var o=n.getElementsByClassName("GPautoCompleteProposal current"),r=n.getElementsByClassName("GPautoCompleteProposal"),s=r.length;if(s){var a=null;if(!o.length)return(a=r[0]).className="GPautoCompleteProposal current",a.style.color="#000000",void(a.style["background-color"]="#CEDBEF");a=o[0];var l=parseInt(c.index(a.id),10),u=l===s-1?r[0]:r[l+1],h=0===l?r[s-1]:r[l-1];switch(a.style["background-color"]="",a.style.color="",h.style["background-color"]="",h.style.color="",u.style["background-color"]="",u.style.color="",i){case 38:a.className="GPautoCompleteProposal",h.className="GPautoCompleteProposal current",h.style.color="#000000",h.style["background-color"]="#CEDBEF";break;case 40:a.className="GPautoCompleteProposal",u.className="GPautoCompleteProposal current",u.style.color="#000000",u.style["background-color"]="#CEDBEF";break;case 13:t.preventDefault(),a.click(t)}a.focus()}}})),i.appendChild(n);var o=document.createElement("div");return o.id=this._addUID("GPsearchInputReset"),o.addEventListener("click",(function(){document.getElementById(e._addUID("GPsearchInputText")).value="",document.getElementById(e._addUID("GPautoCompleteList")).style.display="none",document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="none",e.onSearchResetClick()})),i.appendChild(o),i},_createShowAdvancedSearchElement:function(){var t=this,e=document.createElement("div");e.id=this._addUID("GPshowAdvancedSearch"),e.className="GPshowAdvancedToolPicto",e.title="Ouvrir la recherche avancée",e.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!0,document.getElementById(t._addUID("GPautoCompleteList")).style.display="none",document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="none",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="inline-block"}));var i=document.createElement("span");return i.id=this._addUID("GPshowAdvancedSearchOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createAdvancedSearchPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPadvancedSearchPanel"),t.className="GPpanel",t.style.display="none",t},_createGeocodeResultsElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPgeocodeResultsList"),t.className="GPpanel",t.style.display="none",t.appendChild(this._createGeocodeResultsHeaderElement()),t},_createAutoCompleteElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPautoCompleteList"),t.className="GPautoCompleteList",t.style.display="none",t},_createAutoCompleteListElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPautocompleteResults"),e.addEventListener?e.addEventListener("click",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"}),!1):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onAutoCompletedResultsItemClick(e),document.getElementById(t._addUID("GPautoCompleteList")).style.display="none"})),e},_createAutoCompletedLocationElement:function(t,e){var i=document.getElementById(this._addUID("GPautocompleteResults")),n=document.createElement("div");n.id=this._addUID("AutoCompletedLocation_"+e),n.className="GPautoCompleteProposal",n.innerHTML=ln.getSuggestedLocationFreeform(t),n.addEventListener?n.addEventListener("click",(function(t){i.click(t)}),!1):n.attachEvent&&n.attachEvent("onclick",(function(t){i.click(t)})),i.appendChild(n)},_createAdvancedSearchPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Recherche avancée",e.appendChild(i);var n=document.createElement("div");return n.id=this._addUID("GPadvancedSearchClose"),n.className="GPpanelClose",n.title="Fermer la recherche avancée",n.addEventListener?n.addEventListener("click",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"}),!1):n.attachEvent&&n.attachEvent("onclick",(function(){var e="#GPsearchInput-"+t._uid;document.querySelector(e+" input").disabled=!1,document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none",document.getElementById(t._addUID("GPshowAdvancedSearch")).style.display="inline-block",document.getElementById(t._addUID("GPadvancedSearchPanel")).style.display="none"})),e.appendChild(n),e},_createAdvancedSearchPanelFormElement:function(t){var e=this,i=document.createElement("form");i.id=this._addUID("GPadvancedSearchForm"),i.addEventListener("submit",(function(t){t.preventDefault();for(var i=[],n="#GPadvancedSearchFilters-"+e._uid,o=document.querySelectorAll(n+" > div > div > input"),r=0;r<o.length;r++){var s=o[r];i.push({key:s.name,value:s.value})}return e.onGeocodingAdvancedSearchSubmit(t,i),document.getElementById(e._addUID("GPgeocodeResultsList")).style.display="block",!1}));var n=document.createElement("div");n.className="GPflexInput";var o=document.createElement("label");o.className="GPadvancedSearchCodeLabel",o.innerHTML="Recherche par",n.appendChild(o);var r=this._createAdvancedSearchFormCodeElement(t);return n.appendChild(r),i.appendChild(n),i},_createAdvancedSearchFormCodeElement:function(t){var e=this,i=document.createElement("select");i.id=this._addUID("GPadvancedSearchCode"),i.className="GPadvancedSearchCode",i.addEventListener("change",(function(t){e.onGeocodingAdvancedSearchCodeChange(t)}),!1),t||(t=[{id:"PositionOfInterest",title:"Lieux/toponymes"},{id:"StreetAddress",title:"Adresses"},{id:"CadastralParcel",title:"Parcelles cadastrales"}]);for(var n=0;n<t.length;n++){var o=document.createElement("option");o.value=t[n].id,o.text=t[n].title,i.appendChild(o)}return i},_createAdvancedSearchFormInputElement:function(){var t=document.createElement("input");return t.type="submit",t.id=this._addUID("GPadvancedSearchSubmit"),t.className="GPinputSubmit",t.value="Chercher",t},_createAdvancedSearchFormFiltersElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPadvancedSearchFilters"),t},_createAdvancedSearchFiltersTableElement:function(t,e){var i=document.createElement("div");return i.id=this._addUID(t),e||(i.style.display="none"),i},_createAdvancedSearchFiltersAttributElement:function(t){var e=null,i=t.name,n=t.title,o=t.description,r=t.code,s=t.value,a=document.createElement("div");a.className="GPflexInput";var l=document.createElement("label");l.className="GPadvancedSearchFilterLabel",l.htmlFor=i,l.title=o||n,l.innerHTML=n,a.appendChild(l);var c=document.createElement("input");if(c.id=i,c.className="GPadvancedSearchFilterInput",c.type="text",c.name=i,s)if(Array.isArray(s)){var u=i+"_list";c.setAttribute("list",u);var h=document.createElement("datalist");h.id=u;for(var d=0;d<s.length;++d){var p=document.createElement("option");p.value=s[d],h.appendChild(p)}a.appendChild(h)}else c.value=s;return a.appendChild(c),(e=document.getElementById(this._addUID(r)))?e.appendChild(a):e=a,e},_createGeocodeResultsHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.className="GPpanelTitle",i.innerHTML="Résultats de la recherche",e.appendChild(i);var n=document.createElement("div");return n.id=this._addUID("GPgeocodeResultsClose"),n.className="GPpanelClose",n.title="Fermer la fenêtre de résultats",n.addEventListener?n.addEventListener("click",(function(){document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"}),!1):n.attachEvent&&n.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"})),e.appendChild(n),e},_createGeocodeResultsListElement:function(){var t=this,e=document.createElement("div");return e.id=this._addUID("GPgeocodeResults"),e.addEventListener?e.addEventListener("click",(function(e){e.ctrlKey||(document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"),t.onGeocodedResultsItemClick(e)}),!1):e.attachEvent&&e.attachEvent("onclick",(function(e){e.ctrlKey||(document.getElementById(t._addUID("GPgeocodeResultsList")).style.display="none"),t.onGeocodedResultsItemClick(e)})),e},_createGeocodedLocationElement:function(t,e){var i=document.getElementById(this._addUID("GPgeocodeResults")),n=document.createElement("div");n.id=this._addUID("GeocodedLocation_"+e),n.className="GPautoCompleteProposal",n.innerHTML="string"==typeof t?t:ln.getGeocodedLocationFreeform(t),i.appendChild(n)}};function Vn(t){return(Vn="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)}var Yn={detectSupport:function(){var t=!0,e=window.navigator.userAgent.toLowerCase();return-1===e.indexOf("iphone")&&-1===e.indexOf("ipod")&&-1===e.indexOf("ipad")&&-1===e.indexOf("android")&&-1===e.indexOf("mobile")&&-1===e.indexOf("blackberry")&&-1===e.indexOf("tablet")&&-1===e.indexOf("phone")&&-1===e.indexOf("touch")||(t=!1),-1===e.indexOf("msie")&&-1===e.indexOf("trident")||(t=!0),t},assign:function(t,e){for(var i in t=t||{},e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},mergeParams:function(t,e,i){if(void 0!==t&&void 0!==e)for(var n in void 0===i&&(i=!0),e)e.hasOwnProperty(n)&&("object"===Vn(e[n])?t.hasOwnProperty(n)?this.mergeParams(t[n],e[n],i):t[n]=e[n]:t.hasOwnProperty(n)?i&&(t[n]=e[n]):t[n]=e[n])}},Xn=l.getLogger("searchengine"),Zn=r.a.Control.extend({includes:Wn,options:{position:"topleft",collapsed:!0,displayInfo:!0,zoomTo:"",resources:[],placeholder:"Rechercher un lieu, une adresse",displayMarker:!0,markerStyle:"blue",displayAdvancedSearch:!0,advancedSearch:{},geocodeOptions:{},autocompleteOptions:{serviceOptions:{},triggerGeocode:!1,triggerDelay:1e3}},initialize:function(t){r.a.Util.setOptions(this,t),void 0===this.options.resources&&(this.options.resources={}),void 0!==this.options.resources.geocode&&""!==this.options.resources.geocode||(this.options.resources.geocode="location"),void 0!==this.options.resources.autocomplete&&0!==this.options.resources.autocomplete.length||(this.options.resources.autocomplete=["PositionOfInterest","StreetAddress"]),this._uid=c.generate(),this._showContainer=null,this._pictoContainer=null,this._inputContainer=null,this._suggestedContainer=null,this._suggestedLocations=[],this._geocodedContainer=null,this._geocodedLocations=[],this._filterContainer=null,this._currentGeocodingCode=null,this._currentGeocodingLocation=null,this._advancedSearchFilters={},this._advancedSearchCodes=[],this._marker=null,this._triggerHandler=null},onAdd:function(){this._initAdvancedSearchCodes(),this._initAdvancedSearchFilters();var t=this._initLayout();return r.a.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),t},onRemove:function(t){this._clearSuggestedLocation(),this._clearGeocodedLocation(),null!=this._marker&&(t.removeLayer(this._marker),this._marker=null)},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowSearchEngineElement();t.appendChild(e),this.options.collapsed||(e.checked="true");var i=this._pictoContainer=this._createShowSearchEnginePictoElement();t.appendChild(i);var n=this._createSearchInputElement(this.options.placeholder);if(t.appendChild(n),this.options.displayAdvancedSearch){var o=this._createShowAdvancedSearchElement();t.appendChild(o);var r=this._createAdvancedSearchPanelElement(),s=this._createAdvancedSearchPanelHeaderElement(),a=this._createAdvancedSearchPanelFormElement(this._advancedSearchCodes),l=this._filterContainer=this._createAdvancedSearchFormFiltersElement();this._setFilter(this._advancedSearchCodes[0].id);var c=this._createAdvancedSearchFormInputElement();a.appendChild(l),a.appendChild(c),r.appendChild(s),r.appendChild(a),t.appendChild(r)}var u=this._createAutoCompleteElement(),h=this._suggestedContainer=this._createAutoCompleteListElement();u.appendChild(h),t.appendChild(u);var d=this._createGeocodeResultsElement(),p=this._geocodedContainer=this._createGeocodeResultsListElement();return d.appendChild(p),t.appendChild(d),t},_initAdvancedSearchCodes:function(){var t=this.options.resources.geocode;"location"===t&&(t=["PositionOfInterest","StreetAddress","CadastralParcel"]),Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)switch(t[e]){case"PositionOfInterest":this._advancedSearchCodes.push({id:"PositionOfInterest",title:"Lieux/toponymes"});break;case"StreetAddress":this._advancedSearchCodes.push({id:"StreetAddress",title:"Adresses"});break;case"CadastralParcel":this._advancedSearchCodes.push({id:"CadastralParcel",title:"Parcelles cadastrales"})}0===this._advancedSearchCodes.length&&(this._advancedSearchCodes=[{id:"StreetAddress",title:"Adresses"},{id:"PositionOfInterest",title:"Lieux/toponymes"},{id:"CadastralParcel",title:"Cadastre"}]),Xn.log("advancedSearchCodes",this._advancedSearchCodes)},_initAdvancedSearchFilters:function(){this._advancedSearchFilters=Hn.advancedSearchFiltersByDefault;var t=this.options.advancedSearch;Yn.assign(this._advancedSearchFilters,t),Xn.log("advancedSearchFilters",this._advancedSearchFilters)},_setFilter:function(t){for(var e=this._filterContainer,i=!1,n=0;n<this._advancedSearchCodes.length;n++)if(this._advancedSearchCodes[n].id===t){i=!0;break}if(i){for(this._currentGeocodingCode=t;e.firstChild;)e.removeChild(e.firstChild);var o=this._advancedSearchFilters[t];if(o&&0!==o.length){for(var r=this._createAdvancedSearchFiltersTableElement(t,!0),s=0;s<o.length;s++){var a=this._createAdvancedSearchFiltersAttributElement(o[s]);r.appendChild(a)}return e.appendChild(r),e}}else for(;e.firstChild;)e.removeChild(e.firstChild)},_requestAutoComplete:function(t){if(t&&0!==Object.keys(t).length&&t.text){Xn.log(t);var e={};r.a.Util.extend(e,this.options.autocompleteOptions.serviceOptions),r.a.Util.extend(e,t),r.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),r.a.Util.extend(e,{ssl:this.options.ssl}),Xn.log(e),an.Services.autoComplete(e)}},_fillAutoCompletedLocationListContainer:function(t){if(t&&0!==t.length){var e=this._suggestedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var i=0;i<t.length;i++)this._createAutoCompletedLocationElement(t[i],i)}},_requestGeocoding:function(t){if(t&&0!==Object.keys(t).length&&null!==t.query){Xn.log(t);var e={};r.a.Util.extend(e,this.options.geocodeOptions),r.a.Util.extend(e,t);var i=this.options.resources.geocode;i&&(e.index||(e.index=i)),r.a.Util.extend(e,{apiKey:e.apiKey||this.options.apiKey}),r.a.Util.extend(e,{ssl:this.options.ssl}),Xn.log(e),an.Services.geocode(e)}},_fillGeocodedLocationListContainer:function(t){if(t&&0!==t.length){var e=this._geocodedContainer;if(e.childElementCount)for(;e.firstChild;)e.removeChild(e.firstChild);for(var i=0;i<t.length;i++)Xn.log(t[i]),this._createGeocodedLocationElement(t[i],i);this._geocodedLocations=t}else this._clearGeocodedLocation()},_getGeocodeCoordinatesFromFullText:function(t,e){var i=ln.getSuggestedLocationFreeform(t),n=this;this._requestGeocoding({query:i,onSuccess:function(t){Xn.log("request from Geocoding (coordinates null)",t),t.locations&&0!==t.locations.length&&t.locations[0].position&&n._suggestedLocations&&n._suggestedLocations[e]&&(n._suggestedLocations[e].position={lat:t.locations[0].position.y,lon:t.locations[0].position.x},n._locationsToBeDisplayed.unshift(n._suggestedLocations[e]),n._fillAutoCompletedLocationListContainer(n._locationsToBeDisplayed))},onFailure:function(){n._suggestedLocations&&n._suggestedLocations[e]&&n._createAutoCompletedLocationElement(n._suggestedLocations[e],e)}})},_setLabel:function(t){r.a.DomUtil.get("GPsearchInputText-"+this._uid).value=t||""},_setPosition:function(t,e){var i=this._map;i.setZoomAround(r.a.latLng(t),e,!0),i.panTo(r.a.latLng(t))},_getZoom:function(t){var e=this._map,i=this.options.zoomTo,n=null;if("function"==typeof i&&(Xn.trace("zoom function"),n=i.call(this,t)),"number"==typeof i&&(Xn.trace("zoom level"),n=i),"string"==typeof i)if("auto"===i)Xn.trace("zoom auto"),n=Hn.zoomToResultsByDefault(t);else{Xn.trace("zoom level parsing");var o=parseInt(i,10);isNaN(o)||(Xn.trace("zoom parsing"),n=o)}Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n&&""!==n&&Number.isInteger(n)||(Xn.trace("zoom not found, current zoom..."),n=e.getZoom());var r=e.getMinZoom(),s=e.getMaxZoom();return n<r&&(Xn.trace("zoom level min..."),n=r),n>s&&(Xn.trace("zoom level max..."),n=s),Xn.trace("zoom",n),n},_setMarker:function(t,e,i,n){var o=this._map;if(null!=this._marker&&(o.removeLayer(this._marker),this._marker=null),t){var s=null;"string"==typeof n?s=new pn(n):n instanceof r.a.Icon?s=n:(s=new pn("blue"),Xn.log("Utilisation du marker par défaut !"));var a={clickable:!0,zIndexOffset:1e3,icon:s};if(this._marker=r.a.marker(r.a.latLng(t),a),this._marker.addTo(o),i){var l=null;if("string"!=typeof e)if("GeocodedLocation"===e.service){l="<ul>";var c=e.location.placeAttributes;for(var u in c)c.hasOwnProperty(u)&&"trueGeometry"!==u&&"extraFields"!==u&&"houseNumberInfos"!==u&&"_count"!==u&&(l+="<li>",l+='<span class="gp-attname-others-span">'+u.toUpperCase()+" : </span>",l+=c[u],l+=" </li>");l+=" </ul>"}else l="SuggestedLocation"===e.service?ln.getSuggestedLocationFreeform(e.location):"sans informations.";else l=e;this._marker.bindPopup(l)}}},_clearResults:function(){this._currentGeocodingLocation=null,this._clearSuggestedLocation(),this._clearGeocodedLocation(),this._setMarker()},_clearSuggestedLocation:function(){if(this._suggestedLocations=[],this._suggestedContainer)for(;this._suggestedContainer.firstChild;)this._suggestedContainer.removeChild(this._suggestedContainer.firstChild)},_clearGeocodedLocation:function(){if(this._geocodedLocations=[],this._geocodedContainer)for(;this._geocodedContainer.firstChild;)this._geocodedContainer.removeChild(this._geocodedContainer.firstChild)},onShowSearchEngineClick:function(){},onSearchResetClick:function(){this._clearResults()},onAutoCompleteSearchText:function(t){var e=t.target.value;if(e&&(this._currentGeocodingLocation=e,!(e.length<3))){var i=this.options.autocompleteOptions.triggerGeocode,n=this.options.autocompleteOptions.triggerDelay,o=this;this._requestAutoComplete({text:e,onSuccess:function(t){if(Xn.log("request from AutoComplete",t),t){o._suggestedLocations=t.suggestedLocations,o._locationsToBeDisplayed=[];for(var e=0;e<o._suggestedLocations.length;e++){var i=o._suggestedLocations[e];i.position&&0===i.position.x&&0===i.position.y&&i.fullText?o._getGeocodeCoordinatesFromFullText(i,e):o._locationsToBeDisplayed.push(i)}o._fillAutoCompletedLocationListContainer(o._locationsToBeDisplayed),o._triggerHandler&&(clearTimeout(o._triggerHandler),o._triggerHandler=null,Xn.warn("Cancel a geocode request !"))}},onFailure:function(t){o._clearSuggestedLocation(),Xn.log(t.message),"No suggestion matching the search"===t.message&&i&&(o._triggerHandler&&(clearTimeout(o._triggerHandler),Xn.warn("Cancel the last geocode request !")),o._triggerHandler=setTimeout((function(){Xn.warn("Launch a geocode request (code postal) !"),o._requestGeocoding({query:e,onSuccess:function(t){if(Xn.log("request from Geocoding",t),t){o._locationsToBeDisplayed=[];for(var e=t.locations,i=0;i<e.length;i++){var n=e[i];n.fullText=ln.getGeocodedLocationFreeform(n),n.position={x:n.position.lon,y:n.position.lat},o._locationsToBeDisplayed.push(n)}o._fillAutoCompletedLocationListContainer(e)}},onFailure:function(t){Xn.log(t.message)}})}),n))}})}},onAutoCompletedResultsItemClick:function(t){var e=c.index(t.target.id),i=t.target.innerHTML;if(Xn.log(e,i),Xn.log(this._locationsToBeDisplayed[e]),e){var n={lat:this._locationsToBeDisplayed[e].position.y,lon:this._locationsToBeDisplayed[e].position.x},o={service:"SuggestedLocation",location:this._locationsToBeDisplayed[e]},r=this._getZoom(o);this._setLabel(i),this._setPosition(n,r),this.options.displayMarker&&this._setMarker(n,o,this.options.displayInfo,this.options.markerStyle),this.fire("searchengine:autocomplete:click",{data:this._locationsToBeDisplayed[e]})}},onGeocodingSearchSubmit:function(t){Xn.log(t);var e=t.target[0].value;if(e){this._currentGeocodingLocation=e;var i=this;this._requestGeocoding({query:e,onSuccess:function(t){if(Xn.log("request from Geocoding",t),t){var e=t.locations;i._fillGeocodedLocationListContainer(e)}},onFailure:function(t){i._clearGeocodedLocation(),Xn.log(t.message)}})}},onGeocodedResultsItemClick:function(t){var e=c.index(t.target.id),i=t.target.innerHTML;if(Xn.log(e,i),Xn.log(this._geocodedLocations[e]),e){var n=this._geocodedLocations[e].position,o={service:"GeocodedLocation",location:this._geocodedLocations[e]},r=this._getZoom(o);this._setLabel(i),this._setPosition(n,r),this.options.displayMarker&&this._setMarker(n,o,this.options.displayInfo,this.options.markerStyle),this.fire("searchengine:geocode:click",{data:this._geocodedLocations[e]})}},onGeocodingAdvancedSearchCodeChange:function(t){Xn.log(t);var e=t.target.selectedIndex,i=t.target.options[e].value;i&&this._setFilter(i)},onGeocodingAdvancedSearchSubmit:function(t,e){if(Xn.log(e),e&&0!==e.length){for(var i=this._currentGeocodingCode,n=r.a.DomUtil.get("GPsearchInputText-"+this._uid).value,o={},s=0;s<e.length;s++){var a=e[s];a.value&&("section"===a.key&&(a.value=a.value.toUpperCase()),o[a.key]=a.value)}var l=this;this._requestGeocoding({query:n,index:i,filters:o,onSuccess:function(t){if(Xn.log(t),t){var e=t.locations;l._fillGeocodedLocationListContainer(e)}},onFailure:function(t){l._clearGeocodedLocation(),Xn.log(t.message)}})}},setText:function(t,e,i){this._showContainer.checked||this._pictoContainer.click(),r.a.Util.extend(this.options,i);var n=r.a.DomUtil.get("GPsearchInputText-"+this._uid);(n.value=t,e)?r.a.DomUtil.get("GPsearchInput-"+this._uid).dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0})):n.dispatchEvent(new KeyboardEvent("keyup"))}});r.a.extend(Zn.prototype,r.a.Evented.prototype);var Kn=Zn,Qn={_addUID:function(t){return this._uid?t+"-"+this._uid:t},_createMainContainerElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPelevationPath"),t.className="GPwidget",t},_createShowElevationPathElement:function(){var t=document.createElement("input");return t.id=this._addUID("GPshowElevationPath"),t.type="checkbox",t},_createShowElevationPathPictoElement:function(){var t=this,e=document.createElement("label");e.id=this._addUID("GPshowElevationPathPicto"),e.className="GPshowAdvancedToolPicto",e.htmlFor=this._addUID("GPshowElevationPath"),e.title="Calculer un profil",e.addEventListener?e.addEventListener("click",(function(e){t.onShowElevationPathClick(e)})):e.attachEvent&&e.attachEvent("onclick",(function(e){t.onShowElevationPathClick(e)}));var i=document.createElement("span");return i.id=this._addUID("GPshowElevationPathOpen"),i.className="GPshowAdvancedToolOpen",e.appendChild(i),e},_createElevationPathPanelElement:function(){var t=document.createElement("div");return t.id=this._addUID("GPelevationPathPanel"),t.className="GPpanel",t},_createElevationPathPanelHeaderElement:function(){var t=this,e=document.createElement("div");e.className="GPpanelHeader";var i=document.createElement("div");i.id=this._addUID("GPelevationPathPanelInfo"),i.className="GPpanelInfo",i.title="Informations",i.addEventListener?i.addEventListener("click",(function(){t.onOpenElevationPathInfoClick()})):i.attachEvent&&i.attachEvent("onclick",(function(){t.onOpenElevationPathInfoClick()})),e.appendChild(i);var n=document.createElement("div");n.className="GPpanelTitle",n.innerHTML="Profil Altimétrique",e.appendChild(n);var o=document.createElement("div");o.id=this._addUID("GPelevationPathPanelReduce"),o.className="GPpanelReduce",o.title="Masquer le panneau",o.addEventListener?o.addEventListener("click",(function(){"function"==typeof t.onReduceElevationPathPanelClick&&(document.getElementById(t._addUID("GPshowElevationPath")).checked=!1,t.onReduceElevationPathPanelClick())}),!1):o.attachEvent&&o.attachEvent("onclick",(function(){"function"==typeof t.onReduceElevationPathPanelClick&&(document.getElementById(t._addUID("GPshowElevationPath")).checked=!1,t.onReduceElevationPathPanelClick())})),e.appendChild(o);var r=document.createElement("div");return r.id=this._addUID("GPelevationPathPanelClose"),r.className="GPpanelClose",r.title="Fermer le panneau",r.addEventListener?r.addEventListener("click",(function(){document.getElementById(t._addUID("GPshowElevationPathPicto")).click()}),!1):r.attachEvent&&r.attachEvent("onclick",(function(){document.getElementById(t._addUID("GPshowElevationPathPicto")).click()})),e.appendChild(r),e},_createElevationPathPanelProfilElement:function(){var t=document.createElement("div");return t.id="GPelevationPathProfil",t},_createElevationPathWaitingElement:function(){var t=document.createElement("div");t.id=this._addUID("GPelevationPathCalcWaitingContainer"),t.className="GPelevationPathCalcWaitingContainerHidden";var e=document.createElement("p");return e.className="GPelevationPathCalcWaiting",e.innerHTML="Calcul en cours...",t.appendChild(e),t},_createElevationPathInformationsElement:function(){var t=document.createElement("div");t.id=this._addUID("GPelevationPathInformationsContainer"),t.className="GPelevationPathInformationsContainerHidden";var e=document.createElement("p");return e.className="GPelevationPathInformations",e.innerHTML="Aucune information...",t.appendChild(e),t},_addElevationPathInformationsItem:function(t){var e=document.getElementById(this._addUID("GPelevationPathInformationsContainer"));if(e){var i=document.createElement("p");i.className="GPelevationPathInformations",i.innerHTML=t,e.appendChild(i)}return e}},Jn={_getCssProperty:function(t,e){return window.getComputedStyle(t,null).getPropertyValue(e)},_getTextWidth:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.canvas||(this.canvas=document.createElement("canvas")),o=n.getContext("2d");o.font=null===i?"".concat(this._getCssProperty(e,"font-weight")," ").concat(this._getCssProperty(e,"font-size")," ").concat(this._getCssProperty(e,"font-family")):i;var r=o.measureText(t);return r.width},_dataZToSvgY:function(t,e,i,n){return e-(t-i)*n-.5},_dataDistToSvgX:function(t,e,i,n){return e-i+t*n},_svgXToDataDist:function(t,e,i,n){return(t+i-e)/n},_arrayBisect:function(t,e){var i;if(0===t.length)return 0;for(i=0;i<t.length;i++)if(e<t[i].dist)return i;return i-1},displayProfileByDefault:function(t,e,i,n){var o=i;if(e&&t){for(;e.firstChild;)e.removeChild(e.firstChild);var r=25,s=15,a=10,l=10,c=o.options.displayProfileOptions,u=t.points,h=JSON.parse(JSON.stringify(u));h.sort((function(t,e){return t.z-e.z}));var d=h[0].z,p=h[h.length-1].z,m=t.distance,f="m",g=document.createElement("div");g.id="profileElevationByDefault",e.appendChild(g);var _=window.getComputedStyle(e).getPropertyValue("width").replace(/px/,""),v=window.getComputedStyle(e).getPropertyValue("height").replace(/px/,""),y=v-r-a,E=_-l-s,w=this._getTextWidth(Math.round(p).toLocaleString()+",88",e,"400 10 Verdana"),b=this._getTextWidth(Math.round(m).toLocaleString()+",5",e),C=y-17-15,M=E-17-w,P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.id="profileElevationByDefaultSvg",P.setAttribute("style","display: block; margin: auto; overflow: visible; position: absolute; left: 10px;"),P.setAttribute("viewBox","0 0 ".concat(_," ").concat(v)),P.setAttribute("width","100%"),P.setAttribute("height","100%");var L,S=Math.floor(C/15);L=p===d?.1:Math.pow(10,Math.ceil(Math.log((p-d)/S)/Math.log(10)))/2;var x=Math.floor(d/L)*L,I=Math.ceil(p/L)*L;I===p&&(I+=L),x=Math.round(100*x)/100,I=Math.round(100*I)/100;var T=Math.round((I-x)/L);T+1>S&&(L=Math.pow(10,Math.ceil(Math.log((p-d)/S)/Math.log(10))),x=Math.floor(d/L)*L,(I=Math.ceil(p/L)*L)===p&&(I+=L),x=Math.round(100*x)/100,I=Math.round(100*I)/100,T=Math.floor((I-x)/L)),T=Math.max(Math.round(T),1);var G=document.createElementNS("http://www.w3.org/2000/svg","g");G.setAttribute("class","profile-z-vertical");var R,D,k,A,N,O,U,j=document.createElementNS("http://www.w3.org/2000/svg","g"),F=C/T;R=p===d?C/.2:C/(I-x);for(var q=0;q<=T;q++)(D=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-z-graduation"),D.setAttribute("font-family","Verdana"),D.setAttribute("font-size","10px"),D.setAttribute("fill","#5E5E5E"),D.textContent=(Math.round(100*(x+q*L))/100).toLocaleString(),k=C-q*F,D.setAttribute("transform","translate(".concat(17+w-8,", ").concat(k+5,")")),D.setAttribute("text-anchor","end"),G.appendChild(D),A=Math.round(k)-.5,N=document.createElementNS("http://www.w3.org/2000/svg","g"),(O=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),O.setAttribute("stroke-width","1"),0!==q?O.setAttribute("stroke-opacity","0.2"):O.setAttribute("stroke-opacity","1"),O.setAttribute("stroke","#000000"),O.setAttribute("fill","none"),O.setAttribute("d","M".concat(17+w,",").concat(A," L").concat(M+17+w,",").concat(A)),(U=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),U.setAttribute("stroke-width","1"),U.setAttribute("stroke-opacity","1"),U.setAttribute("stroke","#000000"),U.setAttribute("fill","none"),U.setAttribute("d","M".concat(17+w,",").concat(A," L").concat(17+w+5,",").concat(A)),U.setAttribute("transform","translate(-5, 0)"),N.appendChild(U),N.appendChild(O),j.appendChild(N);var B=document.createElementNS("http://www.w3.org/2000/svg","text");B.setAttribute("class","profile-z-legend"),B.setAttribute("font-family","Verdana"),B.setAttribute("font-size","11px"),B.setAttribute("fill","#5E5E5E"),B.textContent="Altitude (m)",B.setAttribute("transform","translate(".concat(9,", ").concat(Math.round(C/2),") rotate(-90)")),B.setAttribute("text-anchor","middle"),G.appendChild(B),P.appendChild(G),P.appendChild(j),m>2e3&&(m/=1e3,f="km");var z=Math.floor(M/b),H=Math.pow(10,Math.ceil(Math.log(m/z)/Math.log(10)))/2,W=m,V=Math.floor(W/H);V>z?(H=Math.pow(10,Math.ceil(Math.log(m/z)/Math.log(10))),V=Math.floor(W/H)):V<1&&(H=Math.pow(10,Math.ceil(Math.log(m/z)/Math.log(10))-1),V=Math.floor(W/H));var Y=H*(V=Math.max(V,1)),X=document.createElementNS("http://www.w3.org/2000/svg","g");X.setAttribute("class","profile-x-vertical");for(var Z,K,Q,J,$,tt,et=document.createElementNS("http://www.w3.org/2000/svg","g"),it=M/W,nt=(W-Y)*it,ot=Math.round((M-nt)/V),rt=0;rt<=V+1;rt++)(Z=document.createElementNS("http://www.w3.org/2000/svg","text")).setAttribute("class","profile-x-graduation"),Z.setAttribute("font-family","Verdana"),Z.setAttribute("font-size","10px"),Z.setAttribute("fill","#5E5E5E"),rt!==V+1&&(Z.textContent=(Math.round(100*rt*H)/100).toLocaleString()),K=17+w+rt*ot,rt===V+1&&(K=17+w+M),Z.setAttribute("transform","translate(".concat(K,", ").concat(C+15+5,")")),Z.setAttribute("text-anchor","middle"),X.appendChild(Z),Q=K-.5,J=document.createElementNS("http://www.w3.org/2000/svg","g"),($=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),$.setAttribute("stroke-width","1"),0!==rt?$.setAttribute("stroke-opacity","0.2"):$.setAttribute("stroke-opacity","1"),$.setAttribute("stroke","#000000"),$.setAttribute("fill","none"),$.setAttribute("d","M".concat(Q,",").concat(C," L").concat(Q,",0")),(tt=document.createElementNS("http://www.w3.org/2000/svg","path")).setAttribute("cs","100,100"),tt.setAttribute("stroke-width","1"),tt.setAttribute("stroke-opacity","1"),tt.setAttribute("stroke","#000000"),tt.setAttribute("fill","none"),tt.setAttribute("d","M".concat(Q,",").concat(C," L").concat(Q,",").concat(C-5)),tt.setAttribute("transform","translate(0, 5)"),J.appendChild(tt),J.appendChild($),et.appendChild(J);var st=document.createElementNS("http://www.w3.org/2000/svg","text");st.setAttribute("class","profile-x-legend"),st.setAttribute("font-family","Verdana"),st.setAttribute("font-size","11px"),st.setAttribute("fill","#5E5E5E"),st.textContent="Distance (".concat(f,")"),st.setAttribute("transform","translate(".concat(17+w+M/2,", ").concat(C+15+17+3,")")),st.setAttribute("text-anchor","middle"),X.appendChild(st),P.appendChild(X),P.appendChild(et);var at=document.createElementNS("http://www.w3.org/2000/svg","g"),lt=1;"km"===f&&(lt=1e3);for(var ct=this._dataDistToSvgX(u[0].dist/lt,E,M,it),ut=this._dataZToSvgY(u[0].z,C,x,R),ht="M".concat(ct,",").concat(ut),dt=1;dt<u.length;dt++)ct=this._dataDistToSvgX(u[dt].dist/lt,E,M,it),ut=this._dataZToSvgY(u[dt].z,C,x,R),ht+=" L".concat(ct,",").concat(ut);var pt=document.createElementNS("http://www.w3.org/2000/svg","path");pt.setAttribute("cs","100,100"),pt.setAttribute("stroke-width","1"),pt.setAttribute("stroke-opacity","1"),pt.setAttribute("stroke","#0B6BA7"),pt.setAttribute("fill","none"),pt.setAttribute("d",ht),ht+=" L".concat(ct,",").concat(C),ht+=" L".concat(E-M,",").concat(C);var mt=document.createElementNS("http://www.w3.org/2000/svg","path");mt.setAttribute("cs","100,100"),mt.setAttribute("stroke-width","1"),mt.setAttribute("stroke-opacity","0"),mt.setAttribute("stroke","#000000"),mt.setAttribute("fill","#00B798"),mt.setAttribute("fill-opacity","0.4"),mt.setAttribute("d",ht),at.appendChild(pt),at.appendChild(mt),P.appendChild(at);var ft=document.createElementNS("http://www.w3.org/2000/svg","g"),gt=document.createElementNS("http://www.w3.org/2000/svg","rect");gt.setAttribute("width",M),gt.setAttribute("height",C),gt.setAttribute("transform","translate(".concat(E-M,",0)")),gt.setAttribute("visibility","hidden"),gt.setAttribute("pointer-events","all");var _t=JSON.parse(JSON.stringify(u));_t.sort((function(t,e){return t.dist-e.dist}));var vt=document.createElementNS("http://www.w3.org/2000/svg","line");vt.setAttribute("id","focusLineX"),vt.setAttribute("class","focusLine-default"),vt.setAttribute("fill","none"),vt.setAttribute("stroke","#F90"),vt.setAttribute("stroke-width","0.5px"),vt.setAttribute("visibility","hidden");var yt=document.createElementNS("http://www.w3.org/2000/svg","line");yt.setAttribute("id","focusLineY"),yt.setAttribute("class","focusLine-default"),yt.setAttribute("fill","none"),yt.setAttribute("stroke","#F90"),yt.setAttribute("stroke-width","0.5px"),yt.setAttribute("visibility","hidden");var Et=document.createElementNS("http://www.w3.org/2000/svg","circle");Et.setAttribute("id","focusCircle"),Et.setAttribute("r",4),Et.setAttribute("class","circle-default focusCircle-default"),Et.setAttribute("fill","#F90"),Et.setAttribute("visibility","hidden"),ft.appendChild(Et),ft.appendChild(vt),ft.appendChild(yt);var wt=document.createElementNS("http://www.w3.org/2000/svg","text"),bt=document.createElementNS("http://www.w3.org/2000/svg","tspan"),Ct=document.createElementNS("http://www.w3.org/2000/svg","tspan"),Mt=document.createElementNS("http://www.w3.org/2000/svg","tspan");wt.setAttribute("style","text-align:center; max-width:220px; font-size:10px; color:#000000; font-family:Verdana; z-index:50;"),wt.style.pointerEvents="none",wt.style.position="fixed",wt.setAttribute("class","tooltipInit"),wt.setAttribute("text-anchor","middle"),g.appendChild(wt),bt.setAttribute("class","altiPathValue"),bt.setAttribute("x","0"),bt.setAttribute("dy","-.7em"),Ct.setAttribute("class","altiPathValue"),Ct.setAttribute("x","0"),Ct.setAttribute("dy","1em"),Mt.setAttribute("class","altiPathCoords"),Mt.setAttribute("x","0"),Mt.setAttribute("dy","1em"),wt.appendChild(bt),c.currentSlope&&wt.appendChild(Ct),wt.appendChild(Mt);var Pt=document.createElementNS("http://www.w3.org/2000/svg","g");ft.appendChild(Pt);var Lt=document.createElementNS("http://www.w3.org/2000/svg","path");Lt.setAttribute("cs","100,100"),Lt.setAttribute("fill","#FFFFFF"),Lt.setAttribute("stroke","#CCCCCC"),Lt.setAttribute("fill-opacity","0.8"),Lt.setAttribute("stroke-width","1"),Lt.setAttribute("stroke-opacity","1");var St=document.createElementNS("http://www.w3.org/2000/svg","path");return St.setAttribute("cs","100,100"),St.setAttribute("fill","#FFFFFF"),St.setAttribute("stroke","#000000"),St.setAttribute("fill-opacity","0"),St.setAttribute("stroke-width","1"),St.setAttribute("stroke-opacity","0.4"),St.setAttribute("transform","translate(1,1)"),Pt.appendChild(St),Pt.appendChild(Lt),Pt.appendChild(wt),Pt.setAttribute("class","tooltipInit"),Pt.style.pointerEvents="none",gt.addEventListener("pointerover",(function(){vt.setAttribute("visibility","visible"),yt.setAttribute("visibility","visible"),Et.setAttribute("visibility","visible"),n.__createProfileMarker(o,u[0]),wt.setAttribute("class","tooltipFadeIn"),Pt.setAttribute("class","tooltipFadeIn")})),gt.addEventListener("pointerout",(function(){vt.setAttribute("visibility","hidden"),yt.setAttribute("visibility","hidden"),Et.setAttribute("visibility","hidden"),n.__removeProfileMarker(o),wt.setAttribute("class","tooltipFadeOut"),Pt.setAttribute("class","tooltipFadeOut")})),gt.addEventListener("pointermove",function(t){var e=P.createSVGPoint();e.x=t.clientX,e.y=t.clientY;var i=e.matrixTransform(P.getScreenCTM().inverse()),r=this._svgXToDataDist(i.x,E,M,it)*lt,s=Math.max(1,this._arrayBisect(_t,r)),a=u[s-1],l=u[s],c=a;r-a.dist>l.dist-r&&(c=l);var h=this._dataDistToSvgX(c.dist/lt,E,M,it),d=this._dataZToSvgY(c.z,C,x,R);Et.setAttribute("cx",h),Et.setAttribute("cy",d),vt.setAttribute("x1",h),vt.setAttribute("y1",C),vt.setAttribute("x2",h),vt.setAttribute("y2",0),yt.setAttribute("x1",17+w),yt.setAttribute("y1",d),yt.setAttribute("x2",M+17+w),yt.setAttribute("y2",d),n.__updateProfileMarker(o,c);var p="Altitude : ".concat(c.z.toLocaleString()," m"),f="Pente : ".concat(c.slope," %"),g="(lat : ".concat(c.lat.toLocaleString()," / lon : ").concat(c.lon.toLocaleString(),")");bt.innerHTML=p,Ct.innerHTML=f,Mt.innerHTML=g;var _,v=Math.max(this._getTextWidth(g,Mt),this._getTextWidth(p,bt));c.dist>m*lt/2?(_="M -0.5 -0.5 l -6 6 l 0 16 l -".concat(v+10," 0 l 0 -44 l ").concat(v+10," 0 l 0 16 l 6 6"),wt.setAttribute("transform","translate(".concat(-(v/2+12),",0)"))):c.dist<=m*lt/2&&(_="M -0.5 -0.5 l 6 6 l 0 16 l ".concat(v+10," 0 l 0 -44 l -").concat(v+10," 0 l 0 16 l -6 6"),wt.setAttribute("transform","translate(".concat(v/2+12,",0)"))),Lt.setAttribute("d",_),St.setAttribute("d",_),Pt.setAttribute("transform","translate(".concat(h,",").concat(d,")")),Pt.style.transform="translate(".concat(h,"px,").concat(d,"px)")}.bind(this)),ft.appendChild(gt),P.appendChild(ft),g.appendChild(P),e}},displayProfileRaw:function(t,e,i,n){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);var o=t&&t.points?t.points:{},r=document.createElement("textarea");return r.id="profilElevationResults",r.rows=10,r.cols=50,r.style.width="100%",r.innerHTML=JSON.stringify(o,void 0,4),r.addEventListener("mouseover",(function(t){n.__customRawProfileMouseOverEvent(i,t)})),e.appendChild(r),e}},displayProfileLibD3:function(t,e,i,n){var o=i;if(e&&t){for(;e.firstChild;)e.removeChild(e.firstChild);var r=t.points;if(t.distance>2e3){t.unit="km";for(var s=0;s<r.length;s++)r[s].dist/=1e3}var a=o.options.displayProfileOptions,l=20,c=20,u=30,h=40,d=window.getComputedStyle(e).getPropertyValue("width"),p=window.getComputedStyle(e).getPropertyValue("height"),m=d.replace(/px/,"")-h-c,f=p.replace(/px/,"")-l-u,g=d3.scale.linear().range([0,m]),_=d3.scale.linear().range([f,0]),v=d3.svg.axis().scale(g).orient("bottom").ticks(5),y=d3.svg.axis().scale(_).orient("left").ticks(5),E=d3.svg.line().interpolate("basis").x((function(t){return g(t.dist)})).y((function(t){return _(t.z)})),w=d3.svg.area().interpolate("basis").x((function(t){return g(t.dist)})).y0(f).y1((function(t){return _(t.z)})),b=d3.select(e).append("svg").attr("width",m+h+c).attr("height",f+l+u).append("g").attr("transform","translate("+h+","+l+")"),C=d3.extent(r,(function(t){return t.dist}));g.domain(C);var M=[0,d3.max(r,(function(t){return t.z}))];_.domain(M),b.append("path").datum(r).attr("class","area-d3").attr("d",w),b.append("g").attr("class","x axis-d3").attr("transform","translate(0,"+f+")").call(v).append("text").attr("y",-15).attr("dy",".71em").attr("x",m).text("Distance ("+t.unit+")"),b.append("g").attr("class","y axis-d3").call(y).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".71em").text("Altitude (m)"),b.append("g").attr("class","grid-d3 vertical").attr("transform","translate(0,"+f+")").call(v.orient("bottom").tickSize(-f,0,0).tickFormat("")),b.append("g").attr("class","grid-d3 horizontal").call(y.orient("left").tickSize(-m,0,0).tickFormat("")),b.append("path").datum(r).attr("class","line-d3").attr("d",E),b.selectAll("circle").data(r).enter().append("circle").attr("cx",(function(t){return g(t.dist)})).attr("cy",(function(t){return _(t.z)})).attr("r",0).attr("class","circle-d3");var P=b.append("g").style("display","none");P.append("line").attr("id","focusLineX").attr("class","focusLine-d3"),P.append("line").attr("id","focusLineY").attr("class","focusLine-d3"),P.append("circle").attr("id","focusCircle").attr("r",4).attr("class","circle-d3 focusCircle-d3");var L=d3.select(e).append("div").attr("class","tooltip-d3").style("opacity",0),S=d3.bisector((function(t){return t.dist})).left;return b.append("rect").attr("class","overlay-d3").attr("width",m).attr("height",f).on("mouseover",(function(){P.style("display",null),n.__createProfileMarker(o,r[0])})).on("mouseout",(function(){P.style("display","none"),n.__removeProfileMarker(o),L.transition().duration(500).style("opacity",0)})).on("mousemove",(function(){var t=d3.mouse(this),e=g.invert(t[0]),i=Math.max(1,S(r,e)),s=r[i-1],l=r[i],c=e-s[0]>l[0]-e?l:s,u=g(c.dist),h=_(c.z);P.select("#focusCircle").attr("cx",u).attr("cy",h),P.select("#focusLineX").attr("x1",u).attr("y1",_(M[0])).attr("x2",u).attr("y2",_(M[1])),P.select("#focusLineY").attr("x1",g(C[0])).attr("y1",h).attr("x2",g(C[1])).attr("y2",h),n.__updateProfileMarker(o,c),L.transition().duration(200).style("opacity",.9);var d="";d+=" Altitude : "+c.z+" m",a.currentSlope&&(d+="<br/> Pente : "+c.slope+" %"),d+="<br/> (Lat : "+c.lat+"/ Lon : "+c.lon+")",L.html(d).style("left",d3.event.pageX+"px").style("top",d3.event.pageY-28+"px")})),b}},displayProfileLibAmCharts:function(t,e,i,n){var o=i;if(e&&t){var r=t.points,s="<span class='altiPathValue'>[[title]] : [[value]]m</span><br/>";if(o.options.displayProfileOptions.currentSlope&&(s+="<span class='altiPathValue'>Pente : [[slope]] %</span><br/>"),s+="<span class='altiPathCoords'>(Lat: [[lat]] / Lon:[[lon]])</span>",AmCharts.addInitHandler((function(){})),t.distance>2e3){t.unit="km";for(var a=0;a<r.length;a++)r[a].dist/=1e3}for(var l=0;l<r.length;l++){var c=r[l].dist,u=100;c>100?u=1:c>10&&(u=10),c=Math.round(c*u)/u,r[l].dist=c}var h={type:"serial",pathToImages:"http://cdn.amcharts.com/lib/3/images/",categoryField:"dist",autoMarginOffset:0,marginRight:10,marginTop:10,startDuration:0,color:"#5E5E5E",fontSize:8,theme:"light",thousandsSeparator:"",numberFormatter:{precision:-1,decimalSeparator:",",thousandsSeparator:" "},categoryAxis:{color:"#5E5E5E",gridPosition:"start",minHorizontalGap:40,tickPosition:"start",title:"Distance ("+t.unit+")",titleColor:"#5E5E5E",labelOffset:0,startOnAxis:!0},chartCursor:{animationDuration:0,bulletsEnabled:!0,bulletSize:10,categoryBalloonEnabled:!1,cursorColor:"#F90",graphBulletAlpha:1,graphBulletSize:1,zoomable:!1},trendLines:[],graphs:[{balloonColor:"#CCCCCC",balloonText:s,bullet:"round",bulletAlpha:0,bulletBorderColor:"#FFF",bulletBorderThickness:2,bulletColor:"#F90",bulletSize:6,hidden:!1,id:"AmGraph-1",fillAlphas:.4,fillColors:"#C77A04",lineAlpha:1,lineColor:"#C77A04",lineThickness:1,title:"Altitude",valueField:"z"}],guides:[],valueAxes:[{id:"ValueAxis-1",minVerticalGap:20,title:"Altitude (m)"}],balloon:{borderColor:"#CCCCCC",borderThickness:1,fillColor:"#FFFFFF",showBullet:!0},titles:[],allLabels:[],dataProvider:r},d=AmCharts.makeChart(e,h);return d.addListener("changed",(function(t){var e=t.chart.dataProvider[t.index];n.__updateProfileMarker(o,e)})),d}}},$n=l.getLogger("ElevationPath"),to=r.a.Control.extend({includes:Qn,options:{position:"topleft",active:!1,elevationPathOptions:{},stylesOptions:{},displayProfileOptions:{greaterSlope:!0,meanSlope:!0,ascendingElevation:!0,descendingElevation:!0,currentSlope:!0,apply:null,target:null}},initialize:function(t){r.a.Util.setOptions(this,t),this._uid=c.generate(),this._initDisplayProfileOptions(),this._showContainer=null,this._pictoContainer=null,this._panelContainer=null,this._profilContainer=null,this._waitingContainer=null,this._infoContainer=null,this._timerHdlr=null,this._reducePanel=!1,this._featuresLayer=null,this._lastIdLayer=0,this._currentIdLayer=0,this._currentFeature=null,this._profile=null,this._marker=null,this._geometry=null,this._distance=0,this._data={}},onAdd:function(t){var e=this._container=this._initLayout();return t&&this.options.active&&(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(t)),r.a.DomEvent.disableClickPropagation(e).disableScrollPropagation(e),e},onRemove:function(){},_initDisplayProfileOptions:function(){var t=this.options.displayProfileOptions,e=t.apply;t.apply="function"==typeof e?e:to.DISPLAY_PROFILE_BY_DEFAULT;var i=t.target;t.target=void 0!==i?i:null;var n=Object.getPrototypeOf(this.options);void 0===t.meanSlope&&(t.meanSlope=n.displayProfileOptions.meanSlope),void 0===t.greaterSlope&&(t.greaterSlope=n.displayProfileOptions.greaterSlope),void 0===t.ascendingElevation&&(t.ascendingElevation=n.displayProfileOptions.ascendingElevation),void 0===t.descendingElevation&&(t.descendingElevation=n.displayProfileOptions.descendingElevation),void 0===t.currentSlope&&(t.currentSlope=n.displayProfileOptions.currentSlope)},_initLayout:function(){var t=this._createMainContainerElement(),e=this._showContainer=this._createShowElevationPathElement();t.appendChild(e),this.options.active&&(this._showContainer.checked=!0);var i=this._pictoContainer=this._createShowElevationPathPictoElement();t.appendChild(i);var n=this._panelContainer=this._createElevationPathPanelElement(),o=this._createElevationPathPanelHeaderElement();n.appendChild(o);var r=this._profilContainer=this._createElevationPathPanelProfilElement();n.appendChild(r);var s=this._waitingContainer=this._createElevationPathWaitingElement();n.appendChild(s);var a=this._infoContainer=this._createElevationPathInformationsElement();return n.appendChild(a),t.appendChild(n),t},onShowElevationPathClick:function(t){$n.trace(t);var e=this._map;this._reducePanel?null!==this._profile&&(null===this.options.displayProfileOptions.target&&(this._pictoContainer.style.display="none"),this._panelContainer.style.display="block"):this._showContainer.checked?(this._pictoContainer.style.display="block",this._panelContainer.style.display="none",this._removeMapInteraction(e),this._clear()):(null===this._profile&&(this._panelContainer.style.display="none"),this._activateMapInteraction(e)),this._reducePanel=!1},onReduceElevationPathPanelClick:function(){this._reducePanel=!0,this._pictoContainer.style.display="block",this._panelContainer.style.display="none"},onOpenElevationPathInfoClick:function(){var t=this.options.displayProfileOptions.meanSlope,e=this.options.displayProfileOptions.greaterSlope,i=this.options.displayProfileOptions.ascendingElevation,n=this.options.displayProfileOptions.descendingElevation,o=this._infoContainer;if(o.childElementCount)for(;o.firstChild;)o.removeChild(o.firstChild);i&&this._addElevationPathInformationsItem("Dénivelé positif : "+this._data.ascendingElevation.toLocaleString()+" m"),n&&this._addElevationPathInformationsItem("Dénivelé négatif : "+this._data.descendingElevation.toLocaleString()+" m"),t&&this._addElevationPathInformationsItem("Pente moyenne : "+this._data.meanSlope.toLocaleString()+" %"),e&&this._addElevationPathInformationsItem("Plus forte pente : "+this._data.greaterSlope.toLocaleString()+" %"),"GPelevationPathInformationsContainerVisible"===o.className?(clearTimeout(this._timerHdlr),o.className="GPelevationPathInformationsContainerHidden"):o.className="GPelevationPathInformationsContainerVisible",this._timerHdlr=setTimeout((function(){o.className="GPelevationPathInformationsContainerHidden"}),4e3)},_activateMapInteraction:function(t){if($n.info("_activateMapInteraction()"),null===this._featuresLayer){this._featuresLayer=new r.a.FeatureGroup,t.addLayer(this._featuresLayer);var e=this;t.on("contextmenu",(function(){})),t.on("draw:created",(function(t){$n.trace("draw:created"),e._currentIdLayer=r.a.Util.stamp(t.layer),e._getFeatureGeometry(t.layer),e._addFeatureLayer(t.layer)})),t.on("draw:drawstart",(function(){$n.trace("draw:drawstart"),e._removeFeatureLayer(e._lastIdLayer),e._lastIdLayer=e._currentIdLayer})),t.on("draw:drawstop",(function(){$n.trace("draw:drawstop"),void 0===e.options.elevationPathOptions.onSuccess&&null===e.options.displayProfileOptions.target&&(e._pictoContainer.style.display="none",e._panelContainer.style.display="block"),e._altiRequest()}))}this._activatePolyLineInteraction(t)},_removeMapInteraction:function(t){t&&(null!==this._featuresLayer&&(t.off("draw:created"),t.off("draw:drawstart"),t.off("draw:drawstop"),t.removeLayer(this._featuresLayer),this._featuresLayer=null),this._lastIdLayer=this._currentIdLayer=0,this._currentFeature&&this._currentFeature.disable())},_activatePolyLineInteraction:function(t){this._currentFeature&&this._currentFeature.disable();var e=this.options.stylesOptions||{},i=0!==Object.keys(e).length?e:{stroke:!0,color:"#C77A04",weight:4,opacity:.5,fill:!1};this._currentFeature=new r.a.Draw.Polyline(t,{shapeOptions:i}),this._currentFeature.enable()},_getFeatureGeometry:function(t){$n.log(t.getLatLngs()),null!==this._geometry&&(this._geometry=null),this._geometry=[],this._distance=0;for(var e=t.getLatLngs(),i=0;i<e.length;i++){var n=e[i],o=e[i+1];this._geometry.push({lon:n.lng,lat:n.lat}),o&&(this._distance+=n.distanceTo(o))}$n.log("Geometry",this._geometry),$n.log("Distance",this._distance)},_addFeatureLayer:function(t){this._featuresLayer&&this._featuresLayer.addLayer(t)},_removeFeatureLayer:function(t){this._featuresLayer&&0!==t&&(t?this._featuresLayer.removeLayer(t):this._featuresLayer.clearLayers())},_altiRequest:function(){if($n.log("_altiRequest"),this._geometry){var t={};r.a.Util.extend(t,this.options.elevationPathOptions),r.a.Util.extend(t,{apiKey:t.apiKey||this.options.apiKey}),r.a.Util.extend(t,{ssl:this.options.ssl});var e=t.sampling;if(!e){var i=this._currentFeature._measurementRunningTotal;$n.trace("length",i);var n=Math.floor(i)/5;e=n>=200?200:Math.floor(n)}var o=this;r.a.Util.extend(t,{sampling:e,onSuccess:this.options.elevationPathOptions.onSuccess||function(t){$n.log(t),t&&(null!==o.options.displayProfileOptions.target&&(o._pictoContainer.style.display="block",o._panelContainer.style.display="block"),o._displayProfil(t.elevations),o._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",o._waiting=!1)},onFailure:this.options.elevationPathOptions.onFailure||function(t){$n.log(t.message),o._pictoContainer.style.display="block",o._panelContainer.style.display="none",o._waitingContainer.className="GPelevationPathCalcWaitingContainerHidden",o._waiting=!1,o._clear()}});var s=this._geometry;r.a.Util.extend(t,{positions:s}),$n.log(t),this._waitingContainer.className="GPelevationPathCalcWaitingContainerVisible",an.Services.getAltitude(t)}else $n.log("missing position")},_computeElevationMeasure:function(t){var e=function(t,e){var i=hn.decimalToRadian(t[1]),n=hn.decimalToRadian(e[1]),o=(n-i)/2,r=hn.decimalToRadian(e[0]-t[0])/2,s=Math.sin(o)*Math.sin(o)+Math.sin(r)*Math.sin(r)*Math.cos(i)*Math.cos(n);return 12756274*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))},i=t,n=this._geometry,o=0,r=0,s=n[1];i[0].dist=0,i[0].slope=0,i[0].lat=Math.round(1e4*i[0].lat)/1e4,i[0].lon=Math.round(1e4*i[0].lon)/1e4;for(var a=0,l=0,c=0,u=0,h=0,d=0,p=[],m=1;m<i.length;m++){var f=[i[m].lon,i[m].lat],g=r+e(f,[n[o].lon,n[o].lat]),_=g-h;f[0].toFixed(8)===s.lon.toFixed(8)&&f[1].toFixed(8)===s.lat.toFixed(8)&&(o++,r=g,m!==i.length-1&&(s=n[o+1]));var v=i[m].z,y=i[m-1].z;v<0&&(v=0),y<0&&(y=0);var E=v-y;E<0?(a+=_,u+=E):E>0&&(l+=_,c+=E),h=g,i[m].dist=g,p.push(g),d+=E?Math.abs(Math.round(E/_*100)):0,i[m].slope=E?Math.abs(Math.round(E/_*100)):0;var w=i[m].slope;i[m].color=w>15&&w<30?"#005b4c":w>30&&w<45?"#00362d":w>45?"#00120f":"#00B798",i[m].lat=Math.round(1e4*i[m].lat)/1e4,i[m].lon=Math.round(1e4*i[m].lon)/1e4}$n.trace("List Distances",p);for(var b=i[0].z,C=i[0].z,M=i[0].slope,P=0;P<i.length;P++){var L=i[P];L.z<-100&&(L.z=0),L.z>C&&(C=L.z),L.z<b&&(b=L.z),L.slope>M&&(M=L.slope)}return{greaterSlope:M,meanSlope:Math.round(d/i.length),distancePlus:l,distanceMinus:a,ascendingElevation:c,descendingElevation:u,altMin:b.toLocaleString(),altMax:C.toLocaleString(),distance:this._distance,unit:"m",points:i}},_displayProfil:function(t){this._map.off("contextmenu"),this._data&&(this._data={});var e=this._data=this._computeElevationMeasure(t),i=this.options.displayProfileOptions.target;i&&i.appendChild(this._panelContainer),i=this._profilContainer;var n=this.options.displayProfileOptions,o=n.apply;"undefined"!=typeof AmCharts&&"undefined"!=typeof d3&&$n.trace("Aucune lib. n'est presente !"),o.call(this,e,i,this);var s=r.a.DomUtil.get("GPelevationPathPanelInfo-"+this._uid);(n.greaterSlope||n.meanSlope||n.ascendingElevation||n.descendingElevation)&&(s.style.display="block")},_clear:function(){if(this._geometry=null,this._profile=null,this._profilContainer)for(;this._profilContainer.firstChild;)this._profilContainer.removeChild(this._profilContainer.firstChild);var t=this._map;this._marker&&(t.removeLayer(this._marker),this._marker=null)}});to.__createProfileMarker=function(t,e){$n.log("__createProfileMarker");var i=t,n=i._map;i._marker=r.a.marker(r.a.latLng(e),{icon:new pn("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(n)},to.__updateProfileMarker=function(t,e){$n.log("__updateProfileMarker");var i=t,n=i._map;i._marker?(i._marker.setLatLng(r.a.latLng(e)),i._marker.update()):(i._marker=r.a.marker(r.a.latLng(e),{icon:new pn("orange"),draggable:!1,clickable:!1,zIndexOffset:1e3}),i._marker.addTo(n))},to.__removeProfileMarker=function(t){$n.log("__removeProfileMarker");var e=t,i=e._map;e._marker&&(i.removeLayer(e._marker),e._marker=null)},to.__customRawProfileOperation=function(){$n.log("__customRawProfileOperation")},to.__customRawProfileMouseOverEvent=function(t,e){$n.log("__customRawProfileMouseOverEvent",t,e)},to.DISPLAY_PROFILE_BY_DEFAULT=function(t,e,i){$n.trace("ElevationPath.DISPLAY_PROFILE_BY_DEFAULT");var n=Jn.displayProfileByDefault(t,e,i,to);n&&(this._profile=n)},to.DISPLAY_PROFILE_RAW=function(t,e,i){$n.trace("ElevationPath.DISPLAY_PROFILE_RAW");var n=Jn.displayProfileRaw(t,e,i,to);n&&(this._profile=n)},to.DISPLAY_PROFILE_LIB_D3=function(t,e,i){if($n.trace("ElevationPath.DISPLAY_PROFILE_LIB_D3"),"undefined"!=typeof d3){var n=Jn.displayProfileLibD3(t,e,i,to);n&&(this._profile=n)}else $n.log("Lib. D3 is not loaded !")},to.DISPLAY_PROFILE_LIB_AMCHARTS=function(t,e,i){if($n.trace("ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS"),"undefined"!=typeof AmCharts){var n=Jn.displayProfileLibAmCharts(t,e,i,to);n&&(this._profile=n)}else $n.log("Lib. AmCharts is not loaded !")};var eo=to,io=r.a.Control.extend({options:{position:"topright",picto:null,url:null,text:null,size:"30px"},initialize:function(t){r.a.setOptions(this,t)},onAdd:function(){var t=null;t=r.a.DomUtil.create("div","gp-control-logo",t);var e=!(!this.options.url&&!this.options.text),i=null;e&&((i=r.a.DomUtil.create("a","",t)).target="_blank",this.options.url&&(i.href=this.options.url,this.options.text&&(i.title=this.options.text))),e&&this.options.text&&(i.text=this.options.text);var n=null;return!!this.options.picto&&((n=e?r.a.DomUtil.create("img","",i):r.a.DomUtil.create("img","",t)).src=this.options.picto,"string"==typeof this.options.size?n.style.height=n.style.width=this.options.size:(n.style.height=this.options.size.height,n.style.width=this.options.size.width)),t}}),no={LayerSwitcher:function(t){return new _e(t)},Isocurve:function(t){return new yn(t)},MousePosition:function(t){return new An(t)},ReverseGeocode:function(t){return new jn(t)},Route:function(t){return new zn(t)},SearchEngine:function(t){return new Kn(t)},ElevationPath:function(t){return new eo(t)},Logo:function(t){return new io(t)}},oo={getZoomLevelFromScaleDenominator:function(t,e){var i={};switch(e){case"EPSG:2154":i={0:104579.224549894,1:52277.5323537905,2:26135.4870785954,3:13066.8913818,4:6533.2286041135,5:3266.5595244627,6:1633.2660045974,7:816.629554986,8:408.3139146768,9:204.1567415109,10:102.0783167832,11:51.0391448966,12:25.5195690743,13:12.7597836936,14:6.379891636,15:3.1899457653,16:1.5949728695,17:.7974864315,18:.3987432149,19:.1993716073,20:.0996858037,21:.0498429018};break;default:i={0:156543.033928041,1:78271.51696402048,2:39135.758482010235,3:19567.87924100512,4:9783.93962050256,5:4891.96981025128,6:2445.98490512564,7:1222.99245256282,8:611.49622628141,9:305.7481131407048,10:152.8740565703525,11:76.43702828517624,12:38.21851414258813,13:19.10925707129406,14:9.554628535647032,15:4.777314267823516,16:2.388657133911758,17:1.194328566955879,18:.5971642834779395,19:.2985821417389697,20:.1492910708694849,21:.0746455354347424}}var n=28e-5*t;for(var o in i)if(i.hasOwnProperty(o)&&i[o]<=n)return o=parseInt(o,10);return 0},getAttributions:function(t){var e=t.zoom,i=[];if(null!=t.originators&&t.visibility)for(var n,o=0,r=t.originators.length;o<r;o++){n=!0;for(var s=t.originators[o],a=t.originators[o].constraints||[],l=0,c=a.length;l<c;l++){var u=a[l];n=!0;var h=this.getZoomLevelFromScaleDenominator(u.maxScaleDenominator,t.crs),d=this.getZoomLevelFromScaleDenominator(u.minScaleDenominator,t.crs)||21;h&&h>e&&(n=!1),n&&d&&d<e&&(n=!1);var p=u.bbox;if(n&&p){n=!1;var m=t.extent;if(m){var f=[p.top,p.left,p.bottom,p.right];if(this.intersects(m,f)){n=!0;break}}}}if(n){var g=s.logo,_=s.url,v=s.name?s.name:"",y=s.attribution,E=document.createElement("div");E.className="gp-control-attribution";var w=null;(w=document.createElement("a")).className="gp-control-attribution-link",w.target="_blank",E.appendChild(w),_&&(w.href=_);var b=null;!!g?(b=document.createElement("img"),w?(b.className="gp-control-attribution-image",w.appendChild(b)):(b.className="",E.appendChild(b)),b.src=g,b.title=y||v,b.style.height="30px",b.style.width="30px"):w.textContent=v||(y||(_||"")),i.push(E.innerHTML+" ")}}return i},intersects:function(t,e){var i=t[1]<=e[3]&&e[1]<=t[3],n=t[2]<=e[0]&&e[2]<=t[0];return i&&n}},ro=l.getLogger("layer-config"),so={get:function(t){var e={};if(xn.a.isConfigLoaded()){if((e=xn.a.configuration.getLayerParams(t.layer,t.service))&&0!==Object.keys(e).length)return e.minZoom=oo.getZoomLevelFromScaleDenominator(e.maxScale)||1,e.maxZoom=oo.getZoomLevelFromScaleDenominator(e.minScale)||21,e;ro.warn("WARNING CONFIG_FAILED : params not found ?!")}else ro.warn("WARNING CONFIG_FAILED : config not loaded ?!")}},ao=l.getLogger("layer-event"),lo={_id:null,_attributions:[],_visibility:!0,_originators:[],isEnable:function(t){return!!t.attributionControl},setVisible:function(t){ao.log("visibility",t),this._visibility=t,this.fire("visibilitychange")},getVisible:function(){return this._visibility},_onRemoveLayer:function(t){ao.trace("onRemove event",t),t.layer._geoportal_id===this._geoportal_id&&this.setVisible(!1)},_onAddLayer:function(t){ao.trace("onAdd event",t),t.layer._geoportal_id===this._geoportal_id&&this.setVisible(!0)},_onMoveEndLayer:function(t){ao.trace("moveend event",t),this.updateAttributions(this._map,this)},updateAttributions:function(t){this.isEnable(t)&&(this.removeAttributions(t),this.addAttributions(t),this.fire("attributionchange"))},removeAttributions:function(t){if(ao.trace("removeAttributions...",this._geoportal_id),this.isEnable(t)){for(var e=0;e<this._attributions.length;e++)t.attributionControl.removeAttribution(this._attributions[e]);this._attributions=[]}},addAttributions:function(t){if(ao.trace("addAttributions...",this._geoportal_id),this.isEnable(t)){var e=t.getBounds().getNorthWest(),i=t.getBounds().getSouthEast(),n={extent:[e.lat,e.lng,i.lat,i.lng],zoom:t.getZoom(),originators:this._originators,visibility:this._visibility};ao.log(n);var o=oo.getAttributions(n);if(ao.log(o),o&&0!==o.length)for(var r=0;r<o.length;r++)this._attributions.push(o[r]),t.attributionControl.addAttribution(o[r])}}},co=l.getLogger("wms"),uo=r.a.TileLayer.WMS.extend({includes:lo,initialize:function(t,e){var i={};r.a.Util.extend(i,e.paramsWms,e.paramsNative);var o={"gp-leaflet-ext":n.leafletExtVersion||n.version};e.apikey&&(o.apikey=e.apikey),r.a.TileLayer.WMS.prototype.initialize.call(this,an.Helper.normalyzeUrl(t,o,!1),i),this._originators=e.originators,this._legends=e.legends,this._metadata=e.metadata,this._title=e.title,this._description=e.description,this._quicklookUrl=e.quicklookUrl,this._geoportal_id=0},onAdd:function(t){co.trace("onAdd layer",this._geoportal_id),this._map=t,this._geoportal_id=r.a.stamp(this),r.a.TileLayer.WMS.prototype.onAdd.call(this,t),this.setVisible(!0),this.updateAttributions(t),t.on({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},onRemove:function(t){co.trace("onRemove layer",this._geoportal_id),this._map=t,r.a.TileLayer.prototype.onRemove.call(this,t),this.setVisible(!1),this.removeAttributions(t),t.off({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),o=n.add([i,i]),s=this._crs.project(e.unproject(n,t.z)),a=this._crs.project(e.unproject(o,t.z)),l=this._wmsVersion>=1.3&&-1!==["EPSG:4326"].indexOf(this._crs.code)?[a.y,s.x,s.y,a.x].join(","):[s.x,a.y,a.x,s.y].join(","),c=r.a.Util.template(this._url,{s:this._getSubdomain(t)});return c+r.a.Util.getParamString(this.wmsParams,c,!0)+"&BBOX="+l}}),ho=l.getLogger("wmts"),po=r.a.TileLayer.extend({includes:lo,defaultWmtsParams:{service:"WMTS",request:"GetTile",version:"1.0.0",layer:"",style:"",tilematrixset:"PM",format:"image/jpeg"},initialize:function(t,e){ho.log("initialize"),this._wmtsParams={},r.a.Util.extend(this._wmtsParams,this.defaultWmtsParams,e.paramsWmts);var i={"gp-leaflet-ext":n.leafletExtVersion||n.version};e.apikey&&(i.apikey=e.apikey),r.a.TileLayer.prototype.initialize.call(this,an.Helper.normalyzeUrl(t,i,!1),e.paramsNative),this._originators=e.originators,this._legends=e.legends,this._metadata=e.metadata,this._title=e.title,this._description=e.description,this._quicklookUrl=e.quicklookUrl,this._geoportal_id=0},onAdd:function(t){ho.trace("onAdd layer",this._geoportal_id),this._map=t,this._geoportal_id=r.a.stamp(this),r.a.TileLayer.prototype.onAdd.call(this,t),this.setVisible(!0),this.updateAttributions(t),t.on({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},onRemove:function(t){ho.trace("onRemove layer",this._geoportal_id),this._map=t,r.a.TileLayer.prototype.onRemove.call(this,t),this.setVisible(!1),this.removeAttributions(t),t.off({overlayremove:this._onRemoveLayer,overlayadd:this._onAddLayer,layerremove:this._onRemoveLayer,layeradd:this._onAddLayer,moveend:this._onMoveEndLayer},this)},getTileUrl:function(t){var e=this._getZoomForUrl(),i=r.a.Util.template(this._url,{s:this._getSubdomain(t)});return i+r.a.Util.getParamString(this._wmtsParams,i)+"&tilematrix="+e+"&tilerow="+t.y+"&tilecol="+t.x},setParams:function(t,e){return r.a.extend(this._wmtsParams,t),e||this.redraw(),this}}),mo=l.getLogger("layers"),fo={options:{},params:{},protocol:null,serviceUrl:"http://localhost?no-rights-found-for=[{layer}]",_initOptions:function(){if(!this.options||0===Object.keys(this.options).length)throw new Error("PARAM_MISSING : options !");if(!this.options.layer)throw new Error("PARAM_MISSING : layer !");this.options.apiKey||mo.log("PARAM_MISSING : apiKey !"),void 0===this.options.ssl&&(this.options.ssl=!0)},_initContext:function(){this.protocol=!1===this.options.ssl?"http://":"https://"},_initParams:function(t){t||(t="WMTS"),this.params=so.get({key:this.options.apiKey,layer:this.options.layer,service:t}),this.params&&0!==Object.keys(this.params).length||(this.params={},this.options.apiKey||mo.log("WARNING PARAM_MISSING : parameter 'apiKey' is mandatory if the contract key configuration has not been loaded !"))},WMS:function(t,e){var i=l.getLogger("layers-wms");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMS"),i.log(this.params);var n=null;n=this.params.url?this.params.url:this.options.apiKey?"https://data.geopf.fr/private/wms-r":"https://data.geopf.fr/wms-r";var o={layers:this.options.layer,styles:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.3.0"};if(n.includes("/private/"))var s=this.options.apiKey||xn.a.configuration.getLayerKey(xn.a.configuration.getLayerId(o.layers,"WMS"))[0];var a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return r.a.Util.extend(o,this.settings),r.a.Util.extend(a,this.settings),new uo(n.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWms:o,apikey:s,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})},WMTS:function(t,e){var i=l.getLogger("layers-wmts");this.options=t||{},this._initOptions(),this.settings=e||{},this._initContext(),this._initParams("WMTS"),i.log(this.params);var n=null;n=this.params.url?this.params.url:this.options.apiKey?"https://data.geopf.fr/private/wmts":"https://data.geopf.fr/wmts";var o={layer:this.options.layer,style:this.params.styles||"normal",format:this.params.format||"image/jpeg",version:this.params.version||"1.0.0",tilematrixset:this.params.TMSLink||"PM"};if(n.includes("/private/"))var s=this.options.apiKey||xn.a.configuration.getLayerKey(xn.a.configuration.getLayerId(o.layer,"WMTS"))[0];var a={minZoom:this.params.minZoom||1,maxZoom:this.params.maxZoom||21};return r.a.Util.extend(o,this.settings),r.a.Util.extend(a,this.settings),new po(n.replace(/(http|https):\/\//,this.protocol),{paramsNative:a,paramsWmts:o,apikey:s,originators:this.params.originators||this.settings.originators||[],legends:this.settings.originators||this.params.legends||[],metadata:this.settings.metadata||this.params.metadata||[],title:this.settings.title||this.params.title||"",description:this.settings.description||this.params.description||"",quicklookUrl:this.settings.quicklookUrl||this.params.quicklookUrl||""})}};!function(){var t=document.getElementsByTagName("script"),e=t[t.length-1].getAttribute("data-key"),i=t[t.length-1].getAttribute("data-url"),n=t[t.length-1].getAttribute("data-timeout");if(e||i){var o={apiKey:e,sync:!0,onSuccess:function(){},onFailure:function(t){throw new Error("Configuration load failed : "+t.message)}};i&&(o.customConfigFile=i,o.callbackSuffix=""),n&&(o.timeOut=n),window.Gp||an.Services.getConfig(o)}}();var go={proxifyUrl:function(t,e){var i=l.getLogger("proxifyUrl");if(!e||!e.hasOwnProperty("proxyUrl")||null===e.proxyUrl||0===e.proxyUrl.trim().length)return t;if(e.noProxyDomains&&Array.isArray(e.noProxyDomains)&&e.noProxyDomains.length>0)for(var n in e.noProxyDomains)if(i.trace("[ProxyUtils] proxifyUrl : analyzing "+e.noProxyDomains[n]),-1!==t.indexOf(e.noProxyDomains[n]))return i.info("[ProxyUtils] proxifyUrl : "+t+" found in noProxyDomains list ("+e.noProxyDomains[n]+")."),t;return e.proxyUrl+encodeURIComponent(t)}},_o={hex:function(t){if(t>255)throw new Error("'"+t+"'' is greater than 255(0xff);");return("0"+Number(t).toString(16)).slice(-2)},num:function(t){return parseInt(t,16)},arrayToRgba:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],n=t[2],o=t[3]||1;return"rgba("+e+", "+i+", "+n+", "+parseFloat(o)+")"},arrayToHex:function(t){if(!Array.isArray(t))throw new Error("Not an array !");var e=t[0],i=t[1],n=t[2],o=t[3],r=[this.hex(e),this.hex(i),this.hex(n)],s={};return s.hex="#"+r.join(""),o&&(s.opacity=parseFloat(o)),s},rgbaToHex:function(t){var e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t);if(!e)throw new Error("Invalid format: "+t);var i=e[1],n=e[2],o=e[3],r=e[4],s=[this.hex(i),this.hex(n),this.hex(o)],a={};return a.hex="#"+s.join(""),r&&(a.opacity=parseFloat(r)),a},hexToRgba:function(t,e){if(!t)throw new Error("Invalid format");t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,n){return e+e+i+i+n+n}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return(i=i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null)?"rgba("+i.r+", "+i.g+", "+i.b+", "+e+")":null},isHex:function(t){if(!t)return!1;if("#"!==t.charAt(0))return!1;return!!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t)},isRGB:function(t){if(!t)return!1;return!!/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(t)}},vo=an.Services,yo=an.Error,Eo=an.Helper,wo=an.Protocols,bo=an.servicesDate,Co=an.servicesVersion,Mo=n.leafletExtVersion||n.version,Po=n.date,Lo=window.Gp?window.Gp.Config:{};r.a.geoportalLayer=fo,r.a.geoportalControl=no,r.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_D3=eo.DISPLAY_PROFILE_LIB_D3,r.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS=eo.DISPLAY_PROFILE_LIB_AMCHARTS,r.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_RAW=eo.DISPLAY_PROFILE_RAW,r.a.geoportalControl.ElevationPath.DISPLAY_PROFILE_BY_DEFAULT=eo.DISPLAY_PROFILE_BY_DEFAULT,r.a.geoportalCRS=Rn,r.a.geoportalCRS.EPSG2154=Rn.EPSG2154(),r.a.geoportalCRS.EPSG27572=Rn.EPSG27572(),r.a.geoportalCRS.EPSG4326=Rn.EPSG4326()}])}));